mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-28 22:57:37 +00:00
42 lines
1.6 KiB
Bash
42 lines
1.6 KiB
Bash
# $Id: PKGBUILD 9316 2008-08-17 06:12:33Z allan $
|
|
# Maintainer : kevin <kevin@archlinux.org>
|
|
# Contributor : Christian Schmidt <mucknert@gmx.net>
|
|
# Contributor : Markus Meissner <markus@meissna.de>
|
|
|
|
pkgname=nethack
|
|
pkgver=3.4.3
|
|
pkgrel=3
|
|
pkgdesc='A single player dungeon exploration game'
|
|
arch=('i686' 'x86_64')
|
|
url="http://www.nethack.org/index.html"
|
|
license=('custom')
|
|
depends=('ncurses' 'gzip')
|
|
source=(http://downloads.sourceforge.net/sourceforge/$pkgname/$pkgname-`echo $pkgver | sed 's@\.@@g'`-src.tgz)
|
|
md5sums=('21479c95990eefe7650df582426457f9')
|
|
|
|
build(){
|
|
cd $startdir/src/$pkgname-$pkgver/sys/unix
|
|
sh 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
|
|
sed -e 's|^/\* \(#define LINUX\) \*/|\1|' \
|
|
-e 's|^/\* \(#define TIMED_DELAY\) \*/|\1|' -i unixconf.h
|
|
cd $startdir/src/$pkgname-$pkgver/src
|
|
sed -e 's|^# \(WINTTYLIB = -lncurses\)|\1|' \
|
|
-e 's|^WINTTYLIB = -ltermlib|#&|' -i Makefile
|
|
cd ..
|
|
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
|
|
|
|
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
|
|
}
|