First working build of Nethack 3.6.0 using my original changes

This commit is contained in:
Ron Olson 2017-05-21 16:29:20 -05:00
parent f3368dba29
commit 2e10103321
9 changed files with 245 additions and 290 deletions

View File

@ -1,116 +0,0 @@
--- include/config.h.orig 2003-12-07 18:39:13.000000000 -0500
+++ include/config.h 2005-06-25 20:21:41.000000000 -0400
@@ -143,10 +143,10 @@
#ifndef WIZARD /* allow for compile-time or Makefile changes */
# ifndef KR1ED
-# define WIZARD "wizard" /* the person allowed to use the -D option */
+# define WIZARD "games" /* the person allowed to use the -D option */
# else
# define WIZARD
-# define WIZARD_NAME "wizard"
+# define WIZARD_NAME "games"
# endif
#endif
@@ -169,8 +169,8 @@
#ifdef UNIX
/* path and file name extension for compression program */
-#define COMPRESS "/usr/bin/compress" /* Lempel-Ziv compression */
-#define COMPRESS_EXTENSION ".Z" /* compress's extension */
+#define COMPRESS "/usr/bin/bzip2" /* Lempel-Ziv compression */
+#define COMPRESS_EXTENSION ".bz2" /* compress's extension */
/* An example of one alternative you might want to use: */
/* #define COMPRESS "/usr/local/bin/gzip" */ /* FSF gzip compression */
/* #define COMPRESS_EXTENSION ".gz" */ /* normal gzip extension */
@@ -185,7 +185,7 @@
* a tar-like file, thus making a neater installation. See *conf.h
* for detailed configuration.
*/
-/* #define DLB */ /* not supported on all platforms */
+#define DLB /* not supported on all platforms */
/*
* Defining INSURANCE slows down level changes, but allows games that
@@ -204,7 +204,7 @@
* otherwise it will be the current directory.
*/
# ifndef HACKDIR
-# define HACKDIR "/usr/games/lib/nethackdir"
+# define HACKDIR "FEDORA_HACKDIR"
# endif
/*
@@ -214,7 +214,7 @@
* since the user might create files in a directory of his choice.
* Of course SECURE is meaningful only if HACKDIR is defined.
*/
-/* #define SECURE */ /* do setuid(getuid()) after chdir() */
+#define SECURE /* do setuid(getuid()) after chdir() */
/*
* If it is desirable to limit the number of people that can play Hack
@@ -300,7 +300,7 @@
* functions that have been macroized.
*/
-/* #define VISION_TABLES */ /* use vision tables generated at compile time */
+#define VISION_TABLES /* use vision tables generated at compile time */
#ifndef VISION_TABLES
# ifndef NO_MACRO_CPATH
# define MACRO_CPATH /* use clear_path macros instead of functions */
@@ -338,7 +338,7 @@
#endif
#define EXP_ON_BOTL /* Show experience on bottom line */
-/* #define SCORE_ON_BOTL */ /* added by Gary Erickson (erickson@ucivax) */
+#define SCORE_ON_BOTL /* added by Gary Erickson (erickson@ucivax) */
/*
* Section 5: EXPERIMENTAL STUFF
--- include/unixconf.h.orig 2003-12-07 18:39:13.000000000 -0500
+++ include/unixconf.h 2005-06-25 20:23:26.000000000 -0400
@@ -37,7 +37,7 @@
#define NETWORK /* if running on a networked system */
/* e.g. Suns sharing a playground through NFS */
/* #define SUNOS4 */ /* SunOS 4.x */
-/* #define LINUX */ /* Another Unix clone */
+#define LINUX /* Another Unix clone */
/* #define CYGWIN32 */ /* Unix on Win32 -- use with case sensitive defines */
/* #define GENIX */ /* Yet Another Unix Clone */
/* #define HISX */ /* Bull Unix for XPS Machines */
@@ -96,13 +96,13 @@
*/
/* #define NO_FILE_LINKS */ /* if no hard links */
-/* #define LOCKDIR "/usr/games/lib/nethackdir" */ /* where to put locks */
+#define LOCKDIR "FEDORA_STATEDIR" /* where to put locks */
/*
* If you want the static parts of your playground on a read-only file
* system, define VAR_PLAYGROUND to be where the variable parts are kept.
*/
-/* #define VAR_PLAYGROUND "/var/lib/games/nethack" */
+#define VAR_PLAYGROUND "FEDORA_STATEDIR"
/*
@@ -132,7 +132,7 @@
* "extra output" method is used, but not all systems provide access to
* a fine-grained timer.
*/
-/* #define TIMED_DELAY */ /* usleep() */
+#define TIMED_DELAY /* usleep() */
#endif
/*
@@ -204,7 +204,7 @@
* You can also include any other strange options your compress needs.
* If you have a normal compress, just leave it commented out.
*/
-/* #define COMPRESS_OPTIONS "-q" */
+#define COMPRESS_OPTIONS "-q9"
#endif
#define FCMASK 0660 /* file creation mask */

