aboutsummaryrefslogtreecommitdiffstats
path: root/testing/happy/APKBUILD
blob: ca9c5dff10ee805614f75c6340ef48a40a743bbf (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
# Contributor: River Dillon <oss@outerpassage.net>
# Maintainer: River Dillon <oss@outerpassage.net>
pkgname=happy
pkgver=1.20.0
pkgrel=0
pkgdesc="parser generator for Haskell"
url="https://www.haskell.org/happy/"
arch="x86_64" # limited by ghc
license="BSD-2-Clause"
makedepends="ghc"
subpackages="$pkgname-doc"
source="
	https://hackage.haskell.org/package/happy-$pkgver/happy-$pkgver.tar.gz
	https://www.haskell.org/happy/doc/happy-1.18.5-html.tar.gz
	"

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

sha512sums="2c19e6e13032ead435495aab232192cf0ad9fe5e3e04c79b40b586272fb0208284815cf5c15d609f75387e7fe91ca0932b675bcaa95552f62ad08a12701649ce  happy-1.20.0.tar.gz
10d7e5b7c1fd6b60569c0eccbb148d8395eb5c479dc5c124e2de196872c11ae5e8af4d1d55ea24ed7eae35af27b16772468512f3fda4f571eefdce6639747871  happy-1.18.5-html.tar.gz"