# NOT relocatable %define name crossfire %define version 1.0.0 %define release 3mdk %define _prefix /usr # Ugly but spec will be much cleaner, better not use macros here %define _bindir /usr/games %define _datadir /usr/share/games %define _libdir /usr/share/games %define _localstatedir /var/lib/games Name: %{name} Version: %{version} Release: %{release} Summary: Role-playing graphical adventure game. Group: Games/Adventure License: GPL URL: http://crossfire.real-time.com Source: ftp://ftp.scruz.net/users/mwedel/public/%{name}-%{version}.tar.bz2 Source1: %{name}.init Patch: %{name}-1.0.0-checklibrary.patch.bz2 Patch1: %{name}-0.98.0-config.patch.bz2 Patch2: %{name}-0.98.0-fhs.patch.bz2 Patch3: %{name}-0.98.0-crossloop.patch.bz2 Patch4: %{name}-1.0.0-Gloves_of_Havoc.patch.bz2 Patch5: %{name}-1.0.0-door.patch.bz2 Patch6: %{name}-1.0.0-snake.patch.bz2 Patch7: %{name}-1.0.0-README.patch.bz2 BuildRoot: %{_tmppath}/%{name}-buildroot Requires: %{name}-maps = %{version} %description Crossfire is a highly graphical role-playing adventure game with characteristics reminiscent of rogue, nethack, omega, and gauntlet. It has multiplayer capability and presently runs under X11. %package crossedit Summary: Map editor for Crossfire. Group: Games/Adventure BuildRequires: libpng3-devel zlib1-devel libxpm4-devel XFree86-devel Requires: %{name} = %{version} %description crossedit Crossfire is a highly graphical role-playing adventure game with characteristics reminiscent of rogue, nethack, omega, and gauntlet. It has multiplayer capability and presently runs under X11. This package contains crossedit, a map editor for crossfire. %prep %setup %patch -p1 -b .checklibrary %patch1 -p1 -b .config %patch2 -p1 -b .fhs # %patch3 -p1 -b .crossloop %patch4 -p1 -b .gloves %patch5 -p1 -b .doorexit %patch6 -p1 -b .snake %patch7 -p1 # required by patch0 autoconf %build find . -type f | xargs file | grep 'perl script' | cut -d: -f1 | \ xargs -r perl -pi -e 's,^#!\s*/usr/local/bin/perl,#!/usr/bin/perl,' %serverbuild %configure %make localdir=%{_localstatedir}/crossfire # Save some space find doc -type f -name '*.ps' | xargs -r gzip %install rm -rf $RPM_BUILD_ROOT %makeinstall datadir=${RPM_BUILD_ROOT}%{_datadir}/crossfire \ libdir=${RPM_BUILD_ROOT}%{_libdir}/crossfire \ localdir=${RPM_BUILD_ROOT}%{_localstatedir}/crossfire install -D -m 755 %{SOURCE1} ${RPM_BUILD_ROOT}%{_initrddir}/%{name} find $RPM_BUILD_ROOT%{_gamesbindir}/ -type f | xargs file | grep script | \ cut -d: -f1 | xargs -r perl -pi -e "s|$RPM_BUILD_ROOT||" touch ${RPM_BUILD_ROOT}%{_localstatedir}/crossfire/temp.maps # The following comment is from previous packager: # I've started saving the temp-maps in this directory to protect them between # invocations of crossfire. mkdir -p ${RPM_BUILD_ROOT}%{_localstatedir}/crossfire/temp-maps mkdir -p ${RPM_BUILD_ROOT}/var/log/%{name} mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}/%{name} # move configs to /etc, rpmlint will be happier for i in ban_file dm_file forbid motd settings; do mv ${RPM_BUILD_ROOT}%{_datadir}/crossfire/$i ${RPM_BUILD_ROOT}%{_sysconfdir}/%{name}/ ln -sf ../../../..%{_sysconfdir}/%{name}/$i ${RPM_BUILD_ROOT}%{_datadir}/crossfire/$i done # unwanted ? rm -rf $RPM_BUILD_ROOT/%_prefix/games/add_throw rm -rf $RPM_BUILD_ROOT/%_prefix/games/crossloop.pl rm -rf $RPM_BUILD_ROOT/%_prefix/games/flushlocks %clean rm -rf ${RPM_BUILD_ROOT} %post %_post_service crossfire %preun %_preun_service crossfire %files %defattr(0755,root,root) # %{_gamesbindir}/add_throw # %{_gamesbindir}/crossloop.pl # %{_gamesbindir}/flushlocks %{_gamesbindir}/crossloop %{_gamesbindir}/random_map %attr(2111,games,games) %{_gamesbindir}/crossfire %config(noreplace) %{_initrddir}/%{name} %defattr(0644,root,root,0755) %dir %{_sysconfdir}/%{name} %config(noreplace) %{_sysconfdir}/%{name}/ban_file %config(noreplace) %{_sysconfdir}/%{name}/dm_file %config(noreplace) %{_sysconfdir}/%{name}/forbid %config(noreplace) %{_sysconfdir}/%{name}/motd %config(noreplace) %{_sysconfdir}/%{name}/settings %{_datadir}/crossfire %dir %attr(0770,games,games) /var/log/crossfire %{_mandir}/man?/* %doc CHANGES CREDITS DEVELOPERS README License TODO INSTALL doc %defattr(660,games,games,2770) %{_localstatedir}/crossfire %files crossedit %defattr(0755,root,root) %{_gamesbindir}/crossedit %{_gamesbindir}/mktable %{_gamesbindir}/collect.pl %{_gamesbindir}/util.pl %{_gamesbindir}/xpmtopix.pl %changelog * Thu Jan 23 2003 Lenny Cartier <lenny@mandrakesoft.com> 1.0.0-3mdk - rebuild * Wed Jun 12 2002 Lenny Cartier <lenny@mandrakesoft.com> 1.0.0-2mdk - buildrequires on libpng3 * Tue May 29 2001 Lenny Cartier <lenny@mandrakesoft.com> 1.0.0-1mdk - added in contribs by Abel Cheung <maddog@linux.org.hk> : - 1.0.0 -- Hurray! - First mandrake package, spec rewrite (taken from previous package) - Ancient patches removed - New patch 0-3 (patch3 should be unnecessary), and patch 4-7 from CVS - Modified init script: - add condrestart - don't use crossloop script to rerun crossfire if crossfire crashes - Removed obsolete doc - Remove add_throw and flushlocks, seems to be obsolete - Add collect.pl util.pl xpmtopix.pl, not sure it's usage so keep it for now - Splitted maps as new source rpm, and add "Requires: crossfire-maps" - Move config files to /etc/crossfire to make rpmlint happy - Gzip'ed postscript to save some little space - Split crossedit(and other misc utils) into separate package * Tue Mar 16 1999 Toshio Kuratomi <badger@prtr-13.ucsc.edu> [0.95.2-5] - Edited the patch files to get rid of redundancies and excesses. - Moved files around to conform to the File Hierarchy Standard 2.0 - Changed portions of the spec to use configure to set up the directory structure rather than having to construct it manually. - No longer package crossloop.pl as it is outdated by the newer crossloop shell script. - Moved the tmp directory to be in /var/lib/games/crossfire/temp-maps... This way the temp maps are all in the var directory for reuse. I don't think crossfire keeps any other temp files around. - Remove crossserv as it isn't necessary to the operation of crossfire as a server. (Instead set crossfire setuid/gruid games. - Edit the crossfire.init script to reflect the absence of crossserv. - Add maps to the package. Will not run without this (but maybe it should be in a subpackage.) * Sun Jan 31 1999 Kjetil Wiekhorst Jørgensen <jorgens+rpm@pvv.org> [0.95.2-1] - upgraded to version 0.95.2 * Fri Sep 4 1998 Kjetil Wiekhorst Jørgensen <jorgens+rpm@pvv.org> [0.95.1-1] - upgraded to version 0.95.1 - fixed some minor bugs in the distribution - dead is no longer final due to a bug in that code * Fri Sep 4 1998 Kjetil Wiekhorst Jørgensen <jorgens+rpm@pvv.org> [0.94.3-1] - upgraded to version 0.94.3 - moved some files around (static files to /usr/lib/games/crossfire and dynamic files to /var/lib/games/crossfire) * Mon Jun 01 1998 Kjetil Wiekhorst Jørgensen <jorgens+rpm@pvv.org> - upgraded to 0.94.2. - removed the client stuff, since crossfire has become client/server based. * Sat Apr 25 1998 Kjetil Wiekhorst Jørgensen <jorgens+rpm@pvv.org> - upgraded to 0.94.1. * Sat Feb 08 1998 Kjetil Wiekhorst Jørgensen <jorgens+rpm@zarhan.pvv.org> - added the missing space between the number and the item name. - fixed a bug which will allow the code to compile even if the ERIC_SERVER isn't defined. * Sat Feb 08 1998 Kjetil Wiekhorst Jørgensen <jorgens+rpm@zarhan.pvv.org> - version 0.94.0 - minor bugfix in server code. * Sat Feb 08 1998 Kjetil Wiekhorst Jørgensen <jorgens+rpm@zarhan.pvv.org> - new specfile for crossfire.