aboutsummaryrefslogtreecommitdiffstats
path: root/testing/hledger-web/APKBUILD
blob: 33df18380bd21b5ca2f867a9ee7ad68fa7a5bc0e (plain) (blame)
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
# Contributor: Dhruvin Gandhi <contact@dhruvin.dev>
# Maintainer: Dhruvin Gandhi <contact@dhruvin.dev>
pkgname=hledger-web
pkgver=1.24.1
pkgrel=0
pkgdesc="Web interface for the hledger accounting system"
url="https://hledger.org/$pkgname.html"
arch="x86_64" # limited by ghc
license="GPL-3.0-only"
makedepends="ghc cabal libffi-dev ncurses-dev zlib-dev"
subpackages="$pkgname-doc"
source="https://hackage.haskell.org/package/$pkgname-$pkgver/$pkgname-$pkgver.tar.gz"
builddir="$srcdir/$pkgname-$pkgver"

export CABAL_DIR="$srcdir"/cabal

build() {
	cabal update
	cabal build --prefix=/usr --enable-relocatable
}

check() {
	cabal test
}

package() {
	local ghcver=$(ghc --version | cut -d " " -f 8)
	install -Dm755 \
		"dist-newstyle/build/$arch-linux/ghc-$ghcver/$pkgname-$pkgver/x/$pkgname/build/$pkgname/$pkgname" \
		"$pkgdir"/usr/bin/$pkgname
	install -Dm644 $pkgname.1 "$pkgdir"/usr/share/man/man1/$pkgname.1
}

sha512sums="
49e6292faad4a1311d1af950a98a546e6ec61f5dfa97539e62a806e63bbd43351861ab4c45f8eb7284e98367fb92e206a217e998c6572ca8b2f37e91bb93daaf  hledger-web-1.24.1.tar.gz
"