updated on Sun Jan 22 16:00:49 UTC 2012
[aur-mirror.git] / slashem / PKGBUILD
blob81c4007e7b62d6b4da5ccd1b61284a4e64d9385a
1 # Maintainer: Jaroslav Lichtblau <dragonlord@aur.archlinux.org>
2 # Contributor: wizzomafizzo <wizzomafizzo@gmail.com>
4 pkgname=slashem
5 pkgver=0.0.7E7F3
6 pkgrel=2
7 pkgdesc='Nethack variant Super Lotsa Added Stuff Hack - Extended Magic'
8 arch=('i686' 'x86_64')
9 url="http://www.slashem.org/"
10 license=('custom')
11 depends=('ncurses' 'gzip')
12 options=('!makeflags')
13 source=(http://downloads.sourceforge.net/sourceforge/${pkgname}/se007e7f3.tar.gz)
15 md5sums=('54b4534fe85f08722e8b6b38d52c2e9a')
17 build(){
18   cd ${srcdir}/$pkgname-$pkgver/sys/unix
19   sh setup.sh
21   cd ${srcdir}/$pkgname-$pkgver/include
22   sed -e '/define COMPRESS/ s|/usr/bin/compress|/bin/gzip|' \
23       -e '/define COMPRESS_EXTENSION/ s|".Z"|".gz"|' \
24       -e 's|^/\* \(#define DLB\) \*/|\1|' -i config.h
25   sed -e 's|^/\* \(#define LINUX\) \*/|\1|' \
26       -e 's|^/\* \(#define TIMED_DELAY\) \*/|\1|' -i unixconf.h
27   cd ${srcdir}/$pkgname-$pkgver/src
28   sed -e 's|^# \(WINTTYLIB = -lncurses\)|\1|' \
29       -e 's|^WINTTYLIB = -ltermlib|#&|' -i Makefile
30   cd ..
31   sed -e '/^GAMEUID\s*=/ s|games|root|' \
32       -e '/^GAMEGRP\s*=/ s|bin|root|' \
33       -e '/^SHELLDIR\s*=/ s|/games|/bin|' \
34       -e '/GAMEDIR/ s|/local/slashemdir|/share/slashem|' \
35       -e '/SHELLDIR/ s|/local/bin|/bin|' -i Makefile
37   make || return 1
38   make PREFIX=${pkgdir}/usr install
39   sed -e 's|HACKDIR=.*/pkg/usr/|HACKDIR=/usr/|' \
40       -i ${pkgdir}/usr/bin/slashem
41   install -Dm644 dat/license ${pkgdir}/usr/share/licenses/$pkgname/license