View File

@ -1,15 +0,0 @@
--- sys/unix/Makefile.doc.orig 2006-02-15 16:47:41.000000000 -0500
+++ sys/unix/Makefile.doc 2006-02-15 16:47:52.000000000 -0500
@@ -20,10 +20,10 @@
# Use the "cat" GUIDECMD if nroff and/or tbl and/or col are not installed
# Not appropriate for creating Guidebook.txt.
-# GUIDECMD = cat Guidebook.txt
+GUIDECMD = cat Guidebook.txt
# The following works better with groff-1.18, eg on Linux
# GUIDECMD = tbl tmac.n Guidebook.mn | nroff -c -Tascii | $(COLCMD)
-GUIDECMD = tbl tmac.n Guidebook.mn | nroff | $(COLCMD)
+# GUIDECMD = tbl tmac.n Guidebook.mn | nroff | $(COLCMD)
# the basic guidebook
Guidebook: Guidebook.mn

View File

@ -1,98 +0,0 @@
--- sys/unix/Makefile.src.orig 2005-06-23 14:57:08.000000000 -0400
+++ sys/unix/Makefile.src 2005-06-23 15:03:21.000000000 -0400
@@ -124,8 +124,8 @@
# flags for Linux
# compile normally
-# CFLAGS = -O2 -fomit-frame-pointer -I../include
-# LFLAGS = -L/usr/X11R6/lib
+CFLAGS = $(RPM_OPT_FLAGS) -I../include
+LFLAGS = -L/usr/X11R6/lib
# OR compile backwards compatible a.out format
# CFLAGS = -O2 -b i486-linuxaout -fomit-frame-pointer -I../include
# LFLAGS = -b i486-linuxaout -L/usr/X11R6/lib
@@ -151,8 +151,8 @@
# flags for debugging:
# CFLAGS = -g -I../include
-CFLAGS = -O -I../include
-LFLAGS =
+#CFLAGS = -O -I../include
+#LFLAGS =
# The Qt and Be window systems are written in C++, while the rest of
# NetHack is standard C. If using Qt, uncomment the LINK line here to get
@@ -230,8 +230,8 @@
# WINTTYLIB = -ltermcap
# WINTTYLIB = -lcurses
# WINTTYLIB = -lcurses16
-# WINTTYLIB = -lncurses
-WINTTYLIB = -ltermlib
+WINTTYLIB = -lncurses
+#WINTTYLIB = -ltermlib
#
# libraries for X11
# If USE_XPM is defined in config.h, you will also need -lXpm here.
--- sys/unix/Makefile.utl.orig 2005-06-24 19:48:16.000000000 -0400
+++ sys/unix/Makefile.utl 2005-06-24 19:49:07.000000000 -0400
@@ -15,7 +15,7 @@
# if you are using gcc as your compiler,
# uncomment the CC definition below if it's not in your environment
-# CC = gcc
+CC = gcc
#
# For Bull DPX/2 systems at B.O.S. 2.0 or higher use the following:
#
@@ -72,8 +72,8 @@
# flags for Linux
# compile normally
-# CFLAGS = -O2 -fomit-frame-pointer -I../include
-# LFLAGS = -L/usr/X11R6/lib
+CFLAGS = $(RPM_OPT_FLAGS) -I../include
+LFLAGS = -L/usr/X11R6/lib
# OR compile backwards compatible a.out format
# CFLAGS = -O2 -b i486-linuxaout -fomit-frame-pointer -I../include
# LFLAGS = -b i486-linuxaout -L/usr/X11R6/lib
@@ -89,8 +89,8 @@
# flags for debugging:
# CFLAGS = -g -I../include
-CFLAGS = -O -I../include
-LFLAGS =
+#CFLAGS = -O -I../include
+#LFLAGS =
LIBS =
@@ -101,11 +101,11 @@
# yacc/lex programs to use to generate *_comp.h, *_lex.c, and *_yacc.c.
# if, instead of yacc/lex you have bison/flex, comment/uncomment the following.
-YACC = yacc
-LEX = lex
-# YACC = bison -y
+#YACC = yacc
+#LEX = lex
+YACC = bison -y
# YACC = byacc
-# LEX = flex
+LEX = flex
# these are the names of the output files from YACC/LEX. Under MS-DOS
# and similar systems, they may differ
--- sys/unix/Makefile.doc.orig 2005-08-14 00:07:23.000000000 -0400
+++ sys/unix/Makefile.doc 2005-08-14 00:07:31.000000000 -0400
@@ -59,10 +59,7 @@
manpages:
-$(GAMEMANCREATE) $(MANDIR)/$(GAME).$(MANEXT)
- -$(LEVMANCREATE) $(MANDIR)/lev_comp.$(MANEXT)
- -$(DGNMANCREATE) $(MANDIR)/dgn_comp.$(MANEXT)
- -$(RCVRMANCREATE) $(MANDIR)/recover.$(MANEXT)
- -$(DLBMANCREATE) $(MANDIR)/dlb.$(MANEXT)
+ -$(RCVRMANCREATE) $(MANDIR)/nethack-recover.$(MANEXT)
# manual creation for distribution
DISTRIB = Guidebook.txt nethack.txt lev_comp.txt dgn_comp.txt recover.txt dlb.txt

