[arch-commits] Commit in nethack/trunk (PKGBUILD)
Allan McRae
allan at archlinux.org
Sat Nov 7 12:45:45 UTC 2009
Date: Saturday, November 7, 2009 @ 07:45:44
Author: allan
Revision: 58373
upgpkg: nethack 3.4.3-4
move binary files out of /usr/share (FS#15304), add man pages and guidebook (FS#15692)
Modified:
nethack/trunk/PKGBUILD
----------+
PKGBUILD | 36 +++++++++++++++++++++++-------------
1 file changed, 23 insertions(+), 13 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2009-11-07 12:23:32 UTC (rev 58372)
+++ PKGBUILD 2009-11-07 12:45:44 UTC (rev 58373)
@@ -5,7 +5,7 @@
pkgname=nethack
pkgver=3.4.3
-pkgrel=3
+pkgrel=4
pkgdesc='A single player dungeon exploration game'
arch=('i686' 'x86_64')
url="http://www.nethack.org/index.html"
@@ -15,28 +15,38 @@
md5sums=('21479c95990eefe7650df582426457f9')
build(){
- cd $startdir/src/$pkgname-$pkgver/sys/unix
- sh setup.sh
+ cd $srcdir/$pkgname-$pkgver/
+ sh sys/unix/setup.sh
- cd $startdir/src/$pkgname-$pkgver/include
sed -e '/define HACKDIR/ s|/usr/games/lib/nethackdir|/usr/share/nethack/|' \
-e '/^#define COMPRESS\s/ s|/usr/bin/compress|/bin/gzip|' \
-e '/^#define COMPRESS_EXTENSION/ s|".Z"|".gz"|' \
- -e 's|^/\* \(#define DLB\) \*/|\1|' -i config.h
+ -e 's|^/\* \(#define DLB\) \*/|\1|' -i include/config.h
+
sed -e 's|^/\* \(#define LINUX\) \*/|\1|' \
- -e 's|^/\* \(#define TIMED_DELAY\) \*/|\1|' -i unixconf.h
- cd $startdir/src/$pkgname-$pkgver/src
+ -e 's|^/\* \(#define TIMED_DELAY\) \*/|\1|' -i include/unixconf.h
+
sed -e 's|^# \(WINTTYLIB = -lncurses\)|\1|' \
- -e 's|^WINTTYLIB = -ltermlib|#&|' -i Makefile
- cd ..
+ -e 's|^WINTTYLIB = -ltermlib|#&|' -i src/Makefile
+
sed -e '/^GAMEDIR\s*=/ s|/games/.*$|/share/$(GAME)|' \
-e '/^GAMEUID\s*=/ s|games|root|' \
-e '/^GAMEGRP\s*=/ s|bin|root|' \
-e '/^SHELLDIR\s*=/ s|/games|/bin|' -i Makefile
+ sed -e "/^MANDIR\s*=/s|/usr/man/man6|$pkgdir/usr/share/man/man6|" -i doc/Makefile
make || return 1
- make PREFIX=$startdir/pkg/usr install
- sed -e 's|HACKDIR=.*/pkg/usr/|HACKDIR=/usr/|' \
- -i $startdir/pkg/usr/bin/nethack
- install -Dm644 dat/license $startdir/pkg/usr/share/licenses/$pkgname/license
+
+ install -dm755 $pkgdir/usr/share/{man/man6,doc/nethack}
+ make PREFIX=$pkgdir/usr install manpages
+ sed -e "s|HACKDIR=$pkgdir/usr/|HACKDIR=/usr/|" \
+ -e 's|HACK=$HACKDIR|HACK=/usr/lib/nethack|' \
+ -i $pkgdir/usr/bin/nethack
+
+ install -dm755 $pkgdir/usr/lib/nethack
+ mv $pkgdir/usr/share/nethack/{nethack,recover} $pkgdir/usr/lib/nethack/
+
+ install -Dm644 doc/Guidebook.txt $pkgdir/usr/share/doc/nethack/Guidebook.txt
+
+ install -Dm644 dat/license $pkgdir/usr/share/licenses/$pkgname/license
}
More information about the arch-commits
mailing list