summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: ab36ed645ce926efd7fe8ecacef9f5814f5fae16 (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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
# Maintainer: Frederic Bezies <fredbezies at gmail dot com>
# Previous Maintainer: Beej <beej@beej.us>
# Previous Maintainer: Michael Smith <michael at diglumi dot com>
# Previous Maintainer: Marcin Skory <armitage at q84fh dot net>
# Contributor: Eric Forgeot < http://ifiction.free.fr >

pkgname=gargoyle
pkgver=2019.1.1
pkgrel=2
pkgdesc="Interactive Fiction multi-interpreter that supports all major IF formats."
arch=('i686' 'x86_64' 'armv6h' 'aarch64')
url="http://ccxvii.net/gargoyle/"
#alternative url="http://ccxvii.net/gargoyle/"
license=('GPL')
depends=('gtk2' 'sdl_mixer' 'sdl_sound')
makedepends=('ftjam' 'pkgconfig' 'desktop-file-utils')
provides=('gargoyle')
conflicts=('gargoyle-mod')
replaces=('gargoyle-mod')
#backup=()
#groups=(inform)
source=("https://github.com/garglk/garglk/archive/${pkgver}.tar.gz" \
	"gargoyle.sh" \
	"gargoyle.xml")
#install=${pkgname}.install
sha512sums=('0d1f2724bd6227142eb67c146557a992a6d62af172398c9961511ce5c080e517d1e12ca9bc6be27c1893e404026256257bf3a04cb05923723c0886f111adc4e3'
            'fbfd04e6d62e469b62263f1fb92b314e825784982be3be9f0e506fe6ff7d367704db907c88ec60fc492f35eaa3548fc3a65fd67d8c4c2be7e35ed87a6c9c3489'
            'c9924abc48b6dc5025fb83c040a3bdd2a324302d67683645a4fd1d1f3bcfe92c58a9db71c1e41a26afe8a3144e1cdafbc060df2261d93ddac29a9144ae22db71')

build() {
	cd "${srcdir}/garglk-${pkgver}"
	jam
	jam install
}

package() {
	local gsrcdir="${srcdir}/garglk-${pkgver}"
	cd "$gsrcdir"

	# Install proper IF-reading binaries
	install -dm755 "$pkgdir/usr/bin/gargoyle-bins"
	install -m755 "$gsrcdir"/build/dist/* "$pkgdir/usr/bin/gargoyle-bins/"
	## hurr, durr, I'm dumb and dirty, gotta clean myself
	rm "$pkgdir/usr/bin/gargoyle-bins/libgarglk.so"

	# Install libgarglk library
	install -dm755 "$pkgdir/usr/lib"
	install -m755 "$gsrcdir/build/dist/libgarglk.so" "$pkgdir/usr/lib"

	# Install a launching shell script
	install -m755 "$srcdir/gargoyle.sh" "$pkgdir/usr/bin/gargoyle"

	# Install default config
	install -dm755 "$pkgdir/etc"
	install -m755 "$gsrcdir/garglk/garglk.ini" "$pkgdir/etc"

	# Install desktop icons
	install -dm755 "$pkgdir/usr/share/pixmaps"
	install -m644 "$gsrcdir/garglk/gargoyle-house.png" "$pkgdir/usr/share/pixmaps/${pkgname}.png"

	# Install gargoyle xdg desktop entry
	## before that, patch the icon path since we renamed it earlier
	sed -i 's|Icon=gargoyle-house.png|Icon=gargoyle.png|' "$gsrcdir/garglk/${pkgname}.desktop"
	## link it with x-interactive-fiction mimetype
	echo "MimeType=application/x-interactive-fiction" >> "$gsrcdir/garglk/${pkgname}.desktop"
	## and then install it. Yay~ :3
	install -dm755 "$pkgdir/usr/share/applications"
	install -m644 "$gsrcdir/garglk/${pkgname}.desktop" "$pkgdir/usr/share/applications/${pkgname}.desktop"

	# Install mimetype
	install -dm755 "$pkgdir/usr/share/mime/packages"
	install -m644 "$srcdir/gargoyle.xml" "$pkgdir/usr/share/mime/packages/"
}