#### options:
# --with/--without options:
# modular_x: rebuild with modular X deps
# opengl_wrapper: use Fedora OpenGL wrapper
# SDL: use SDL (instead of accessing X11, sound devices directly)
#### default options:
%if %{?fedora}%{!?fedora:5} < 5
# default to non-modular X on FC < 5
%bcond_with modular_x
%else
# default to modular X on FC >= 5 and elsewhere
%bcond_without modular_x
%endif
%if %{?fedora}%{!?fedora:7} >= 7
%bcond_with opengl_wrapper
%else
%bcond_without opengl_wrapper
%endif
%if %{?fedora}%{!?fedora:9} >= 9
%define _libcurl_devel 1
%else
%define _libcurl_devel 0
%endif
%bcond_without SDL
%define desktop_vendor fedora
Summary: 3D multi-player tank battle game
Name: bzflag
Version: 2.0.16
Release: 1%{?dist}
License: LGPLv2
Group: Amusements/Games
URL: http://bzflag.org
Source0: http://downloads.sourceforge.net/bzflag/bzflag-%{version}.tar.bz2
Source1: bzflag.desktop
Patch0: bzflag-2.0.12-findresolutions.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-root-%(%{__id_u} -n)
%if %{with modular_x}
BuildRequires: libXxf86vm-devel
BuildRequires: libXext-devel
BuildRequires: libSM-devel
BuildRequires: libICE-devel
BuildRequires: libX11-devel
%else
BuildRequires: xorg-x11-devel
%endif
BuildRequires: libGL-devel
BuildRequires: libGLU-devel
BuildRequires: gcc-c++
BuildRequires: desktop-file-utils
%if %{with SDL}
BuildRequires: SDL-devel
%endif
BuildRequires: ncurses-devel
%if %_libcurl_devel
BuildRequires: libcurl-devel
%else
BuildRequires: curl-devel
%endif
BuildRequires: c-ares-devel
# for curl version checking in configure. ugh.
BuildRequires: bc
%if %{with opengl_wrapper}
BuildRequires: sed
Requires: opengl-games-utils
%endif
%description
BZFlag is a 3D multi-player tank battle game that allows users to play
against each other in a networked environment. There are five teams: red,
green, blue, purple and rogue (rogue tanks are black). Destroying a player
on another team scores a win, while being destroyed or destroying a teammate
scores a loss. Rogues have no teammates (not even other rogues), so they
cannot shoot teammates and they do not have a team score.
There are two main styles of play: capture-the-flag and free-for-all.
%prep
%setup -q -n %{name}-%{version}
%patch0 -p1 -b .findresolutions
%build
# Use PIE because bzflag/bzfs are networked server applications
CFLAGS='-fPIC %{optflags} -fno-strict-aliasing' \
CXXFLAGS='-fPIC %{optflags} -fno-strict-aliasing' \
LDFLAGS='-pie' \
%configure \
%if ! %{with SDL}
--without-SDL \
%endif
--disable-static \
--enable-shared
make %{?_smp_mflags}
%install
rm -rf %{buildroot}
make DESTDIR=%{buildroot} install
install -D -m 644 package/rpm/bzflag-m.xpm \
%{buildroot}%{_datadir}/pixmaps/bzflag.xpm
rm -f %{buildroot}%{_libdir}/bzflag/*.la
rm -f %{buildroot}%{_mandir}/*/bzfquery.*
%if %{with opengl_wrapper}
ln -snf opengl-game-wrapper.sh %{buildroot}%{_bindir}/bzflag-wrapper
sed 's:^Exec=\(.*\)$:Exec=\1-wrapper:g' < %{SOURCE1} > bzflag.desktop
%else
cp -dpf %{SOURCE1} bzflag.desktop
%endif
mkdir -p %{buildroot}%{_datadir}/applications
desktop-file-install --vendor %{desktop_vendor} \
--dir %{buildroot}%{_datadir}/applications \
bzflag.desktop
%clean
rm -rf %{buildroot}
%files
%defattr(-, root, root, 0755)
%doc AUTHORS BUGS COPYING ChangeLog NEWS README README.Linux
%{_bindir}/bzadmin
%{_bindir}/bzflag
%if %{with opengl_wrapper}
%{_bindir}/bzflag-wrapper
%endif
%{_bindir}/bzfs
%dir %{_libdir}/bzflag
%{_libdir}/bzflag/*.so
%{_datadir}/applications/%{desktop_vendor}-%{name}.desktop
%{_datadir}/bzflag
%{_datadir}/pixmaps/bzflag.xpm
%{_mandir}/man*/*
%changelog
* Fri Apr 09 2010 Nils Philippsen <nils@redhat.com> 2.0.16-1
- version 2.0.16
- drop obsolete gold patch
* Tue Mar 03 2010 Nils Philippsen <nils@redhat.com> 2.0.14-1
- explicitly link libraries (#565122, patch by Jeff Makey, slightly modified)
* Tue Feb 16 2010 Nils Philippsen <nils@redhat.com>
- version 2.0.14
- don't run autoreconf
- remove obsolete lookup patch (see
http://sourceforge.net/tracker/index.php?func=detail&aid=1197856&group_id=3248&atid=303248)
- remove obsolete gcc patch
- use --disable-static instead of removing *.a files
- remove bzfquery man page
- sanitize source URL, get rid of %%date
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org>
* - 2.0.12-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
* Mon Mar 02 2009 Nils Philippsen <nils@redhat.com> 2.0.12-5
- fix building with gcc-4.4
* Mon Feb 23 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org>
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
* Mon Dec 22 2008 Nils Philippsen <nils@redhat.com> 2.0.12-4
- use autoreconf -i
* Thu Jul 09 2008 Nils Philippsen <nphilipp@redhat.com> 2.0.12-3
- build with SDL, but fix finding resolutions (#426011)
* Wed Jul 08 2008 Nils Philippsen <nphilipp@redhat.com> 2.0.12-2
- build without SDL (#426011)
* Tue Jul 08 2008 Nils Philippsen <nphilipp@redhat.com> 2.0.12-1
- version 2.0.12
- fix source URL
- drop plugin patch
- use %%bcond_with/_without macros
* Fri Feb 22 2008 Nils Philippsen <nphilipp@redhat.com> 2.0.10-6
- update gcc-4.3 patch (plugins, #434347)
- require libcurl-devel from Fedora 9 onward
* Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 2.0.10-5
- Autorebuild for GCC 4.3
* Fri Jan 04 2008 Nils Philippsen <nphilipp@redhat.com> 2.0.10-4
- fix headers for C++ with gcc-4.3
* Thu Dec 20 2007 Nils Philippsen <nphilipp@redhat.com> 2.0.10-3
- fix global plugin directory
* Wed Dec 19 2007 Nils Philippsen <nphilipp@redhat.com> 2.0.10-2
- build and package plugins
* Mon Dec 17 2007 Nils Philippsen <nphilipp@redhat.com> 2.0.10-1
- version 2.0.10
* Wed Oct 17 2007 Nils Philippsen <nphilipp@redhat.com> 2.0.8-8
- really use opengl-games-wrapper.sh from Fedora 7 on (#304781)
* Tue Oct 16 2007 Nils Philippsen <nphilipp@redhat.com> 2.0.8-7
- use opengl-games-wrapper.sh from Fedora 7 on (#304781)
* Wed Sep 05 2007 Nils Philippsen <nphilipp@redhat.com> 2.0.8-6
- change license tag from LGPL to LGPLv2
* Fri Jun 22 2007 Nils Philippsen <nphilipp@redhat.com>
- change license tag from GPL to LGPL
* Mon Nov 06 2006 Jindrich Novy <jnovy@redhat.com> 2.0.8-4
- rebuild because of the new curl
* Mon Aug 28 2006 Nils Philippsen <nphilipp@redhat.com> 2.0.8-3
- FC6 mass rebuild
* Tue Jul 11 2006 Nils Philippsen <nphilipp@redhat.com> 2.0.8-2
- rebuild to pick up new c-ares version
* Tue May 16 2006 Nils Philippsen <nphilipp@redhat.com> 2.0.8-1
- version 2.0.8
* Fri May 12 2006 Nils Philippsen <nphilipp@redhat.com> 2.0.6-1
- automatically decide between modular/traditional X depending on %%fedora
* Thu May 11 2006 Nils Philippsen <nphilipp@redhat.com>
- version 2.0.6
- add disttag
- remove upstreamed stringdos patch
- adapt %%files
* Fri Feb 17 2006 Nils Philippsen <nphilipp@redhat.com> 2.0.4-3
- rebuild
* Wed Dec 28 2005 Nils Philippsen <nphilipp@redhat.com> 2.0.4-2
- don't crash on maliciously formed callsign, etc. strings (#176626, patch
backported from upstream CVS)
* Mon Nov 21 2005 Nils Philippsen <nphilipp@redhat.com> 2.0.4-1
- version 2.0.4
- update lookup patch
- build require c-ares-devel instead of adns-devel
- add newly introduced libs and includes (but exclude headers and static libs,
courtesy of Matthias Saou)
- use -fPIC, -pie (hopefully) correctly to avoid build problems on x86_64
* Thu Nov 17 2005 Nils Philippsen <nphilipp@redhat.com> 2.0.2-5
- rebuild to pick up new openssl version
- prepare for modular X
- appease ISO C++
* Mon May 09 2005 Nils Philippsen <nphilipp@redhat.com> 2.0.2-4
- build with -fno-strict-aliasing (typo)
* Mon May 09 2005 Nils Philippsen <nphilipp@redhat.com> 2.0.2-3
- build with -fnostrict-aliasing
* Wed Apr 06 2005 Nils Philippsen <nphilipp@redhat.com> 2.0.2-2
- build with adns
- build require libGL-devel and libGLU-devel to hopefully resolve building
problems
- apply name lookup patch
* Wed Mar 23 2005 Nils Philippsen <nphilipp@redhat.com>
- work around missing dependency in xorg-x11-devel
* Wed Mar 23 2005 Nils Philippsen <nphilipp@redhat.com>
- version 2.0.2
* Tue Mar 15 2005 Nils Philippsen <nphilipp@redhat.com> 2.0.0-4
- buildrequire bc for curl version check
* Fri Mar 04 2005 Nils Philippsen <nphilipp@redhat.com>
- move package over to Extras
- make desktop file a file, don't generate it in %%install
- use an a bit more individual build root
- buildrequire curl-devel
* Mon Feb 21 2005 Nils Philippsen <nphilipp@redhat.com> 2.0.0-3
- fix dates in %%changelog
* Fri Feb 18 2005 Nils Philippsen <nphilipp@redhat.com> 2.0.0-2
- build as PIE
* Fri Feb 18 2005 Nils Philippsen <nphilipp@redhat.com> 2.0.0-1
- correct source URL
- buildrequire ncurses-devel
* Tue Jan 18 2005 Nils Philippsen <nphilipp@redhat.com> 2.0.0-0.1
- version 2.0.0.20050117
- buildrequire xorg-x11-devel, not XFree86-devel
* Tue Aug 10 2004 Alan Cox <alan@redhat.com> 1.10.6-2
- Adopted for FC3 core from Matthias Saou's freshrpms package. Thanks
to Matthias for doing all the work.
* Tue May 18 2004 Matthias Saou <http://freshrpms.net/> 1.10.6-1
- Update to 1.10.6.
- First rebuild for Fedora Core 2.
* Thu Mar 25 2004 Matthias Saou <http://freshrpms.net/> 1.10.4-2
- Removed explicit XFree86 dependency.
* Mon Feb 16 2004 Matthias Saou <http://freshrpms.net/> 1.10.4-1
- Update to 1.10.4.20040125, update the included docs.
- Removed no longer existing bzfls file and added bzadmin.
* Fri Nov 7 2003 Matthias Saou <http://freshrpms.net/> 1.7g2-2
- Rebuild for Fedora Core 1.
- Added missing gcc-c++ build dependency.
* Sun Jun 22 2003 Matthias Saou <http://freshrpms.net/>
- Update to 1.7g2.
- Major spec changes for the new build method.
* Tue Apr 1 2003 Matthias Saou <http://freshrpms.net/>
- Fix the Xfree86 dependency, doh!
- Clean up the confusing build.
- Add a system menu entry.
* Mon Mar 31 2003 Matthias Saou <http://freshrpms.net/>
- Update to 1.7g0.
- Rebuilt for Red Hat Linux 9.
* Mon Nov 4 2002 Matthias Saou <http://freshrpms.net/>
- Rebuilt for Red Hat Linux 8.0.
* Wed Jun 19 2002 Matthias Saou <http://freshrpms.net/>
- Update to 1.7e6.
* Wed Feb 13 2002 Matthias Saou <http://freshrpms.net/>
- Initial RPM release.