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-04-04 20:21:36 +02:00
|
|
|
Version: 0.0.20
|
2013-04-03 18:00:59 +02:00
|
|
|
Release: 0
|
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-06-27 07:02:19 +02:00
|
|
|
# PATCH-FIX-UPSTREAM fix-c++14-compat.patch - http://trac.wildfiregames.com/ticket/4073
|
|
|
|
Patch0: fix-c++14-compat.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++
|
2014-05-20 17:21:25 +02:00
|
|
|
BuildRequires: mozilla-nspr-devel
|
2013-09-11 10:26:13 +02:00
|
|
|
BuildRequires: xz
|
2015-07-11 17:04:42 +02:00
|
|
|
BuildRequires: pkgconfig(IL)
|
|
|
|
BuildRequires: pkgconfig(icu-i18n)
|
2013-09-11 10:26:13 +02:00
|
|
|
BuildRequires: pkgconfig(zlib)
|
2014-01-05 09:18:19 +01:00
|
|
|
%if 0%{?suse_version} >= 1220
|
2013-01-14 00:10:06 +01:00
|
|
|
BuildRequires: libXcursor-devel
|
|
|
|
%endif
|
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
|
|
|
|
BuildRequires: nasm
|
2010-07-24 08:21:54 +02:00
|
|
|
BuildRequires: python
|
2010-07-22 11:28:09 +02:00
|
|
|
BuildRequires: subversion
|
|
|
|
BuildRequires: zip
|
2015-07-11 17:04:42 +02:00
|
|
|
BuildRequires: pkgconfig(gloox)
|
|
|
|
BuildRequires: pkgconfig(libcurl)
|
2013-01-14 00:10:06 +01:00
|
|
|
BuildRequires: pkgconfig(libxml-2.0)
|
2015-07-11 17:04:42 +02:00
|
|
|
BuildRequires: pkgconfig(vorbis)
|
2013-01-14 00:10:06 +01:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
2010-07-22 11:28:09 +02:00
|
|
|
|
|
|
|
%if 0%{?suse_version}
|
|
|
|
BuildRequires: pkg-config
|
2012-03-25 15:24:05 +02:00
|
|
|
BuildRequires: update-desktop-files
|
2015-07-11 17:04:42 +02:00
|
|
|
BuildRequires: pkgconfig(libenet)
|
|
|
|
BuildRequires: pkgconfig(openal)
|
2011-02-21 01:07:18 +01:00
|
|
|
|
2016-05-18 13:46:21 +02:00
|
|
|
%if 0%{?suse_version}
|
|
|
|
BuildRequires: wxWidgets-3_0-devel
|
2011-02-21 01:07:18 +01:00
|
|
|
%endif
|
2010-07-22 11:28:09 +02:00
|
|
|
|
|
|
|
%if 0%{?suse_version} == 1110
|
|
|
|
BuildRequires: SDL-devel
|
|
|
|
%else
|
2015-11-27 14:20:19 +01:00
|
|
|
BuildRequires: libSDL2-devel
|
2010-07-22 11:28:09 +02:00
|
|
|
%endif
|
|
|
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%if 0%{?fedora_version}
|
2012-03-25 15:24:05 +02:00
|
|
|
BuildRequires: SDL-devel
|
2010-08-08 23:45:49 +02:00
|
|
|
BuildRequires: desktop-file-utils
|
2011-07-10 14:33:59 +02:00
|
|
|
BuildRequires: libenet-devel
|
2010-07-22 11:28:09 +02:00
|
|
|
BuildRequires: openal-soft-devel
|
|
|
|
BuildRequires: pkgconfig
|
|
|
|
BuildRequires: wxGTK-devel
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%if 0%{?mandriva_version}
|
2011-07-10 14:33:59 +02:00
|
|
|
BuildRequires: libenet-devel
|
2010-07-22 11:28:09 +02:00
|
|
|
BuildRequires: libwxgtku2.8-devel
|
|
|
|
|
|
|
|
%if 0%{?mandriva_version} < 201000
|
|
|
|
BuildRequires: libopenal-devel
|
|
|
|
BuildRequires: openal-soft-devel
|
|
|
|
%endif
|
|
|
|
|
2010-07-23 01:19:19 +02:00
|
|
|
%if 0%{?mandriva_version} == 201000
|
|
|
|
BuildRequires: libopenal1-soft
|
|
|
|
%endif
|
|
|
|
|
2010-07-22 11:28:09 +02:00
|
|
|
%endif
|
|
|
|
|
2016-07-29 11:34:14 +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 and Zlib and CPL-1.0
|
2012-03-25 15:24:05 +02:00
|
|
|
Group: Amusements/Games/Strategy/Real Time
|
2014-05-26 14:11:23 +02:00
|
|
|
Requires: 0ad-data = %version
|
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-06-27 07:02:19 +02:00
|
|
|
%patch0 -p1
|
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")\""
|
|
|
|
find . -name '*.[ch]' -o -name '*.cpp' | xargs 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"
|
2015-11-27 14:20:19 +01:00
|
|
|
build/workspaces/update-workspaces.sh %{?_smp_mflags} --bindir=%{_bindir} --datadir=%{_datadir}/%{name} --libdir=%{_libdir}/%{name}
|
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
|
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
|
2015-04-03 13:54:02 +02:00
|
|
|
install -Dm 0755 binaries/system/libmozjs31-ps-release.so %{buildroot}%{_libdir}/%{name}/libmozjs31-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 23:45:49 +02:00
|
|
|
%if 0%{?suse_version}
|
2010-08-08 22:33:19 +02:00
|
|
|
%suse_update_desktop_file %{name}
|
2010-08-08 23:45:49 +02:00
|
|
|
%endif
|
|
|
|
|
|
|
|
%if 0%{?fedora_version}
|
|
|
|
desktop-file-validate %{buildroot}/%{_datadir}/applications/%{name}.desktop
|
|
|
|
%endif
|
2010-08-08 22:33:19 +02:00
|
|
|
|
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
|
2010-07-24 08:21:54 +02:00
|
|
|
%{_bindir}/0ad
|
2010-08-15 18:51:34 +02:00
|
|
|
%{_bindir}/pyrogenesis
|
|
|
|
%{_libdir}/%{name}/libCollada.so
|
|
|
|
%{_libdir}/%{name}/libAtlasUI.so
|
2015-04-03 13:54:02 +02:00
|
|
|
%{_libdir}/%{name}/libmozjs31-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
|