Blob Blame History Raw
%define _modular_X %{?modular_X:%modular_X}%{?!modular_X:1}

%define desktop_vendor fedora
%define date           20050318

Summary: 3D multi-player tank battle game
Name: bzflag
Version: 2.0.2
Release: 5
License: GPL
Group: Amusements/Games
URL: http://bzflag.org
Source0: http://ftp.bzflag.org/bzflag/bzflag-%{version}%{?date:.%{date}}.tar.bz2
Source1: bzflag.desktop
Patch0: bzflag-2.0.2-lookup.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-root-%(%{__id_u} -n)
%if %_modular_X
BuildRequires: libXi-devel
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
BuildRequires: SDL-devel
BuildRequires: ncurses-devel
BuildRequires: curl-devel
BuildRequires: adns-devel
# for curl version checking in configure. ugh.
BuildRequires: bc

%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}%{?date:.%{date}}
%patch0 -p1 -b .lookup

%build
# Use PIE because bzflag/bzfs are networked server applications
CFLAGS='-fPIE -pie %optflags -fno-strict-aliasing'
CXXFLAGS='-fPIE -pie %optflags -fno-strict-aliasing'
%configure
make %{?_smp_mflags}

%install
rm -rf %{buildroot}
%makeinstall
install -D -m 644 package/rpm/bzflag-m.xpm \
    %{buildroot}%{_datadir}/pixmaps/bzflag.xpm

mkdir -p %{buildroot}%{_datadir}/applications
desktop-file-install --vendor %{desktop_vendor} --dir %{buildroot}%{_datadir}/applications \
    %{SOURCE1}

%clean
rm -rf %{buildroot}

%files
%defattr(-, root, root, 0755)
%doc AUTHORS BUGS COPYING ChangeLog NEWS README README.Linux
%{_bindir}/bzadmin
%{_bindir}/bzflag
#%{_bindir}/bzfrelay
%{_bindir}/bzfs
%{_datadir}/applications/%{desktop_vendor}-%{name}.desktop
%{_datadir}/bzflag
%{_datadir}/pixmaps/bzflag.xpm
%{_mandir}/man*/*

%changelog
* Thu Nov 17 2005 Nils Philippsen <nphilipp@redhat.com> 2.0.2-5
- rebuild to pick up new openssl version
- prepare for modular X

* 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.