2012-03-25 15:24:05 +02:00
|
|
|
#
|
|
|
|
# spec file for package 0ad
|
|
|
|
#
|
2016-04-02 20:02:57 +02:00
|
|
|
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
|
2012-03-25 15:24:05 +02:00
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
2010-07-22 11:28:09 +02:00
|
|
|
|
|
|
|
Name: 0ad
|
2016-12-08 21:45:59 +01:00
|
|
|
Version: 0.0.21
|
2013-04-03 18:00:59 +02:00
|
|
|
Release: 0
|
2016-09-06 06:58:47 +02:00
|
|
|
Summary: A real-time strategy game of ancient warfare
|
|
|
|
License: GPL-2.0+ and LGPL-3.0+ and CC-BY-SA-3.0 and MIT and ISC and MPL-2.0 and BSD-3-Clause
|
|
|
|
Group: Amusements/Games/Strategy/Real Time
|
2012-12-16 23:06:17 +01:00
|
|
|
Url: http://play0ad.com/
|
2015-04-07 21:54:00 +02:00
|
|
|
Source: http://sourceforge.net/projects/zero-ad/files/releases/%{name}-%{version}-alpha-unix-build.tar.xz
|
2016-04-02 20:02:57 +02:00
|
|
|
Source99: %{name}.changes
|
2016-09-06 06:58:47 +02:00
|
|
|
# PATCH-FEATURE-UPSTREAM system-tinygettext.patch -- http://trac.wildfiregames.com/ticket/4192
|
|
|
|
Patch1: system-tinygettext.patch
|
2016-12-08 21:45:59 +01:00
|
|
|
# PATCH-RPMLINT-ERROR 0ad-desktopt.patch -- invalid key URL
|
|
|
|
Patch2: %{name}-desktop.patch
|
2012-03-25 15:24:05 +02:00
|
|
|
BuildRequires: boost-devel
|
|
|
|
BuildRequires: cmake
|
2010-07-22 11:28:09 +02:00
|
|
|
BuildRequires: gcc-c++
|
2013-01-14 00:10:06 +01:00
|
|
|
BuildRequires: libXcursor-devel
|
2010-07-22 11:28:09 +02:00
|
|
|
BuildRequires: libjpeg-devel
|
2015-04-03 13:54:02 +02:00
|
|
|
BuildRequires: libminiupnpc-devel
|
2010-07-22 11:28:09 +02:00
|
|
|
BuildRequires: libpng-devel
|
2016-09-06 06:58:47 +02:00
|
|
|
BuildRequires: mozilla-nspr-devel
|
2010-07-22 11:28:09 +02:00
|
|
|
BuildRequires: nasm
|
2016-09-06 06:58:47 +02:00
|
|
|
BuildRequires: pkgconfig
|
2010-07-24 08:21:54 +02:00
|
|
|
BuildRequires: python
|
2016-09-06 06:58:47 +02:00
|
|
|
BuildRequires: update-desktop-files
|
|
|
|
BuildRequires: wxWidgets-3_0-devel
|
|
|
|
BuildRequires: pkgconfig(IL)
|
2015-07-11 17:04:42 +02:00
|
|
|
BuildRequires: pkgconfig(gloox)
|
2016-09-06 06:58:47 +02:00
|
|
|
BuildRequires: pkgconfig(icu-i18n)
|
2015-07-11 17:04:42 +02:00
|
|
|
BuildRequires: pkgconfig(libcurl)
|
2016-09-06 06:58:47 +02:00
|
|
|
BuildRequires: pkgconfig(libenet)
|
2013-01-14 00:10:06 +01:00
|
|
|
BuildRequires: pkgconfig(libxml-2.0)
|
2016-09-06 06:58:47 +02:00
|
|
|
BuildRequires: pkgconfig(openal)
|
|
|
|
BuildRequires: pkgconfig(sdl2)
|
|
|
|
BuildRequires: pkgconfig(tinygettext)
|
2015-07-11 17:04:42 +02:00
|
|
|
BuildRequires: pkgconfig(vorbis)
|
2016-09-06 06:58:47 +02:00
|
|
|
BuildRequires: pkgconfig(zlib)
|
|
|
|
Requires: 0ad-data = %{version}
|
2013-01-14 00:10:06 +01:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
2010-07-22 11:28:09 +02:00
|
|
|
|
|
|
|
%description
|
2016-07-29 11:34:14 +02:00
|
|
|
0 A.D. (pronounced "zero ey-dee") is a real-time strategy (RTS) game
|
|
|
|
of ancient warfare. It is a historically-based war/economy game that
|
|
|
|
allows players to relive or rewrite the history of Western
|
|
|
|
civilizations, focusing on the years between 500 B.C. and 500 A.D.
|
|
|
|
The project contains 3D graphics, detailed artwork, sound, and a
|
|
|
|
flexible game engine.
|
2010-07-22 11:28:09 +02:00
|
|
|
|
|
|
|
%prep
|
2010-08-15 18:51:34 +02:00
|
|
|
%setup -q -n %{name}-%{version}-alpha
|
2016-09-06 06:58:47 +02:00
|
|
|
%patch1 -p1
|
2016-12-08 21:45:59 +01:00
|
|
|
%patch2 -p1
|
2016-09-06 06:58:47 +02:00
|
|
|
|
|
|
|
# Fix usage of __DATE__ and __TIME__ macros
|
2016-04-02 20:02:57 +02:00
|
|
|
modified="$(sed -n '/^----/n;s/ - .*$//;p;q' "%{SOURCE99}")"
|
|
|
|
DATE="\"$(date -d "${modified}" "+%%b %%e %%Y")\""
|
|
|
|
TIME="\"$(date -d "${modified}" "+%%T")\""
|
2016-09-06 06:58:47 +02:00
|
|
|
find . "(" -name '*.[ch]' -o -name '*.cpp' ")" -exec sed -i "s/__DATE__/${DATE}/g;s/__TIME__/${TIME}/g" \{\} +
|
2010-07-22 11:28:09 +02:00
|
|
|
|
|
|
|
%build
|
|
|
|
export CFLAGS="%{optflags}"
|
2015-07-11 17:04:42 +02:00
|
|
|
export CPPFLAGS="%{optflags} -fpermissive"
|
2016-09-06 06:58:47 +02:00
|
|
|
build/workspaces/update-workspaces.sh \
|
|
|
|
%{?_smp_mflags} \
|
|
|
|
--bindir=%{_bindir} \
|
|
|
|
--datadir=%{_datadir}/%{name} \
|
|
|
|
--libdir=%{_libdir}/%{name} \
|
|
|
|
--with-system-tinygettext
|
|
|
|
|
2010-07-22 11:28:09 +02:00
|
|
|
pushd build/workspaces/gcc
|
2013-01-14 00:10:06 +01:00
|
|
|
make verbose=1 %{?_smp_mflags}
|
2010-07-22 11:28:09 +02:00
|
|
|
popd
|
|
|
|
|
|
|
|
%install
|
2016-12-08 21:45:59 +01:00
|
|
|
install -Dm 0755 binaries/system/ActorEditor %{buildroot}%{_bindir}/ActorEditor
|
2013-01-14 00:10:06 +01:00
|
|
|
install -Dm 0755 binaries/system/pyrogenesis %{buildroot}%{_bindir}/pyrogenesis
|
|
|
|
install -Dm 0755 binaries/system/libCollada.so %{buildroot}%{_libdir}/%{name}/libCollada.so
|
|
|
|
install -Dm 0755 binaries/system/libAtlasUI.so %{buildroot}%{_libdir}/%{name}/libAtlasUI.so
|
2016-12-08 21:45:59 +01:00
|
|
|
install -Dm 0755 binaries/system/libmozjs38-ps-release.so %{buildroot}%{_libdir}/%{name}/libmozjs38-ps-release.so
|
2013-01-14 00:10:06 +01:00
|
|
|
install -Dm 0755 binaries/system/libnvcore.so %{buildroot}%{_libdir}/%{name}/libnvcore.so
|
|
|
|
install -Dm 0755 binaries/system/libnvimage.so %{buildroot}%{_libdir}/%{name}/libnvimage.so
|
|
|
|
install -Dm 0755 binaries/system/libnvmath.so %{buildroot}%{_libdir}/%{name}/libnvmath.so
|
|
|
|
install -Dm 0755 binaries/system/libnvtt.so %{buildroot}%{_libdir}/%{name}/libnvtt.so
|
2010-07-22 11:28:09 +02:00
|
|
|
|
2013-01-14 00:10:06 +01:00
|
|
|
install -Dm 0644 build/resources/0ad.desktop %{buildroot}%{_datadir}/applications/%{name}.desktop
|
|
|
|
install -Dm 0644 build/resources/0ad.png %{buildroot}%{_datadir}/pixmaps/%{name}.png
|
2010-07-24 08:21:54 +02:00
|
|
|
|
2010-08-08 22:33:19 +02:00
|
|
|
%suse_update_desktop_file %{name}
|
|
|
|
|
2013-01-14 00:10:06 +01:00
|
|
|
install -Dm 0755 build/resources/0ad.sh %{buildroot}%{_bindir}/0ad
|
2010-08-08 22:33:19 +02:00
|
|
|
|
2013-01-14 00:10:06 +01:00
|
|
|
mkdir -p %{buildroot}%{_libdir}/%{name}
|
|
|
|
mkdir -p %{buildroot}%{_datadir}/%{name}
|
2010-07-22 11:28:09 +02:00
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%doc README.txt
|
2016-09-06 06:58:47 +02:00
|
|
|
%if 0%{?suse_version} > 1320
|
|
|
|
%license LICENSE.txt
|
|
|
|
%else
|
|
|
|
%doc LICENSE.txt
|
|
|
|
%endif
|
2010-07-24 08:21:54 +02:00
|
|
|
%{_bindir}/0ad
|
2010-08-15 18:51:34 +02:00
|
|
|
%{_bindir}/pyrogenesis
|
2016-12-08 21:45:59 +01:00
|
|
|
%{_bindir}/ActorEditor
|
2010-08-15 18:51:34 +02:00
|
|
|
%{_libdir}/%{name}/libCollada.so
|
|
|
|
%{_libdir}/%{name}/libAtlasUI.so
|
2016-12-08 21:45:59 +01:00
|
|
|
%{_libdir}/%{name}/libmozjs38-ps-release.so
|
2010-10-18 18:55:09 +02:00
|
|
|
%{_libdir}/%{name}/libnvcore.so
|
|
|
|
%{_libdir}/%{name}/libnvimage.so
|
|
|
|
%{_libdir}/%{name}/libnvmath.so
|
|
|
|
%{_libdir}/%{name}/libnvtt.so
|
2010-08-08 22:33:19 +02:00
|
|
|
%{_datadir}/pixmaps/%{name}.png
|
|
|
|
%{_datadir}/applications/%{name}.desktop
|
2010-08-08 23:45:49 +02:00
|
|
|
%dir %{_libdir}/%{name}
|
2010-07-24 08:21:54 +02:00
|
|
|
%dir %{_datadir}/%{name}
|
2012-03-25 15:24:05 +02:00
|
|
|
|
|
|
|
%changelog
|