2012-02-02 00:12:10 +04:00
|
|
|
# http://trac.wildfiregames.com/wiki/BuildInstructions#Linux
|
|
|
|
|
|
|
|
%bcond_with debug
|
|
|
|
%if %{with debug}
|
|
|
|
%define config debug
|
|
|
|
%define dbg _dbg
|
|
|
|
%undefine _enable_debug_packages
|
|
|
|
%undefine debug_package
|
|
|
|
%else
|
|
|
|
%define config release
|
|
|
|
%define dbg %{nil}
|
|
|
|
# 0ad-debug is useless if 0ad is stripped
|
|
|
|
# install gamin-debug to verify reason of patch0
|
|
|
|
%define _enable_debug_packages %{nil}
|
|
|
|
%define debug_package %{nil}
|
|
|
|
%endif
|
2012-02-01 20:26:48 +04:00
|
|
|
|
|
|
|
Name: 0ad
|
2012-02-02 00:12:10 +04:00
|
|
|
Epoch: 1
|
2012-07-01 01:15:12 +00:00
|
|
|
Version: r11863
|
2012-03-21 05:19:18 +04:00
|
|
|
%if %mdkversion >= 201100
|
2012-07-01 01:15:12 +00:00
|
|
|
Release: 0.4
|
2012-03-21 05:19:18 +04:00
|
|
|
%else
|
2012-07-01 01:15:12 +00:00
|
|
|
Release: %mkrel 0.4
|
2012-03-21 05:19:18 +04:00
|
|
|
%endif
|
2012-02-02 00:12:10 +04:00
|
|
|
License: GPLv2+
|
2012-02-01 20:26:48 +04:00
|
|
|
Group: Games/Strategy
|
|
|
|
Summary: Cross-Platform RTS Game of Ancient Warfare
|
|
|
|
Url: http://wildfiregames.com/0ad/
|
2012-02-02 00:12:10 +04:00
|
|
|
Source: http://releases.wildfiregames.com/0ad-%{version}-alpha-unix-build.tar.xz
|
2012-02-01 20:26:48 +04:00
|
|
|
Requires: 0ad-data
|
|
|
|
BuildRequires: boost-devel
|
2012-02-02 00:12:10 +04:00
|
|
|
BuildRequires: cmake
|
|
|
|
BuildRequires: desktop-file-utils
|
2012-02-01 20:26:48 +04:00
|
|
|
BuildRequires: devil-devel
|
2012-02-02 00:12:10 +04:00
|
|
|
BuildRequires: gamin-devel
|
2012-02-01 20:26:48 +04:00
|
|
|
BuildRequires: gcc-c++
|
2012-02-02 00:12:10 +04:00
|
|
|
BuildRequires: jpeg-devel
|
|
|
|
BuildRequires: libdnet-devel
|
2012-02-01 20:26:48 +04:00
|
|
|
BuildRequires: libjpeg-devel
|
|
|
|
BuildRequires: libpng-devel
|
|
|
|
BuildRequires: libvorbis-devel
|
|
|
|
BuildRequires: libxml2-devel
|
|
|
|
BuildRequires: nasm
|
|
|
|
BuildRequires: pkgconfig
|
2012-02-02 00:12:10 +04:00
|
|
|
BuildRequires: pkgconfig(libcurl)
|
|
|
|
BuildRequires: pkgconfig(libenet)
|
|
|
|
BuildRequires: pkgconfig(libpng)
|
|
|
|
BuildRequires: pkgconfig(libzip)
|
|
|
|
BuildRequires: pkgconfig(mozjs185)
|
|
|
|
BuildRequires: pkgconfig(openal)
|
|
|
|
BuildRequires: python
|
2012-02-01 20:26:48 +04:00
|
|
|
BuildRequires: SDL-devel
|
2012-02-02 00:12:10 +04:00
|
|
|
BuildRequires: subversion
|
|
|
|
#BuildRequires: wxGTK-devel
|
|
|
|
BuildRequires: wxgtku-devel
|
2012-02-01 20:26:48 +04:00
|
|
|
|
2012-02-02 00:12:10 +04:00
|
|
|
# FAMMonitorDirectory fails if passing a relative directory
|
|
|
|
# Use FAMNoExists (gamin specific to speed up a little bit initialization
|
|
|
|
# as commented in the source)
|
|
|
|
Patch0: 0ad-r10803-gamin.patch
|
2012-02-01 20:26:48 +04:00
|
|
|
|
|
|
|
%description
|
|
|
|
0 A.D. (pronounced "zero ey-dee") is a free, open-source, cross-platform
|
|
|
|
real-time strategy (RTS) game of ancient warfare. In short, 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 is highly ambitious, involving state-of-the-art 3D
|
|
|
|
graphics, detailed artwork, sound, and a flexible and powerful custom-built
|
|
|
|
game engine.
|
|
|
|
|
|
|
|
The game has been in development by Wildfire Games (WFG), a group of volunteer,
|
|
|
|
hobbyist game developers, since 2001.
|
|
|
|
|
2012-02-02 00:12:10 +04:00
|
|
|
#-----------------------------------------------------------------------
|
2012-02-01 20:26:48 +04:00
|
|
|
%prep
|
2012-02-02 00:12:10 +04:00
|
|
|
%setup -q -n %{name}-%{version}-alpha
|
|
|
|
|
|
|
|
%patch0 -p1
|
2012-02-01 20:26:48 +04:00
|
|
|
|
2012-02-02 00:12:10 +04:00
|
|
|
#-----------------------------------------------------------------------
|
2012-02-01 20:26:48 +04:00
|
|
|
%build
|
|
|
|
export CFLAGS="%{optflags}"
|
|
|
|
export CPPFLAGS="%{optflags}"
|
2012-02-02 00:12:10 +04:00
|
|
|
build/workspaces/update-workspaces.sh \
|
|
|
|
--bindir %{_gamesbindir} \
|
|
|
|
--datadir %{_gamesdatadir}/%{name} \
|
|
|
|
--libdir %{_libdir}/%{name} \
|
|
|
|
--with-system-enet \
|
|
|
|
--with-system-mozjs185 \
|
|
|
|
%{_smp_mflags}
|
2012-02-01 20:26:48 +04:00
|
|
|
|
2012-02-02 00:12:10 +04:00
|
|
|
%make -C build/workspaces/gcc config=%{config} verbose=1
|
|
|
|
|
|
|
|
#-----------------------------------------------------------------------
|
2012-02-01 20:26:48 +04:00
|
|
|
%check
|
2012-02-02 00:12:10 +04:00
|
|
|
LD_LIBRARY_PATH=binaries/system binaries/system/test%{dbg} -libdir binaries/system
|
2012-02-01 20:26:48 +04:00
|
|
|
|
2012-02-02 00:12:10 +04:00
|
|
|
#-----------------------------------------------------------------------
|
2012-02-01 20:26:48 +04:00
|
|
|
%install
|
2012-02-02 00:12:10 +04:00
|
|
|
install -d -m 755 %{buildroot}%{_gamesbindir}
|
|
|
|
install -m 755 binaries/system/pyrogenesis%{dbg} %{buildroot}%{_gamesbindir}/pyrogenesis%{dbg}
|
2012-02-01 20:26:48 +04:00
|
|
|
|
|
|
|
install -d -m 755 %{buildroot}%{_libdir}/%{name}
|
2012-02-02 00:12:10 +04:00
|
|
|
for name in AtlasUI%{dbg} Collada%{dbg} nvcore nvimage nvmath nvtt; do
|
|
|
|
install -m 755 binaries/system/lib${name}.so %{buildroot}%{_libdir}/%{name}/lib${name}.so
|
|
|
|
done
|
|
|
|
|
|
|
|
install -d -m 755 %{buildroot}%{_gamesdatadir}/applications
|
|
|
|
install -m 644 build/resources/0ad.desktop %{buildroot}%{_gamesdatadir}/applications/%{name}.desktop
|
2012-03-21 05:19:18 +04:00
|
|
|
perl -pi -e 's|%{_bindir}/0ad|%{_gamesbindir}/0ad|;' \
|
|
|
|
%{buildroot}%{_gamesdatadir}/applications/%{name}.desktop
|
2012-02-01 20:26:48 +04:00
|
|
|
|
2012-02-02 00:12:10 +04:00
|
|
|
install -d -m 755 %{buildroot}%{_gamesdatadir}/pixmaps
|
|
|
|
install -m 644 build/resources/0ad.png %{buildroot}%{_gamesdatadir}/pixmaps/%{name}.png
|
2012-02-01 20:26:48 +04:00
|
|
|
|
2012-02-02 00:12:10 +04:00
|
|
|
install -d -m 755 %{buildroot}%{_gamesdatadir}/%{name}
|
|
|
|
cp -a binaries/data/* %{buildroot}%{_gamesdatadir}/%{name}
|
2012-02-01 20:26:48 +04:00
|
|
|
|
2012-03-21 05:19:18 +04:00
|
|
|
mkdir -p %{buildroot}%{_datadir}
|
|
|
|
mv -f %{buildroot}%{_gamesdatadir}/{pixmaps,applications} %{buildroot}%{_datadir}
|
|
|
|
|
2012-02-02 00:12:10 +04:00
|
|
|
cat > %{buildroot}%{_gamesbindir}/0ad <<EOF
|
|
|
|
#!/bin/sh
|
2012-02-01 20:26:48 +04:00
|
|
|
|
2012-02-02 00:12:10 +04:00
|
|
|
cd %{_gamesdatadir}/0ad
|
|
|
|
LD_LIBRARY_PATH=%{_libdir}/0ad %{_gamesbindir}/pyrogenesis%{dbg} "\$@"
|
|
|
|
EOF
|
|
|
|
chmod +x %{buildroot}%{_gamesbindir}/0ad
|
2012-02-01 20:26:48 +04:00
|
|
|
|
2012-02-02 00:12:10 +04:00
|
|
|
%if %{with debug}
|
|
|
|
export EXCLUDE_FROM_FULL_STRIP="libAtlasUI_dbg.so libCollada_dbg.so pyrogenesis_dbg"
|
|
|
|
%endif
|
|
|
|
|
|
|
|
#-----------------------------------------------------------------------
|
2012-02-01 20:26:48 +04:00
|
|
|
%files
|
|
|
|
%doc README.txt LICENSE.txt
|
|
|
|
%doc license_gpl-2.0.txt license_lgpl-2.1.txt license_dbghelp.txt
|
2012-02-02 00:12:10 +04:00
|
|
|
%{_gamesbindir}/0ad
|
|
|
|
%{_gamesbindir}/pyrogenesis%{dbg}
|
2012-02-01 20:26:48 +04:00
|
|
|
%{_libdir}/%{name}
|
2012-03-21 05:19:18 +04:00
|
|
|
%{_datadir}/pixmaps/%{name}.png
|
|
|
|
%{_datadir}/applications/%{name}.desktop
|
2012-02-02 00:12:10 +04:00
|
|
|
%{_gamesdatadir}/%{name}
|
2012-02-01 20:26:48 +04:00
|
|
|
|
|
|
|
|
|
|
|
%changelog
|
2012-07-01 01:15:12 +00:00
|
|
|
* Fri Jun 29 2012 Bernhard Rosenkraenzer <bero@bero.eu> 1:r11863-0.4
|
|
|
|
+ Revision: 807484
|
|
|
|
- Update to alpha 10 (aka 11863)
|
|
|
|
|
|
|
|
* Sat Mar 31 2012 Bernhard Rosenkraenzer <bero@bero.eu> 1:r11339-0.3
|
|
|
|
+ Revision: 788441
|
|
|
|
- Rebuild for boost 1.49
|
|
|
|
|
2012-03-21 05:19:18 +04:00
|
|
|
* Sat Mar 17 2012 Bernhard Rosenkraenzer <bero@bero.eu> 1:r11339-0.2
|
|
|
|
+ Revision: 785456
|
|
|
|
- Update to alpha9
|
|
|
|
|
|
|
|
+ Paulo Andrade <pcpa@mandriva.com.br>
|
|
|
|
- Correct 0ad.desktop binary path.
|
|
|
|
- Install desktop files in proper directory.
|
|
|
|
|
2012-02-02 00:12:10 +04:00
|
|
|
* Sat Jan 14 2012 Paulo Andrade <pcpa@mandriva.com.br> 1:r10803-0.2
|
|
|
|
+ Revision: 760793
|
|
|
|
- Assume latest 0ad-data is installed in _gamesdatadir.
|
|
|
|
- Do not add 0ad libraries to ld library path.
|
|
|
|
|
|
|
|
* Thu Jan 12 2012 Paulo Andrade <pcpa@mandriva.com.br> 1:r10803-0.1
|
|
|
|
+ Revision: 760257
|
|
|
|
- Install binaries in gamesbindir.
|
|
|
|
- Install data files in gamesdatadir.
|
|
|
|
- Use upstream suggested versioning schema.
|
|
|
|
- Use system libraries (but nvtt).
|
|
|
|
- Add build mode to make it easier to debug failures.
|
|
|
|
|
|
|
|
+ Sergey Zhemoitel <serg@mandriva.org>
|
|
|
|
- add new revision 10803
|
|
|
|
- new revision 10288
|
|
|
|
- fix x86_64 requires lib
|
|
|
|
- fix x86_64 requires lib
|
|
|
|
- add new requires
|
|
|
|
- fix enet
|
|
|
|
- fix requires
|
|
|
|
- imported package 0ad
|
|
|
|
- update revesion to 09786
|
|
|
|
|
|
|
|
* Mon Mar 14 2011 Funda Wang <fwang@mandriva.org> 1.0-0.8899.2
|
2012-02-01 20:26:48 +04:00
|
|
|
+ Revision: 644467
|
|
|
|
- rebuild for new boost
|
|
|
|
|
|
|
|
* Mon Feb 14 2011 Guillaume Rousse <guillomovitch@mandriva.org> 1.0-0.8899.1
|
|
|
|
+ Revision: 637689
|
|
|
|
- new snapshot
|
|
|
|
- produce data package from the same snapshot
|
|
|
|
|
|
|
|
* Wed Oct 20 2010 Guillaume Rousse <guillomovitch@mandriva.org> 1.0-0.08413.1mdv2011.0
|
|
|
|
+ Revision: 587053
|
|
|
|
- import 0ad
|
|
|
|
|