2005-08-16 17:08:58 +00:00
|
|
|
%define nhgamedir /usr/games/nethack-3.4.3
|
2005-07-19 17:53:54 +00:00
|
|
|
%define nhdatadir /var/games/nethack
|
|
|
|
|
|
|
|
Name: nethack
|
|
|
|
Version: 3.4.3
|
2005-09-08 05:14:29 +00:00
|
|
|
Release: 2%{?dist}
|
2005-08-16 17:08:58 +00:00
|
|
|
Summary: A rogue-like single player dungeon exploration game
|
2005-07-19 17:53:54 +00:00
|
|
|
|
|
|
|
Group: Amusements/Games
|
|
|
|
License: NetHack General Public License
|
|
|
|
URL: http://nethack.org
|
|
|
|
Source0: http://dl.sf.net/%{name}/%{name}-343-src.tgz
|
2005-08-16 17:08:58 +00:00
|
|
|
Source1: %{name}.desktop
|
2005-07-19 17:53:54 +00:00
|
|
|
Patch0: %{name}-%{version}-makefile.patch
|
|
|
|
Patch1: %{name}-%{version}-config.patch
|
2005-09-08 05:14:29 +00:00
|
|
|
Patch2: %{name}-%{version}-x11.patch
|
2005-07-19 17:53:54 +00:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
|
|
|
|
2005-09-08 05:14:29 +00:00
|
|
|
BuildRequires: ncurses-devel
|
|
|
|
BuildRequires: bison, flex, desktop-file-utils
|
|
|
|
BuildRequires: xorg-x11-devel, xorg-x11-font-utils
|
|
|
|
|
2005-07-19 17:53:54 +00:00
|
|
|
Obsoletes: nethack-falconseye <= 1.9.4-6.a
|
|
|
|
|
|
|
|
|
|
|
|
%description
|
|
|
|
NetHack is a single player dungeon exploration game that runs on a
|
|
|
|
wide variety of computer systems, with a variety of graphical and text
|
|
|
|
interfaces all using the same game engine.
|
|
|
|
|
|
|
|
Unlike many other Dungeons & Dragons-inspired games, the emphasis in
|
|
|
|
NetHack is on discovering the detail of the dungeon and not simply
|
|
|
|
killing everything in sight - in fact, killing everything in sight is
|
|
|
|
a good way to die quickly.
|
|
|
|
|
|
|
|
Each game presents a different landscape - the random number generator
|
|
|
|
provides an essentially unlimited number of variations of the dungeon
|
|
|
|
and its denizens to be discovered by the player in one of a number of
|
|
|
|
characters: you can pick your race, your role, and your gender.
|
|
|
|
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q
|
|
|
|
%patch0 -b .makefile
|
|
|
|
%patch1 -b .config
|
2005-09-08 05:14:29 +00:00
|
|
|
%patch2 -b .x11
|
2005-07-19 17:53:54 +00:00
|
|
|
(source sys/unix/setup.sh)
|
|
|
|
|
|
|
|
# Set our paths
|
|
|
|
%{__sed} -i -e "s:^\(HACKDIR=\).*:\1%{nhgamedir}:" sys/unix/nethack.sh
|
|
|
|
%{__sed} -i -e "s:FEDORA_CONFDIR:%{nhgamedir}:" sys/unix/nethack.sh
|
|
|
|
%{__sed} -i -e "s:FEDORA_STATEDIR:%{nhdatadir}:" include/unixconf.h
|
|
|
|
%{__sed} -i -e "s:FEDORA_HACKDIR:%{nhgamedir}:" include/config.h
|
|
|
|
%{__sed} -i -e "s:/usr/games/lib/nethackdir:%{nhgamedir}:" \
|
|
|
|
doc/nethack.6 doc/nethack.txt doc/recover.6 doc/recover.txt
|
|
|
|
|
|
|
|
|
|
|
|
%build
|
|
|
|
make all
|
|
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
|
%makeinstall \
|
|
|
|
GAMEDIR=$RPM_BUILD_ROOT%{nhgamedir} \
|
|
|
|
VARDIR=$RPM_BUILD_ROOT%{nhdatadir} \
|
|
|
|
SHELLDIR=$RPM_BUILD_ROOT%{_bindir} \
|
|
|
|
CHOWN=/bin/true \
|
|
|
|
CHGRP=/bin/true
|
|
|
|
|
2005-08-16 17:08:58 +00:00
|
|
|
rm $RPM_BUILD_ROOT%{nhgamedir}/license
|
2005-07-19 17:53:54 +00:00
|
|
|
rm -rf $RPM_BUILD_ROOT%{nhgamedir}/save
|
|
|
|
mv $RPM_BUILD_ROOT%{nhgamedir}/recover $RPM_BUILD_ROOT%{_bindir}/nethack-recover
|
|
|
|
|
|
|
|
install -d -m 0755 $RPM_BUILD_ROOT%{_mandir}/man6
|
|
|
|
make -C doc MANDIR=$RPM_BUILD_ROOT%{_mandir}/man6 manpages
|
|
|
|
|
|
|
|
install -D -p -m 0644 win/X11/nh_icon.xpm \
|
|
|
|
$RPM_BUILD_ROOT%{_datadir}/pixmaps/nethack.xpm
|
|
|
|
|
|
|
|
desktop-file-install \
|
|
|
|
--vendor fedora \
|
|
|
|
--dir $RPM_BUILD_ROOT%{_datadir}/applications \
|
|
|
|
--add-category X-Fedora \
|
|
|
|
--add-category Application \
|
|
|
|
--add-category Game \
|
2005-08-16 17:08:58 +00:00
|
|
|
%{SOURCE1}
|
2005-07-19 17:53:54 +00:00
|
|
|
|
2005-09-08 05:14:29 +00:00
|
|
|
# Install the fonts for the X11 interface
|
|
|
|
cd win/X11
|
|
|
|
bdftopcf -o nh10.pcf nh10.bdf
|
|
|
|
bdftopcf -o ibm.pcf ibm.bdf
|
2005-09-08 05:50:33 +00:00
|
|
|
install -D -p -m 644 ibm.pcf $RPM_BUILD_ROOT%{nhgamedir}/fonts/ibm.pcf
|
|
|
|
install -D -p -m 644 nh10.pcf $RPM_BUILD_ROOT%{nhgamedir}/fonts/nh10.pcf
|
2005-09-08 05:14:29 +00:00
|
|
|
mkfontdir $RPM_BUILD_ROOT%{nhgamedir}/fonts
|
|
|
|
|
|
|
|
%{__sed} -i -e 's:^!\(NetHack.tile_file.*\):\1:' \
|
|
|
|
$RPM_BUILD_ROOT%{nhgamedir}/NetHack.ad
|
|
|
|
|
2005-07-19 17:53:54 +00:00
|
|
|
|
|
|
|
%clean
|
|
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
|
|
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-,root,root,-)
|
|
|
|
%doc doc/*.txt README dat/license dat/history
|
|
|
|
%doc dat/opthelp dat/wizhelp
|
|
|
|
%{_mandir}/man6/*
|
|
|
|
%{_datadir}/pixmaps/nethack.xpm
|
|
|
|
%{_datadir}/applications/fedora-nethack.desktop
|
|
|
|
%{nhgamedir}/nhdat
|
|
|
|
%{_bindir}/nethack
|
|
|
|
%{_bindir}/nethack-recover
|
2005-09-08 05:14:29 +00:00
|
|
|
%{nhgamedir}/NetHack.ad
|
|
|
|
%{nhgamedir}/pet_mark.xbm
|
|
|
|
%{nhgamedir}/rip.xpm
|
|
|
|
%{nhgamedir}/x11tiles
|
2005-09-08 05:50:33 +00:00
|
|
|
%{nhgamedir}/fonts/
|
2005-07-19 17:53:54 +00:00
|
|
|
%defattr(0664,root,games)
|
|
|
|
%config(noreplace) %{nhdatadir}/record
|
|
|
|
%config(noreplace) %{nhdatadir}/perm
|
|
|
|
%config(noreplace) %{nhdatadir}/logfile
|
|
|
|
%attr(0775,root,games) %dir %{nhdatadir}
|
|
|
|
%attr(0775,root,games) %dir %{nhdatadir}/save
|
|
|
|
%attr(2755,root,games) %{nhgamedir}/nethack
|
|
|
|
|
|
|
|
|
|
|
|
%changelog
|
2005-09-08 05:14:29 +00:00
|
|
|
* Tue Sep 06 2005 Luke Macken <lmacken@redhat.com> 3.4.3-2
|
|
|
|
- Enable x11 support
|
|
|
|
|
2005-07-19 17:53:54 +00:00
|
|
|
* Sun Jul 10 2005 Luke Macken <lmacken@redhat.com> 3.4.3-1
|
|
|
|
- Initial package for Fedora Extras
|