aboutsummaryrefslogtreecommitdiffstats
path: root/community/alex/APKBUILD
blob: 90afc9fe0dd41fb737729612559fd6b7d79912f4 (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
# Contributor: River Dillon <oss@outerpassage.net>
# Maintainer: River Dillon <oss@outerpassage.net>
pkgname=alex
pkgver=3.2.6
pkgrel=2
pkgdesc="lexical analyser generator for Haskell"
url="https://www.haskell.org/alex/"
arch="x86_64" # limited by ghc
license="BSD-3-Clause"
makedepends="ghc libffi-dev"
subpackages="$pkgname-doc"
source="
	https://hackage.haskell.org/package/alex-$pkgver/alex-$pkgver.tar.gz
	https://www.haskell.org/alex/doc/alex-doc-html-3.0.tar.gz
	fix-tests-ghc-9.0.patch
	"

build() {
	runhaskell Setup.hs configure \
		"--prefix=/usr" \
		"--datasubdir=$pkgname" \
		"--docdir=\$datadir/doc/$pkgname" \
		"--enable-tests"
	runhaskell Setup.hs build -j "--ghc-options=-j -O1"
}

check() {
	runhaskell Setup.hs test
}

package() {
	docdir="usr/share/doc/$pkgname"
	runhaskell Setup.hs copy "--destdir=$pkgdir"
	rm "$pkgdir/$docdir/LICENSE" # no need to include a standard license
	install -Dm644 -t "$pkgdir/$docdir/html/" "$srcdir/$pkgname"/*
}

sha512sums="
05b6e55e9a1c348aea599d1130780a3d2a0a7c5f1db00b2c98bd34737cac9d48842fb1b1f98947a99d99013f94e39a6ffee1af8546f02fb2d32fcf362ff0f83c  alex-3.2.6.tar.gz
c9497e9b6c80d79d29bd5b1d05cf4077c30c2d94b9c6c321145ca104db204deb96db66f8abba0ad2e849556eda8b901aa6181935e8aca81ff9ffc676d19f87dd  alex-doc-html-3.0.tar.gz
9e8236a3e08add1b2c8ed97da636de900d3f562df2a9dc5496bdf5578908d700c1106cf8ee6b86e4244c02e64b66caa1289b298d66bccc441dae9a3b76dda2d9  fix-tests-ghc-9.0.patch
"