2022-03-07 12:46:42 +05:30

45 lines
1.4 KiB
Plaintext

# Contributor: Dhruvin Gandhi <contact@dhruvin.dev>
# Maintainer: Dhruvin Gandhi <contact@dhruvin.dev>
pkgname=hledger
pkgver=1.25
pkgrel=0
pkgdesc="Command-line interface for the hledger accounting system"
url="https://hledger.org/hledger.html"
arch="x86_64" # limited by ghc
license="GPL-3.0-only"
makedepends="ghc cabal libffi-dev ncurses-dev"
subpackages="$pkgname-doc $pkgname-bash-completion"
source="https://hackage.haskell.org/package/hledger-$pkgver/hledger-$pkgver.tar.gz
cabal.project.freeze"
export CABAL_DIR="$srcdir"/cabal
prepare() {
default_prepare
cp "$srcdir"/cabal.project.freeze .
}
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
install -Dm644 shell-completion/$pkgname-completion.bash \
"$pkgdir"/usr/share/bash-completion/completions/$pkgname
}
sha512sums="
3a82fe62cb24b4f0a6216a020153a59d43927cb2ae9e6a92c2c8ac7a69192d63c9c521e94adfe7c3505a23555b0e78a458988c34a53f1b5e896e38c41fa611b6 hledger-1.25.tar.gz
41db5fede4ec858b6e7cf491925565250c910082ebdc46e4d304b1283fac56289232284d537f117f9a22558bb527087762c1f8381946e4cdc2c6a53d89fa7914 cabal.project.freeze
"