Name: btanks Version: 0.9.8083 Release: %mkrel 4 Summary: Funny battle on your desk Group: Games/Arcade # Libraries clunk, mrt and sdlx are under LGPLv2+, all other sources are GPLv2+ License: GPLv2+ with exceptions and LGPLv2+ URL: http://btanks.sourceforge.net/ Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.bz2 # Remove RPath from binaries Patch0: %{name}-remove-rpath.patch # Disable video previews of map levels (we don't distribute video anyway) Patch1: %{name}-disable-smpeg.patch # Avoid problem with lib checks using c++ instead of c. Patch2: %{name}-libcheck.patch # Don't override Fedora's options Patch3: %{name}-excessopts.patch # gcc is now more picky about casting Patch4: %{name}-gcc.patch # bted doesn't explicitly link to clunl Patch5: %{name}-dso.patch Patch6: %{name}-gcc4.7.patch Requires: %{name}-data = %{version}-%{release} BuildRequires: MesaGLU-devel SDL-devel SDL_image-devel expat-devel BuildRequires: libvorbis-devel lua5.1-devel zlib-devel scons zip dos2unix # Disabled video previews of map levels BuildRequires: smpeg-devel %description Battle Tanks is a funny battle on your desk, where you can choose one of three vehicles and eliminate your enemy using the whole arsenal of weapons. has original cartoon-like graphics and cool music, it is fun and dynamic, it has several network modes for deathmatch and cooperative. What else is needed to have fun with your friends? And all is packed and ready for you in Battle Tanks. %package data Summary: Data files for %{name} Group: Games/Arcade Requires: %{name} = %{version}-%{release} BuildArch: noarch %description data The %{name}-data package contains data files that are needed for running %{name}. %prep %setup -q %patch0 -b .remove-rpath %patch1 -b .disable-smpeg %patch2 -b .libcheck %patch3 -b .excessopts %patch4 -b .gcc %patch5 -b .dso %patch6 -p1 -b .gcc47 dos2unix -k *.txt ChangeLog *.url LICENSE LICENSE.EXCEPTION iconv -f latin1 -t utf-8 LICENSE.EXCEPTION > LICENSE.EXCEPTION.new touch -r LICENSE.EXCEPTION{,.new} mv -f LICENSE.EXCEPTION{.new,} iconv -f latin1 -t utf-8 README-fr.txt > README-fr.txt.new touch -r README-fr.txt{,.new} mv -f README-fr.txt{.new,} iconv -f cp1251 -t utf-8 README-ru.txt > README-ru.txt.new touch -r README-ru.txt{,.new} mv -f README-ru.txt{.new,} %build # flags need to be passed via environment or they get treated as a single # word rather than as multiple arguments. CXXFLAGS is only needed if # there are c++ only flags that need to get added. export CFLAGS="%{optflags}"; \ scons %{?_smp_mflags} \ prefix=%{_prefix} \ lib_dir=%{_libdir} \ plugins_dir=%{_libdir}/%{name} \ resources_dir=%{_gamesdatadir}/%{name} \ mode=release \ enable_lua=true %install # binaries install -dm 755 %{buildroot}%{_gamesbindir} install -m 755 build/release/engine/%{name} %{buildroot}%{_gamesbindir} install -m 755 build/release/editor/bted %{buildroot}%{_gamesbindir} # libs install -dm 755 %{buildroot}%{_libdir}/%{name} install -m 755 build/release/engine/libbtanks_engine.so %{buildroot}%{_libdir} install -m 755 build/release/mrt/libmrt.so %{buildroot}%{_libdir} install -m 755 build/release/sdlx/libsdlx.so %{buildroot}%{_libdir} install -m 755 build/release/clunk/libclunk.so %{buildroot}%{_libdir} # plugins install -m 755 build/release/objects/libbt_objects.so %{buildroot}%{_libdir}/%{name} # data-files (see pack-resources.sh) install -dm 755 %{buildroot}%{_gamesdatadir}/%{name} install -dm 755 %{buildroot}%{_gamesdatadir}/%{name}/data pushd data find . \( -wholename \*.svn\* -or -name \*.wav \) -exec rm -rf {} \; cp -pR * %{buildroot}%{_gamesdatadir}/%{name}/data #zip -q -0 -r ../resources.dat * -x \*.svn\* -x \*.wav popd #install -m 644 resources.dat %{buildroot}%{_datadir}/%{name} # icon install -dm 755 %{buildroot}%{_datadir}/pixmaps install -D data/tiles/icon.png %{buildroot}%{_iconsdir}/%{name}.png # menu-entries install -d %{buildroot}%{_datadir}/applications cat > %{buildroot}%{_datadir}/applications/%{_real_vendor}-%{name}.desktop << EOF [Desktop Entry] Name=Battle Tanks Comment=Battle Tanks is a funny battle on your desk Exec=%{_gamesbindir}/%{name} Icon=%{gname} Terminal=false Type=Application StartupNotify=true Categories=Game;ArcadeGame; EOF cat > %{buildroot}%{_datadir}/applications/%{_real_vendor}-bted.desktop << EOF [Desktop Entry] Name=Battle Tanks map editor Comment=Battle Tanks map editor Exec=%{_gamesbindir}/bted Icon=/%{name} Terminal=false Type=Application StartupNotify=true Categories=Game;ArcadeGame; EOF %files %doc README-{editor,en,fr,ru}.txt ChangeLog *.url LICENSE LICENSE.EXCEPTION %{_gamesbindir}/%{name} %{_gamesbindir}/bted %{_libdir}/*.so %dir %{_libdir}/%{name} %{_libdir}/%{name}/*.so %{_iconsdir}/%{name}.png %{_datadir}/applications/%{_real_vendor}-%{name}.desktop %{_datadir}/applications/%{_real_vendor}-bted.desktop %files data %dir %{_gamesdatadir}/%{name} %{_gamesdatadir}/%{name}/data %changelog * Fri Jan 11 2013 umeabot <umeabot> 0.9.8083-4.mga3 + Revision: 347209 - Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild * Tue Jan 08 2013 sander85 <sander85> 0.9.8083-3.mga3 + Revision: 343066 - Switch BR to lua5.1 - Fix build with GCC 4.7 * Mon Nov 14 2011 zezinho <zezinho> 0.9.8083-2.mga2 + Revision: 167610 - imported package btanks