summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 272594d205258890faf8b94bd07c8a4e1fa6b70d (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: autumnontape <autumn at cyfox dot net>
# Contributor: Frederic Bezies <fredbezies at gmail dot com>
# Contributor: Beej <beej@beej.us>
# Contributor: Michael Smith <michael at diglumi dot com>
# Contributor: Marcin Skory <armitage at q84fh dot net>
# Contributor: Eric Forgeot < http://ifiction.free.fr >

pkgname=gargoyle
pkgver=2023.1
pkgrel=2
pkgdesc="Interactive Fiction multi-interpreter that supports all major IF formats."
arch=('i686' 'x86_64' 'armv6h' 'armv7h' 'aarch64')
url="https://ccxvii.net/gargoyle/"
license=('GPL2' 'GPL3' 'custom:BSD-2-Clause' 'custom:BSD-3-Clause' 'Artistic2.0' 'MIT' 'custom:OFL-1.1')
depends=('sdl2_mixer' 'sdl2' 'freetype2' 'qt6-base' 'fontconfig' 'libjpeg' 'libpng' 'zlib'
         'hicolor-icon-theme')
makedepends=('cmake' 'pkgconfig' 'desktop-file-utils')
optdepends=('speech-dispatcher: Text-to-Speech')
provides=('gargoyle')
conflicts=('gargoyle-mod')
replaces=('gargoyle-mod')
backup=('etc/garglk.ini')
#groups=(inform)
source=("${pkgname}-${pkgver}.tar.gz::https://github.com/garglk/garglk/archive/${pkgver}.tar.gz"
        "0001-include-cstdint-in-garglk.h.patch")
sha512sums=('d8624f8a8492f64adfdb638811419ebef5b77457708a5d07a3891faf97966237839170914af4d416f42aca7e6d9d0643384ef60be30a2ba22ed52fee4938683a'
            '0db975cdb44cd155e0962a4a141eba7b5990175ccb65bbb71b7f504bc140e29079da5a7f23bdd429dd68c75b6b2fff320f0ea5cb689aaa5c79dae1642d94cf4f')

prepare() {
	cd "${srcdir}/garglk-${pkgver}"
	patch -Np1 -i "${srcdir}/0001-include-cstdint-in-garglk.h.patch"
}

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

	# Extract the license for Git from the readme
	sed -n '/Copyright (c)/,/DEALINGS IN THE SOFTWARE\./p' \
		terps/git/README.txt > terps/git/LICENSE

	mkdir -p build
	cd build
	# the Arch package guidelines say to use
	# /usr/lib instead of /usr/libexec.
	cmake .. -DWITH_QT6=true -DWITH_TTS=DYNAMIC -DCMAKE_INSTALL_LIBEXECDIR=lib -DCMAKE_INSTALL_PREFIX=/usr
	make
}

package() {
	cd "${srcdir}/garglk-${pkgver}/build"
	make DESTDIR="$pkgdir/" install

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

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

	# Install licenses
	install -dm755 "$pkgdir/usr/share/licenses/${pkgname}"
	install -m644 "$gsrcdir/License.txt" "$pkgdir/usr/share/licenses/${pkgname}/LICENSE"
	install -m644 "$gsrcdir/licenses/BSD-2-Clause.txt" "$pkgdir/usr/share/licenses/${pkgname}"
	install -m644 "$gsrcdir/licenses/Go Mono.txt" \
		"$pkgdir/usr/share/licenses/${pkgname}/BSD-3-Clause-Go-Mono.txt"
	install -m644 "$gsrcdir/terps/advsys/LICENSE" \
		"$pkgdir/usr/share/licenses/${pkgname}/BSD-3-Clause-AdvSys.txt"
	install -m644 "$gsrcdir/terps/git/LICENSE" \
		"$pkgdir/usr/share/licenses/${pkgname}/MIT-Git.txt"
	install -m644 "$gsrcdir/terps/glulxe/LICENSE" \
		"$pkgdir/usr/share/licenses/${pkgname}/MIT-Glulxe.txt"
	install -m644 "$gsrcdir/licenses/Charis SIL.txt" \
		"$pkgdir/usr/share/licenses/${pkgname}/OFL-1.1.txt"
}