summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: dd80c33a89d45a0346f4c0be7899dc76fbf10d3b (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
75
76
77
# Maintainer: libele <libele@disroot.org>
# Contributor: Jonathan Liu <net147@gmail.com>

pkgname=inform7
_pkgname=inform
pkgver=10.1.2
_inwebver=7.2.0
_intestver=2.1.0
pkgrel=3
pkgdesc="A design system for interactive fiction based on natural language"
arch=('aarch64' 'arm' 'armv6h' 'armv7h' 'i486' 'i686' 'pentium4' 'x86_64')
url="https://ganelson.github.io/inform"
license=('Artistic2.0')
makedepends=('clang' 'rsync')
provides=('inform' 'inform7')
groups=(inform)
options=(!buildflags !makeflags)

source=("$_pkgname-$pkgver.tar.gz::https://github.com/ganelson/inform/archive/refs/tags/v$pkgver.tar.gz"
	"inweb-$_inwebver.tar.gz::https://github.com/ganelson/inweb/archive/refs/tags/v$_inwebver.tar.gz"
	"intest-$_intestver.tar.gz::https://github.com/ganelson/intest/archive/refs/tags/v$_intestver.tar.gz"
	'make-integration-settings.mk'
	'wrapper.sh')

sha256sums=('145cae27638c2dde4979f37b67d60de3243f6ee6456b808426fb9dcbda850dd0'
            '0fa772ed3b2e7c7242be6dbfad319bc213f49881eba56549248f90ea1a47fbcf'
            '3a5c86005212b3aa68064e133abed54529a83c7c6963a845afadbcc7db1d647e'
            '5a42023a0de9ba0e8bc9fb0d17713d6d4827d297dbd28c9a84c6a2267098d845'
            'acd2313b91b9bc0d3b55da3691b2e8fd7fefd3550ff2983f7648fbf61cabf3cb')

build() {
  cd "$srcdir"
  mv "inweb-$_inwebver" inweb
  mv "intest-$_intestver" intest

  export CC=clang

  bash inweb/scripts/first.sh linux
  bash intest/scripts/first.sh

  cd "$_pkgname-$pkgver"
  bash scripts/first.sh
  ../intest/Tangled/intest inform7 -show Acidity
  make

  make retrospective
}

check() {
  cd "$_pkgname-$pkgver"
  make check
}

package() {
  cd "$_pkgname-$pkgver"
  make forceintegration

  cd "$srcdir"
  cp -a dist/* "$pkgdir"

  install -Dm755 wrapper.sh "$pkgdir/usr/bin/inform7"

  cd "$_pkgname-$pkgver/retrospective/6L02"
  install -Dm755 cBlorb "$pkgdir/usr/lib/$_pkgname/retrospective/6L02/cBlorb"
  install -Dm755 ni "$pkgdir/usr/lib/$_pkgname/retrospective/6L02/ni"
  cp -ar Extensions "$pkgdir/usr/lib/$_pkgname/retrospective/6L02/Extensions"

  cd ../6L38
  install -Dm755 cBlorb "$pkgdir/usr/lib/$_pkgname/retrospective/6L38/cBlorb"
  install -Dm755 ni "$pkgdir/usr/lib/$_pkgname/retrospective/6L38/ni"
  cp -ar Internal "$pkgdir/usr/lib/$_pkgname/retrospective/6L38/Internal"

  cd ../6M62
  install -Dm755 cBlorb "$pkgdir/usr/lib/$_pkgname/retrospective/6M62/cBlorb"
  install -Dm755 ni "$pkgdir/usr/lib/$_pkgname/retrospective/6M62/ni"
  cp -ar Internal "$pkgdir/usr/lib/$_pkgname/retrospective/6M62/Internal"
}