xpilot-ng/xpilot-ng.spec
2006-02-06 17:30:58 +00:00

128 lines
4.1 KiB
RPMSpec

Name: xpilot-ng
Version: 4.7.2
Release: 4%{?dist}
Summary: Multiplayer space arcade game
Group: Amusements/Games
License: GPL
URL: http://xpilot.sourceforge.net
Source0: http://dl.sourceforge.net/sourceforge/xpilot/xpilot-ng-%{version}.tar.gz
Source1: xpilot-ng.png
Source2: xpilot-ng-x11.desktop
Source3: xpilot-ng-sdl.desktop
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: desktop-file-utils
BuildRequires: expat-devel SDL_ttf-devel SDL_image-devel zlib-devel
# The following BR are not needed for FC-4
BuildRequires: libXt-devel mesa-libGLU-devel libXxf86misc-devel
%description
A highly addictive, infinitely configurable multiplayer space
arcade game. You pilot a spaceship around space, dodging
obstacles, shooting players and bots, collecting power-ups, and
causing general mayhem.
%package server
Summary: Server for hosting xpilot games
Group: Amusements/Games
%description server
The xpilot server. This allows you to host xpilot games on your
computer and develop new xpilot maps. This is required if you
are playing alone, but not required if you are joining one of the
public xpilot games hosted on the internet.
%prep
%setup -q
pushd doc/man
iconv --from=ISO-8859-1 --to=UTF-8 xpilot-ng-server.man > xpilot-ng-server.man.new
mv xpilot-ng-server.man.new xpilot-ng-server.man
iconv --from=ISO-8859-1 --to=UTF-8 xpilot-ng-x11.man > xpilot-ng-x11.man.new
mv xpilot-ng-x11.man.new xpilot-ng-x11.man
popd
%build
%configure
make %{?_smp_mflags}
%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT
chmod a+x $RPM_BUILD_ROOT/%{_datadir}/%{name}/mapconvert.py
desktop-file-install --vendor fedora \
--dir ${RPM_BUILD_ROOT}%{_datadir}/applications \
--add-category X-Fedora \
%{SOURCE2}
desktop-file-install --vendor fedora \
--dir ${RPM_BUILD_ROOT}%{_datadir}/applications \
--add-category X-Fedora \
%{SOURCE3}
mkdir -p $RPM_BUILD_ROOT/%{_datadir}/icons/hicolor/48x48/apps/
install -p -m 644 %{SOURCE1} $RPM_BUILD_ROOT/%{_datadir}/icons/hicolor/48x48/apps/
%post
touch --no-create %{_datadir}/icons/hicolor || :
if [ -x %{_bindir}/gtk-update-icon-cache ]; then
%{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
fi
%postun
touch --no-create %{_datadir}/icons/hicolor || :
if [ -x %{_bindir}/gtk-update-icon-cache ]; then
%{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
fi
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root,-)
%{_bindir}/xpilot-ng-replay
%{_bindir}/xpilot-ng-sdl
%{_bindir}/xpilot-ng-x11
%dir %{_datadir}/%{name}
%{_datadir}/%{name}/textures
%{_datadir}/%{name}/fonts
%{_datadir}/applications/*.desktop
%{_datadir}/icons/hicolor/48x48/apps/*.png
%{_mandir}/man6/xpilot-ng-replay.6.gz
%{_mandir}/man6/xpilot-ng-sdl.6.gz
%{_mandir}/man6/xpilot-ng-x11.6.gz
%doc README COPYING
%files server
%defattr(-,root,root,-)
%{_bindir}/xpilot-ng-xp-mapedit
%{_bindir}/xpilot-ng-server
%dir %{_datadir}/%{name}
%{_datadir}/%{name}/defaults.txt
%{_datadir}/%{name}/password.txt
%{_datadir}/%{name}/robots.txt
%{_datadir}/%{name}/shipshapes.txt
%{_datadir}/%{name}/mapconvert.py
%{_datadir}/%{name}/maps
%{_mandir}/man6/xpilot-ng-server.6.gz
%{_mandir}/man6/xpilot-ng-xp-mapedit.6.gz
%doc README COPYING
#The following two entries need to be removed with FC-4
%ghost %{_datadir}/%{name}/mapconvert.pyc
%ghost %{_datadir}/%{name}/mapconvert.pyo
%changelog
* Mon Feb 6 2006 Wart <wart at kobold.org> 4.7.2-5
- Don't make duplicates of the doc files for the subpackage.
- Use version macro is source path
- Preserve timestamps when installing icons.
* Fri Feb 3 2006 Wart <wart at kobold.org> 4.7.2-3
- Add readme and license files to the server subpackage
- Set default file attributes for the server subpackage
* Fri Feb 3 2006 Wart <wart at kobold.org> 4.7.2-2
- Allow both packages to 0wn datadir/xpilot-ng
- Clean up non-utf8 man pages
* Thu Feb 2 2006 Wart <wart at kobold.org> 4.7.2-1
- Initial submission to Fedora Extras