View File

@ -0,0 +1,65 @@
--- include/config.h.orig 2016-10-02 19:21:02.647428093 -0500
+++ include/config.h 2016-10-02 19:23:17.090421679 -0500
@@ -43,7 +43,7 @@
#if !defined(NOTTYGRAPHICS)
#define TTY_GRAPHICS /* good old tty based graphics */
#endif
-/* #define X11_GRAPHICS */ /* X11 interface */
+#define X11_GRAPHICS /* X11 interface */
/* #define QT_GRAPHICS */ /* Qt interface */
/* #define GNOME_GRAPHICS */ /* Gnome interface */
/* #define MSWIN_GRAPHICS */ /* Windows NT, CE, Graphics */
@@ -125,7 +125,7 @@
* would allow:
* xpmtoppm <x11tiles.xpm | pnmscale 1.25 | ppmquant 90 >x11tiles_big.xpm
*/
-/* # define USE_XPM */ /* Disable if you do not have the XPM library */
+# define USE_XPM /* Disable if you do not have the XPM library */
#ifdef USE_XPM
#define GRAPHIC_TOMBSTONE /* Use graphical tombstone (rip.xpm) */
#endif
@@ -250,11 +250,11 @@
#if defined(UNIX) && !defined(ZLIB_COMP) && !defined(COMPRESS)
/* path and file name extension for compression program */
-#define COMPRESS "/usr/bin/compress" /* Lempel-Ziv compression */
-#define COMPRESS_EXTENSION ".Z" /* compress's extension */
+/* #define COMPRESS "/usr/bin/compress" */ /* Lempel-Ziv compression */
+/* #define COMPRESS_EXTENSION ".Z" */ /* compress's extension */
/* An example of one alternative you might want to use: */
-/* #define COMPRESS "/usr/local/bin/gzip" */ /* FSF gzip compression */
-/* #define COMPRESS_EXTENSION ".gz" */ /* normal gzip extension */
+#define COMPRESS "/usr/bin/gzip" /* FSF gzip compression */
+#define COMPRESS_EXTENSION ".gz" /* normal gzip extension */
#endif
#ifndef COMPRESS
@@ -298,7 +298,7 @@
* a tar-like file, thus making a neater installation. See *conf.h
* for detailed configuration.
*/
-/* #define DLB */ /* not supported on all platforms */
+#define DLB /* not supported on all platforms */
/*
* Defining INSURANCE slows down level changes, but allows games that
--- include/unixconf.h.orig 2016-10-02 19:21:08.471471134 -0500
+++ include/unixconf.h 2016-10-02 19:23:57.477720155 -0500
@@ -36,7 +36,7 @@
#define NETWORK /* if running on a networked system */
/* e.g. Suns sharing a playground through NFS */
/* #define SUNOS4 */ /* SunOS 4.x */
-/* #define LINUX */ /* Another Unix clone */
+#define LINUX /* Another Unix clone */
/* #define CYGWIN32 */ /* Unix on Win32 -- use with case sensitive defines */
/* #define GENIX */ /* Yet Another Unix Clone */
/* #define HISX */ /* Bull Unix for XPS Machines */
@@ -128,7 +128,7 @@
* "extra output" method is used, but not all systems provide access to
* a fine-grained timer.
*/
-/* #define TIMED_DELAY */ /* usleep() */
+#define TIMED_DELAY /* usleep() */
#endif
/*

View File

@ -0,0 +1,16 @@
--- sys/unix/Makefile.doc.orig 2016-10-02 20:41:46.620046458 -0500
+++ sys/unix/Makefile.doc 2016-10-02 20:42:50.714521302 -0500
@@ -26,10 +26,11 @@
# Use the "cat" GUIDECMD if nroff and/or tbl and/or col are not installed
# Not appropriate for creating Guidebook.txt.
-# GUIDECMD = cat Guidebook.txt
+GUIDECMD = cat Guidebook.txt
# The following works better with groff-1.18, eg on Linux
# GUIDECMD = $(GUIDE_PREFORMAT) | nroff -c -Tascii | $(COLCMD)
-GUIDECMD = $(GUIDE_PREFORMAT) | nroff | $(COLCMD)
+# GUIDECMD = $(GUIDE_PREFORMAT) | nroff | $(COLCMD)
+GUIDECMD = tbl tmac.n Guidebook.mn | nroff | $(COLCMD)
# Only generate output for the current configuration:
NHGREP = $(MAKEDEFS) --grep --input - --output -

View File

@ -0,0 +1,101 @@
--- sys/unix/Makefile.src.orig 2016-10-02 19:07:41.996506529 -0500
+++ sys/unix/Makefile.src 2016-10-02 19:12:05.083455291 -0500
@@ -64,7 +64,7 @@
# if you get setcgtty() warnings during execution, you are feeding gcc
# a non-ANSI <sys/ioctl.h> -- either run fixincludes on it or use
# -traditional in CFLAGS
-# CC = gcc
+CC = gcc
#
# For Bull DPX/2 systems at B.O.S. 2.0 or higher use the following:
#
@@ -128,7 +128,7 @@
# flags for Linux
# compile normally
# CFLAGS = -O2 -fomit-frame-pointer -I../include
-# LFLAGS = -L/usr/X11R6/lib
+LFLAGS = -L/usr/X11R6/lib
# OR compile backwards compatible a.out format
# CFLAGS = -O2 -b i486-linuxaout -fomit-frame-pointer -I../include
# LFLAGS = -b i486-linuxaout -L/usr/X11R6/lib
@@ -222,8 +222,8 @@
#
#
-#WINSRC = $(WINTTYSRC)
-#WINOBJ = $(WINTTYOBJ)
+WINSRC = $(WINTTYSRC) $(WINX11SRC)
+WINOBJ = $(WINTTYOBJ) $(WINX11OBJ)
# on some systems the termcap library is in -ltermcap or -lcurses
# on 386 Xenix, the -ltermlib tputs() seems not to work; use -lcurses instead
@@ -238,12 +238,12 @@
# WINTTYLIB = -ltermcap
# WINTTYLIB = -lcurses
# WINTTYLIB = -lcurses16
-# WINTTYLIB = -lncurses
+WINTTYLIB = -lncurses
#WINTTYLIB = -ltermlib
#
# libraries for X11
# If USE_XPM is defined in config.h, you will also need -lXpm here.
-WINX11LIB = -lXaw -lXmu -lXext -lXt -lX11
+WINX11LIB = -lXaw -lXmu -lXext -lXt -lXpm -lX11
# WINX11LIB = -lXaw -lXmu -lXt -lX11
# WINX11LIB = -lXaw -lXmu -lXext -lXt -lXpm -lX11 -lm
# WINX11LIB = -lXaw -lXmu -lXpm -lXext -lXt -lX11 -lSM -lICE -lm # BSD/OS 2.0
@@ -263,7 +263,7 @@
# libraries for BeOS
WINBELIB = -lbe
-#WINLIB = $(WINTTYLIB)
+WINLIB = $(WINTTYLIB) $(WINX11LIB)
# any other strange libraries your system needs (for Sysunix only -- the more
# specialized targets should already be right)
--- sys/unix/Makefile.utl.orig 2016-10-02 20:22:37.262531451 -0500
+++ sys/unix/Makefile.utl 2016-10-02 19:13:15.878978496 -0500
@@ -18,7 +18,7 @@
# if you are using gcc as your compiler,
# uncomment the CC definition below if it's not in your environment
-# CC = gcc
+CC = gcc
#
# For Bull DPX/2 systems at B.O.S. 2.0 or higher use the following:
#
@@ -76,7 +76,7 @@
# flags for Linux
# compile normally
# CFLAGS = -O2 -fomit-frame-pointer -I../include
-# LFLAGS = -L/usr/X11R6/lib
+LFLAGS = -L/usr/X11R6/lib
# OR compile backwards compatible a.out format
# CFLAGS = -O2 -b i486-linuxaout -fomit-frame-pointer -I../include
# LFLAGS = -b i486-linuxaout -L/usr/X11R6/lib
@@ -104,11 +104,11 @@
# yacc/lex programs to use to generate *_comp.h, *_lex.c, and *_yacc.c.
# if, instead of yacc/lex you have bison/flex, comment/uncomment the following.
-YACC = yacc
-LEX = lex
-# YACC = bison -y
+#YACC = yacc
+#LEX = lex
+YACC = bison -y
# YACC = byacc
-# LEX = flex
+LEX = flex
# these are the names of the output files from YACC/LEX. Under MS-DOS
# and similar systems, they may differ
--- sys/unix/Makefile.top.orig 2016-10-02 19:08:10.317717433 -0500
+++ sys/unix/Makefile.top 2016-10-02 20:37:08.558986445 -0500
@@ -47,6 +47,7 @@
# per discussion in Install.X11 and Install.Qt
#VARDATND =
# VARDATND = x11tiles NetHack.ad pet_mark.xbm pilemark.xpm
+VARDATND = x11tiles NetHack.ad pet_mark.xbm rip.xpm
# VARDATND = x11tiles NetHack.ad pet_mark.xbm pilemark.xpm rip.xpm
# for Atari/Gem
# VARDATND = nh16.img title.img GEM_RSC.RSC rip.img

View File

@ -1,22 +1,25 @@
%global nhgamedir /usr/games/nethack-3.4.3
%global nhdatadir /var/games/nethack
%global nhgamedir /usr/games/nethack-3.6.0
#%global nhdatadir /var/games/nethack
%global nhdatadir /usr/games/nethack-3.6.0
%global fontname nethack-bitmap
%global debug_package %{nil}
Name: nethack
Version: 3.4.3
Version: 3.6.0
Release: 36%{?dist}
Summary: A rogue-like single player dungeon exploration game
Group: Amusements/Games
License: NGPL
URL: http://nethack.org
Source0: http://downloads.sourceforge.net/%{name}/%{name}-343-src.tgz
Source0: http://downloads.sourceforge.net/%{name}/%{name}-360-src.tgz
Source1: %{name}.desktop
Patch0: %{name}-%{version}-makefile.patch
Patch1: %{name}-%{version}-config.patch
Patch2: %{name}-%{version}-x11.patch
Patch3: %{name}-%{version}-guidebook.patch
Patch4: %{name}-%{version}-format-security.patch
Patch2: %{name}-%{version}-guidebook.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Requires: %{fontname}-fonts-core
BuildRequires: ncurses-devel
@ -44,6 +47,7 @@ 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
@ -52,11 +56,12 @@ Bitmap fonts for Nethack.
%package -n %{fontname}-fonts-core
Summary: X11 core fonts configuration for %{fontname}
BuildArch: noarch
Group: User Interface/X
BuildArch: noarch
Requires: %{fontname}-fonts
Requires(post): %{fontname}-fonts
Requires(post): xorg-x11-font-utils
Requires(post): coreutils
Requires(post): coreutils
Requires(preun): coreutils
%description -n %{fontname}-fonts-core
@ -67,50 +72,46 @@ X11 core fonts configuration for %{fontname}.
%setup -q
%patch0 -b .makefile
%patch1 -b .config
%patch2 -b .x11
%patch3 -b .guidebook
%patch4 -p1 -b .format-security
(source sys/unix/setup.sh)
%patch2 -b .guidebook
%{__sed} -i -e "s:PREFIX=\$(wildcard ~)/nh/install:PREFIX=/usr:" sys/unix/hints/linux
%{__sed} -i -e "s:^\(HACKDIR=\).*:\1%{nhgamedir}:" sys/unix/hints/linux
sh sys/unix/setup.sh sys/unix/hints/linux
# 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}:" \
%{__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}:" \
%{__sed} -i -e "s:-L/usr/X11R6/lib:-L/usr/X11R6/%{_lib}:" \
src/Makefile util/Makefile
%build
# 3.4.3 doesn't support parallel make; building with -j fails reliably for me.
# Perhaps later vesions will be better.
#make %%{?_smp_mflags} all
make all
%install
%makeinstall \
GAMEDIR=%{buildroot}/%{nhgamedir} \
VARDIR=%{buildroot}/%{nhdatadir} \
SHELLDIR=%{buildroot}/%{_bindir} \
rm -rf $RPM_BUILD_ROOT
%make_install \
PREFIX=$RPM_BUILD_ROOT \
HACKDIR=$RPM_BUILD_ROOT%{nhgamedir} \
GAMEDIR=$RPM_BUILD_ROOT%{nhgamedir} \
VARDIR=$RPM_BUILD_ROOT%{nhdatadir} \
SHELLDIR=$RPM_BUILD_ROOT%{_bindir} \
CHOWN=/bin/true \
CHGRP=/bin/true
rm -rf %{buildroot}/%{nhgamedir}/save
mv %{buildroot}/%{nhgamedir}/recover %{buildroot}/%{_bindir}/nethack-recover
install -d -m 0755 %{buildroot}/%{_mandir}/man6
make -C doc MANDIR=%{buildroot}/%{_mandir}/man6 manpages
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 \
%{buildroot}/%{_datadir}/pixmaps/nethack.xpm
$RPM_BUILD_ROOT%{_datadir}/pixmaps/nethack.xpm
desktop-file-install \
--dir %{buildroot}/%{_datadir}/applications \
--dir $RPM_BUILD_ROOT%{_datadir}/applications \
--add-category Game \
--add-category RolePlaying \
%{SOURCE1}
@ -119,12 +120,11 @@ desktop-file-install \
cd win/X11
bdftopcf -o nh10.pcf nh10.bdf
bdftopcf -o ibm.pcf ibm.bdf
install -m 0755 -d %{buildroot}/%{_fontdir}
install -m 0644 -p *.pcf %{buildroot}/%{_fontdir}
sed -i -e 's:^!\(NetHack.tile_file.*\):\1:' \
%{buildroot}/%{nhgamedir}/NetHack.ad
install -m 0755 -d $RPM_BUILD_ROOT%{_fontdir}
install -m 0644 -p *.pcf $RPM_BUILD_ROOT%{_fontdir}
%{__sed} -i -e 's:^!\(NetHack.tile_file.*\):\1:' \
$RPM_BUILD_ROOT%{nhgamedir}/NetHack.ad
%post -n %{fontname}-fonts-core
mkfontdir %{_fontdir}
@ -133,46 +133,48 @@ if [ ! -L /etc/X11/fontpath.d/nethack ] ; then
fi
%preun -n %{fontname}-fonts-core
if [ $1 -eq 0 ] ; then
if [ $1 -eq 0 ] ; then
rm /etc/X11/fontpath.d/nethack
rm %{_fontdir}/fonts.dir
fi
fi;
%clean
rm -rf $RPM_BUILD_ROOT
%files
%license dat/license
%doc doc/*.txt README dat/history
#%defattr(-,root,root,-)
%defattr(-,root,wheel,-)
%doc doc/*.txt README dat/license dat/history
%doc dat/opthelp dat/wizhelp
%{_mandir}/man6/*
%{_datadir}/pixmaps/nethack.xpm
%{_datadir}/applications/nethack.desktop
%dir %{nhgamedir}
%{nhgamedir}/NetHack.ad
%{nhgamedir}/license
%{nhgamedir}/nhdat
%{nhgamedir}/pet_mark.xbm
%{nhgamedir}/rip.xpm
%{nhgamedir}/x11tiles
%{_bindir}/nethack
%{_bindir}/nethack-recover
%defattr(0664,root,games)
#%{_bindir}/nethack-recover
%{nhgamedir}
%defattr(0775,root,wheel)
%config(noreplace) %{nhdatadir}/record
%config(noreplace) %{nhdatadir}/perm
%defattr(0664,root,wheel)
%config(noreplace) %{nhdatadir}/logfile
%attr(0775,root,games) %dir %{nhdatadir}
%attr(0775,root,games) %dir %{nhdatadir}/save
%attr(2755,root,games) %{nhgamedir}/nethack
%config(noreplace) %{nhdatadir}/xlogfile
%defattr(0644,root,wheel)
%config(noreplace) %{nhdatadir}/sysconf
%attr(0775,root,wheel) %dir %{nhdatadir}
%attr(0775,root,wheel) %dir %{nhdatadir}/save
%attr(2755,root,wheel) %{nhgamedir}/nethack
%_font_pkg -n bitmap *.pcf
%files -n %{fontname}-fonts-core
%defattr(-,root,root,-)
%changelog
* Wed May 17 2017 Jason L Tibbitts III <tibbs@math.uh.edu> - 3.4.3-36
- Some basic packaging cleanup.
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.4.3-35
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
* Sun Oct 02 2016 Ron Olson <tachoknight@gmail.com> - 3.6.0-1
- Upgraded to version 3.6.0
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 3.4.3-34
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
@ -248,7 +250,7 @@ fi
- Rebuild for FC6
* Mon Apr 10 2006 Luke Macken <lmacken@redhat.com> 3.4.3-10
- Remove $RPM_BUILD_ROOT from %%post (Bug #188008)
- 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