Sophie

Sophie

distrib > Mageia > 5 > i586 > by-pkgid > 80fe3c64d6dac33550b704c05b44a6e4 > files > 9

btanks-0.9.8083-8.mga5.src.rpm

Name:		btanks
Version:	0.9.8083
Release:	%mkrel 8
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 
BuildRequires:	SDL-devel 
BuildRequires:	SDL_image-devel 
BuildRequires:	expat-devel
BuildRequires:	libvorbis-devel 
BuildRequires:	lua5.1-devel 
BuildRequires:	zlib-devel 
BuildRequires:	scons 
BuildRequires:	zip 
BuildRequires:	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/%{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/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/%{name}.desktop
%{_datadir}/applications/bted.desktop

%files data
%dir %{_gamesdatadir}/%{name}
%{_gamesdatadir}/%{name}/data


%changelog
* Wed Oct 15 2014 umeabot <umeabot> 0.9.8083-8.mga5
+ Revision: 744890
- Second Mageia 5 Mass Rebuild

* Thu Sep 18 2014 umeabot <umeabot> 0.9.8083-7.mga5
+ Revision: 693517
- Rebuild to fix library dependencies

* Tue Sep 16 2014 umeabot <umeabot> 0.9.8083-6.mga5
+ Revision: 678234
- Mageia 5 Mass Rebuild

* Fri Oct 18 2013 umeabot <umeabot> 0.9.8083-5.mga4
+ Revision: 503167
- Mageia 4 Mass Rebuild

* 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


* Sat Jun 25 2011 Bruno Wolff III <bruno@wolff.to> - 0.9.8083-1
- Update to 0.9.8083 - bug 602387
- Release notice: http://btanks.sourceforge.net/blog/2009/12/30/battletanks-09-was-just-released/
- EXCEPTION changed to LICENSE.EXCEPTION
- Pass flags via environment so that they get split
- Fix issues with gcc being more picky about stuff
- engine lib had a name change
- Fix FTBFS - bug 715853
- bted and btanks don't explicitly link clunk

* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.8.7686-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild

* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.8.7686-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild

* Fri Apr 03 2009 Alexey Torkhov <atorkhov@gmail.com> - 0.8.7686-10
- Make btanks-data noarch
- Rename libbt.so to libbtanks.so because of conflict with blackbox

* Wed Mar 18 2009 Alexey Torkhov <atorkhov@gmail.com> - 0.8.7686-8
- Package data as separate files instead of big zip blob

* Tue Mar 17 2009 Alexey Torkhov <atorkhov@gmail.com> - 0.8.7686-7
- Add forgotten desktop-file-utils build requires
- Fixing bad BuildRoot

* Tue Mar 17 2009 Alexey Torkhov <atorkhov@gmail.com> - 0.8.7686-6
- Fixed source url
- Properly installing desktop files

* Tue Mar 17 2009 Alexey Torkhov <atorkhov@gmail.com> - 0.8.7686-5
- Add license for libraries

* Tue Mar 17 2009 Alexey Torkhov <atorkhov@gmail.com> - 0.8.7686-4
- Split data to subpackage instead of libs

* Tue Mar 17 2009 Alexey Torkhov <atorkhov@gmail.com> - 0.8.7686-3
- Add patch backups
- Simplify scripts a bit
- Move libs to -libs subpackage to ensure better work in multilib environment
- Cleanier remove-smpeg patch

* Wed Mar 11 2009 Alexey Torkhov <atorkhov@gmail.com> - 0.8.7686-2
- Updated package to conform packaging guidelines

* Tue Oct 28 2008 Arkady L. Shane <ashejn@yandex-team.ru> - 0.8.7686-1
- update to 0.8.7686