summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorrh9952015-07-14 19:08:47 -0800
committerrh9952015-07-14 19:08:47 -0800
commit28eec17dcf7eeab6a3e6ea8808367e98d5d04f2d (patch)
tree2cca385192c3173e1f2505854893a37be8fa79aa
parent0d499acc8d098d5d6efde578e2119882b5a9fe97 (diff)
downloadaur-28eec17dcf7eeab6a3e6ea8808367e98d5d04f2d.tar.gz
Fix various problems.
The first of these problems was a permissions issue, not letting slashem create save games or write the high score list. This was solved in the Makefile. The second problem was a permissions issue on /var/games, solved by adding a line to PKGBUILD setting the permissions correctly. The third problem was manfiles that confilct with nethack. Because people might want to have nethack and slashem installed concurrently, I deleted the manfiles that conflict from this package.
-rw-r--r--.SRCINFO4
-rw-r--r--PKGBUILD12
-rw-r--r--slashem-0.0.7E7F3.patch149
3 files changed, 82 insertions, 83 deletions
diff --git a/.SRCINFO b/.SRCINFO
index e3f2908ac524..5eea361a0f07 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = slashem
pkgdesc = Nethack variant Super Lotsa Added Stuff Hack - Extended Magic
pkgver = 0.0.7E7F3
- pkgrel = 3
+ pkgrel = 4
url = http://www.slashem.org/
arch = i686
arch = x86_64
@@ -10,7 +10,7 @@ pkgbase = slashem
source = http://prdownloads.sourceforge.net/slashem/se007e7f3.tar.gz
source = slashem-0.0.7E7F3.patch
md5sums = 54b4534fe85f08722e8b6b38d52c2e9a
- md5sums = 81e685f77734d1a39a85d4d5d77add7c
+ md5sums = fd208bd24da31198d6a1d7d067e7377e
pkgname = slashem
diff --git a/PKGBUILD b/PKGBUILD
index 21133f455054..46135aed502d 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,7 +2,7 @@
pkgname=slashem
pkgver=0.0.7E7F3
-pkgrel=3
+pkgrel=4
pkgdesc='Nethack variant Super Lotsa Added Stuff Hack - Extended Magic'
arch=('i686' 'x86_64')
url="http://www.slashem.org/"
@@ -11,14 +11,12 @@ depends=('bash')
source=("http://prdownloads.sourceforge.net/$pkgname/se007e7f3.tar.gz"
"$pkgname-$pkgver.patch")
md5sums=('54b4534fe85f08722e8b6b38d52c2e9a'
- '81e685f77734d1a39a85d4d5d77add7c')
+ 'fd208bd24da31198d6a1d7d067e7377e')
prepare() {
cd "$pkgname-$pkgver"
sh sys/unix/setup.sh
patch -p0 -i "$srcdir/$pkgname-$pkgver.patch"
- sed -e "/^# define COMPRESS /s|/usr/bin/compress|$(which gzip)|" \
- -i include/config.h
}
build() {
@@ -28,13 +26,17 @@ build() {
package() {
cd "$pkgname-$pkgver"
+ install -dm755 "$pkgdir"/usr/share/man/{fr/man6,man6}
+ install -dm775 "$pkgdir/var/games"
make PREFIX="$pkgdir" install manpages
- sed -e "s|HACKDIR=$pkgdir/|HACKDIR=|" \
+ sed -e "s|HACKDIR=$pkgdir|HACKDIR=|" \
-e 's|HACK=$HACKDIR|HACK=/usr/lib/slashem|' \
-i $pkgdir/usr/bin/slashem
install -Dm644 dat/license "$pkgdir/usr/share/licenses/$pkgname/license"
install -dm755 "$pkgdir/usr/lib/$pkgname"
mv "$pkgdir"/var/games/slashem/{slashem,recover} \
"$pkgdir/usr/lib/$pkgname"
+ # Delete man pages that conflict with nethack.
+ rm "$pkgdir"/usr/share/man/man6/{dgn_comp.6,dlb.6,lev_comp.6,recover.6}
}
diff --git a/slashem-0.0.7E7F3.patch b/slashem-0.0.7E7F3.patch
index 25c0a98bc46e..5e07e8feac16 100644
--- a/slashem-0.0.7E7F3.patch
+++ b/slashem-0.0.7E7F3.patch
@@ -1,75 +1,5 @@
---- Makefile.bak 2015-07-14 12:30:58.723692095 -0800
-+++ Makefile 2015-07-14 13:03:55.940290421 -0800
-@@ -17,15 +17,15 @@
- PREFIX = /usr
- GAME = slashem
- # GAME = slashem.prg
--GAMEUID = games
--GAMEGRP = bin
-+GAMEUID = root
-+GAMEGRP = games
-
- # Permissions - some places use setgid instead of setuid, for instance
- # See also the option "SECURE" in include/config.h
--GAMEPERM = 04755
--FILEPERM = 0644
-+GAMEPERM = 02755
-+FILEPERM = 0664
- EXEPERM = 0755
--DIRPERM = 0755
-+DIRPERM = 0775
- VARFILEPERM = 0644
- VARDIRPERM = 0755
-
-@@ -40,7 +40,7 @@
- # These must agree with the definitions in unixconf.h
-
- # Defs. for non file areas support.
--GAMEDIR = $(PREFIX)/local/slashemdir
-+GAMEDIR = $(PREFIX)/var/games/$(GAME)
- VARDIR = $(GAMEDIR)
- FILE_AREA_VAR = $(VARDIR)
- FILE_AREA_SAVE = $(VARDIR)/save
-@@ -49,7 +49,7 @@
- FILE_AREA_DOC = $(GAMEDIR)
- FILE_AREA_BONES = $(FILE_AREA_VAR)
- FILE_AREA_LEVL = $(FILE_AREA_VAR)
--SHELLDIR = $(PREFIX)/local/bin
-+SHELLDIR = $(PREFIX)/usr/bin
-
- # Defs. compatible with Linux's FSSTND 1.2
- # FILE_AREA_VAR = /var/lib/games/slashem
-@@ -69,7 +69,7 @@
- # FILE_AREA_DOC = /usr/share/doc/slashem
- # FILE_AREA_BONES = $(FILE_AREA_VAR)
- # FILE_AREA_LEVL = $(FILE_AREA_VAR)
--# SHELLDIR = /usr/games
-+# SHELLDIR = /usr/bin
-
- # KDEDIR = /opt/kde
- # SHELLDIR = $(KDEDIR)/bin
---- includeconfig.h.bak 2015-07-14 12:10:52.030400467 -0800
-+++ include/config.h 2015-07-14 12:27:13.817033203 -0800
-@@ -231,7 +231,7 @@
- #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_EXTENSION ".gz" /* compress's extension */
-
- /* An example of one alternative you might want to use: */
- /* # define COMPRESS "/usr/local/bin/gzip" */ /* FSF gzip compression */
-@@ -249,7 +249,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
---- includeunixconf.h.bak 2015-07-14 12:28:20.217030905 -0800
-+++ include/unixconf.h 2015-07-14 13:03:27.956958059 -0800
+--- include/unixconf.h 2015-07-14 18:42:12.480163774 -0800
++++ include/unixconf.h 2015-07-14 18:43:06.113495254 -0800
@@ -38,7 +38,7 @@
#define NETWORK /* if running on a networked system */
/* e.g. Suns sharing a playground through NFS */
@@ -88,8 +18,8 @@
# ifdef TEXTCOLOR
# define VIDEOSHADES
---- srcMakefile.bak 2015-07-14 12:25:08.923704185 -0800
-+++ src/Makefile 2015-07-14 12:25:41.147036404 -0800
+--- src/Makefile 2015-07-14 18:43:18.233494835 -0800
++++ src/Makefile 2015-07-14 18:44:07.770159789 -0800
@@ -124,7 +124,7 @@
# flags for Linux
@@ -119,8 +49,8 @@
#
# libraries for X11
# If USE_XPM is defined in config.h, you will also need -lXpm here.
---- docMakefile.bak 2015-07-14 13:47:17.040200526 -0800
-+++ doc/Makefile 2015-07-14 13:47:31.520200024 -0800
+--- doc/Makefile 2015-07-14 18:44:11.666826314 -0800
++++ doc/Makefile 2015-07-14 18:44:45.236825160 -0800
@@ -53,7 +53,7 @@
# tbl tmac.n Guidebook.mn | groff -Wall -Tdvi > Guidebook.dvi
@@ -130,3 +60,70 @@
MANEXT = 6
FRMANDIR= $(MANDIR:man6=fr/man6)
+--- include/config.h 2015-07-14 18:44:52.163491599 -0800
++++ include/config.h 2015-07-14 18:45:28.396823664 -0800
+@@ -230,8 +230,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/gzip" /* Lempel-Ziv compression */
++# define COMPRESS_EXTENSION ".gz" /* compress's extension */
+
+ /* An example of one alternative you might want to use: */
+ /* # define COMPRESS "/usr/local/bin/gzip" */ /* FSF gzip compression */
+@@ -249,7 +249,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
+--- Makefile 2015-07-14 18:45:32.823490183 -0800
++++ Makefile 2015-07-14 18:47:19.740153153 -0800
+@@ -17,17 +17,17 @@
+ PREFIX = /usr
+ GAME = slashem
+ # GAME = slashem.prg
+-GAMEUID = games
+-GAMEGRP = bin
++GAMEUID = root
++GAMEGRP = games
+
+ # Permissions - some places use setgid instead of setuid, for instance
+ # See also the option "SECURE" in include/config.h
+-GAMEPERM = 04755
+-FILEPERM = 0644
++GAMEPERM = 02755
++FILEPERM = 0664
+ EXEPERM = 0755
+-DIRPERM = 0755
+-VARFILEPERM = 0644
+-VARDIRPERM = 0755
++DIRPERM = 0775
++VARFILEPERM = 0664
++VARDIRPERM = 0775
+
+ # GAMEDIR also appears in config.h as "HACKDIR".
+ # VARDIR may also appear in unixconf.h as "VAR_PLAYGROUND" else GAMEDIR
+@@ -40,7 +40,7 @@
+ # These must agree with the definitions in unixconf.h
+
+ # Defs. for non file areas support.
+-GAMEDIR = $(PREFIX)/local/slashemdir
++GAMEDIR = $(PREFIX)/var/games/slashem
+ VARDIR = $(GAMEDIR)
+ FILE_AREA_VAR = $(VARDIR)
+ FILE_AREA_SAVE = $(VARDIR)/save
+@@ -49,7 +49,7 @@
+ FILE_AREA_DOC = $(GAMEDIR)
+ FILE_AREA_BONES = $(FILE_AREA_VAR)
+ FILE_AREA_LEVL = $(FILE_AREA_VAR)
+-SHELLDIR = $(PREFIX)/local/bin
++SHELLDIR = $(PREFIX)/usr/bin
+
+ # Defs. compatible with Linux's FSSTND 1.2
+ # FILE_AREA_VAR = /var/lib/games/slashem