nethack/nethack.spec

254 lines
8.0 KiB
RPMSpec
Raw Normal View History

%global nhgamedir /usr/games/nethack-3.4.3
%global nhdatadir /var/games/nethack
%global fontname nethack-bitmap
Name: nethack
Version: 3.4.3
Release: 27%{?dist}
Summary: A rogue-like single player dungeon exploration game
Group: Amusements/Games
2008-08-11 18:51:35 +00:00
License: NGPL
URL: http://nethack.org
2010-01-11 16:04:12 +00:00
Source0: http://downloads.sourceforge.net/%{name}/%{name}-343-src.tgz
Source1: %{name}.desktop
Patch0: %{name}-%{version}-makefile.patch
Patch1: %{name}-%{version}-config.patch
2005-09-08 05:14:29 +00:00
Patch2: %{name}-%{version}-x11.patch
Patch3: %{name}-%{version}-guidebook.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Requires: %{fontname}-fonts-core
BuildRequires: ncurses-devel
2005-09-08 05:14:29 +00:00
BuildRequires: bison, flex, desktop-file-utils
2005-11-11 18:31:40 +00:00
BuildRequires: bdftopcf, mkfontdir, libX11-devel, libXaw-devel, libXext-devel
BuildRequires: libXmu-devel, libXpm-devel, libXt-devel
BuildRequires: fontpackages-devel
2005-09-08 05:14:29 +00:00
%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.
%package -n %{fontname}-fonts
Summary: Bitmap fonts for Nethack
Group: User Interface/X
BuildArch: noarch
Requires: fontpackages-filesystem
%description -n %{fontname}-fonts
Bitmap fonts for Nethack.
%package -n %{fontname}-fonts-core
Summary: X11 core fonts configuration for %{fontname}
Group: User Interface/X
BuildArch: noarch
Requires: %{fontname}-fonts
Requires(post): %{fontname}-fonts
Requires(post): xorg-x11-font-utils
Requires(post): coreutils
Requires(preun): coreutils
%description -n %{fontname}-fonts-core
X11 core fonts configuration for %{fontname}.
%prep
%setup -q
%patch0 -b .makefile
%patch1 -b .config
2005-09-08 05:14:29 +00:00
%patch2 -b .x11
%patch3 -b .guidebook
(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
# Point the linker in the right direction
%{__sed} -i -e "s:-L/usr/X11R6/lib:-L/usr/X11R6/%{_lib}:" \
src/Makefile util/Makefile
%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
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 Game \
--add-category RolePlaying \
%{SOURCE1}
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
install -m 0755 -d $RPM_BUILD_ROOT%{_fontdir}
install -m 0644 -p *.pcf $RPM_BUILD_ROOT%{_fontdir}
2005-09-08 05:14:29 +00:00
%{__sed} -i -e 's:^!\(NetHack.tile_file.*\):\1:' \
$RPM_BUILD_ROOT%{nhgamedir}/NetHack.ad
%post -n %{fontname}-fonts-core
mkfontdir %{_fontdir}
if [ ! -L /etc/X11/fontpath.d/nethack ] ; then
ln -s %{_fontdir} /etc/X11/fontpath.d/nethack
fi
2005-11-11 18:31:40 +00:00
%preun -n %{fontname}-fonts-core
if [ $1 -eq 0 ] ; then
rm /etc/X11/fontpath.d/nethack
rm %{_fontdir}/fonts.dir
fi;
%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
2006-10-16 22:38:48 +00:00
%{nhgamedir}
%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
%_font_pkg -n bitmap *.pcf
%files -n %{fontname}-fonts-core
%defattr(-,root,root,-)
%changelog
* Fri Jul 20 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.4.3-27
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.4.3-26
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.4.3-25
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
2010-01-11 16:04:12 +00:00
* Mon Jan 11 2010 Luke Macken <lmacken@redhat.com> - 3.4.3-24
- Fix the source URL
* Tue Sep 01 2009 Luke Macken <lmacken@redhat.com> - 3.4.3-23
- Fix the categories for the nethack desktop entry (#485362)
* Sat Jul 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.4.3-22
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
* Fri Jul 10 2009 Luke Macken <lmacken@redhat.com> - 3.4.3-21
- Apply a patch from Iain Arnell to update our spec to comply with
the new font packaging guidelines (#505613)
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.4.3-20
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
2009-02-18 18:50:14 +00:00
* Wed Feb 18 2009 Jochen Schmitt <Jochen herr-schmitt de> - 3.4.3-19
- Add missing Requires
2008-08-11 18:51:35 +00:00
* Mon Aug 11 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 3.4.3-18
- fix license tag
2008-02-09 02:19:40 +00:00
* Fri Feb 8 2008 Luke Macken <lmacken@redhat.com> - 3.4.3-17
2008-02-09 02:18:37 +00:00
- Rebuild for gcc 4.3
* Thu Jan 17 2008 Luke Macken <lmacken@redhat.com> 3.4.3-16
- Create a symlink to our fonts in /etc/X11/fontpath.d (Bug #221692)
2007-08-21 20:35:11 +00:00
* Tue Aug 21 2007 Luke Macken <lmacken@redhat.com> 3.4.3-15
- Rebuild
2007-07-09 17:08:31 +00:00
* Mon Jul 9 2007 Luke Macken <lmacken@redhat.com> 3.4.3-14
- Fix nethack.desktop (Bug #247373)
2007-07-08 07:11:03 +00:00
* Sun Jul 08 2007 Florian La Roche <laroche@redhat.com> 3.4.3-13
- require xorg-x11-font-utils (to run mkfontdir) for post script
2006-10-16 22:38:48 +00:00
* Mon Oct 16 2006 Luke Macken <lmacken@redhat.com> 3.4.3-12
- Own /usr/games/nethack-3.4.3
2006-09-03 18:56:59 +00:00
* Sun Sep 3 2006 Luke Macken <lmacken@redhat.com> 3.4.3-11
- Rebuild for FC6
* Mon Apr 10 2006 Luke Macken <lmacken@redhat.com> 3.4.3-10
- Remove $RPM_BUILD_ROOT from %post (Bug #188008)
* Wed Feb 15 2006 Luke Macken <lmacken@redhat.com> 3.4.3-9
- Add nethack-3.4.3-guidebook.patch to fix issues with generating the Guidebook
(this patch also removes the need for our groff dep)
2006-02-15 15:07:05 +00:00
* Wed Feb 15 2006 Luke Macken <lmacken@redhat.com> 3.4.3-8
- Add groff to BuildRequires
2006-02-14 23:21:01 +00:00
* Tue Feb 14 2006 Luke Macken <lmacken@redhat.com> 3.4.3-7
- Rebuild for FE5
2005-12-27 17:40:56 +00:00
* Tue Dec 27 2005 Luke Macken <lmacken@redhat.com> 3.4.3-6
- Rebuild
* Wed Nov 23 2005 Luke Macken <lmacken@redhat.com> 3.4.3-5
- Keep the license in the game directory (Bug #173385)
- Don't obsolete falconseye anymore (Bug #173385)
2005-11-11 18:31:40 +00:00
* Fri Nov 11 2005 Luke Macken <lmacken@redhat.com> 3.4.3-4
- Utilize modular xorg
2005-09-08 06:37:02 +00:00
* Thu Sep 08 2005 Luke Macken <lmacken@redhat.com> 3.4.3-3
2005-09-08 17:20:30 +00:00
- Point linker in the right direction using %%{_lib} to fix x86_64 build issues
2005-09-08 06:37:02 +00:00
2005-09-08 05:14:29 +00:00
* Tue Sep 06 2005 Luke Macken <lmacken@redhat.com> 3.4.3-2
- Enable x11 support
* Sun Jul 10 2005 Luke Macken <lmacken@redhat.com> 3.4.3-1
- Initial package for Fedora Extras