summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: ab4ef924984269c0a17a849080e52e92c6b84d9d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# Maintainer: Ivy Foster <code@escondida.tk>

pkgbase=frotz-git
pkgname=(frotz-ncurses-git frotz-dumb-git)
pkgver=2.44.r188.g869c99e
pkgrel=1
pkgdesc='Z-machine interpreter for interactive fiction games'

conflicts=(frotz)
provides=(frotz)

arch=(i686 x86_64)
url='http://frotz.sourceforge.net/'
license=(GPL)
source=('git+https://github.com/DavidGriffith/frotz')
md5sums=(SKIP)

pkgver() {
	cd frotz
	git describe | sed 's,-\(.*\)-,.r\1.,'
}

prepare() {
	cd frotz
	sed '/^PREFIX/ s:/usr/local:/usr:
		/^CONFIG_DIR = $(PREFIX)/ s/^/#/
		/^CONFIG_DIR/ s:/usr/local::
		/^CURSES/ s/-lcurses/-lncurses/
		/^#CURSES_DEF/ s/^#//' \
		-i Makefile
}

build() {
	cd frotz
	make OPTS="$CFLAGS $LDFLAGS"
	make OPTS="$CFLAGS $LDFLAGS" dumb 
}

package_frotz-ncurses-git() {
	depends=('ncurses')

	cd frotz
	make DESTDIR="$pkgdir" install
}

package_frotz-dumb-git() {
	cd frotz
	make DESTDIR="$pkgdir" install_dumb
}