[arch-commits] Commit in nethack/trunk (PKGBUILD)
Jakob Gruber
schuay at archlinux.org
Wed Jan 21 09:27:14 UTC 2015
Date: Wednesday, January 21, 2015 @ 10:27:14
Author: schuay
Revision: 126348
nethack: ensure /var/games is owned by root:games
Modified:
nethack/trunk/PKGBUILD
----------+
PKGBUILD | 18 +++++++++++++-----
1 file changed, 13 insertions(+), 5 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2015-01-21 08:12:19 UTC (rev 126347)
+++ PKGBUILD 2015-01-21 09:27:14 UTC (rev 126348)
@@ -17,9 +17,8 @@
source=("http://downloads.sourceforge.net/$pkgname/$pkgname-${pkgver//.}-src.tgz")
md5sums=('21479c95990eefe7650df582426457f9')
-build(){
+prepare() {
cd $srcdir/$pkgname-$pkgver/
- sh sys/unix/setup.sh
sed -e '/define HACKDIR/ s|/usr/games/lib/nethackdir|/var/games/nethack/|' \
-e "/^#define COMPRESS\s/ s|/usr/bin/compress|$(which gzip)|" \
@@ -30,7 +29,7 @@
-e 's|^/\* \(#define TIMED_DELAY\) \*/|\1|' -i include/unixconf.h
sed -e 's|^# \(WINTTYLIB = -lncurses\)|\1|' \
- -e 's|^WINTTYLIB = -ltermlib|#&|' -i src/Makefile
+ -e 's|^WINTTYLIB = -ltermlib|#&|' -i sys/unix/Makefile.src
# we are setting up for setgid games, so modify all necessary permissions
# to allow full access for groups
@@ -41,10 +40,16 @@
-e '/^GAMEPERM\s*=/ s|04755|02755|' \
-e '/^FILEPERM\s*=/ s|0644|0664|' \
-e '/^DIRPERM\s*=/ s|0755|0775|' \
- -e '/^SHELLDIR\s*=/ s|/games|/usr/bin|' -i Makefile
+ -e '/^SHELLDIR\s*=/ s|/games|/usr/bin|' -i sys/unix/Makefile.top
- sed -e "/^MANDIR\s*=/s|/usr/man/man6|$pkgdir/usr/share/man/man6|" -i doc/Makefile
+ sed -e "/^MANDIR\s*=/s|/usr/man/man6|$pkgdir/usr/share/man/man6|" -i sys/unix/Makefile.doc
+}
+
+build(){
+ cd $srcdir/$pkgname-$pkgver/
+
+ sh sys/unix/setup.sh
make
}
@@ -61,6 +66,9 @@
install -dm755 $pkgdir/usr/lib/nethack
mv $pkgdir/var/games/nethack/{nethack,recover} $pkgdir/usr/lib/nethack/
+ # FS#43414: /var/games should be owned by root:games.
+ chown root:games $pkgdir/var/games/
+
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