summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: f2a7b39239bbea8d2294bca82b5f672bd387b45e (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
# Maintainer: Gesh <gesh@gesh.uni.cx>
# Contributor: dude <brrtsm@gmail.com>

pkgname=(hledger-bin hledger-ui-bin hledger-web-bin)
pkgver=1.42.1
pkgrel=1
pkgdesc='Easy-to-use command-line/curses/web plaintext accounting tool'
arch=('x86_64')
url='http://hledger.org'
license=('GPL-3.0-or-later')
optdepends=('asciinema: hledger demo support')
_url=https://github.com/simonmichael/hledger
source=(
    hledger-${pkgver}.tar.gz::$_url/releases/download/${pkgver}/hledger-linux-x64.tar.gz
)
sha256sums=('a274dcb55e7a9b205c0f9bbdd8ee44db6e559bce416c59f8c6cd528725ebadad')

_common_package() {
    _pkgname="$1"
    install -Dm 755 "$_pkgname" -t "$pkgdir/usr/bin/"
    install -Dm 644 hledger-completion.bash \
        "$pkgdir/usr/share/bash-completion/completions/$_pkgname"
    install -Dm 644 "$_pkgname".1 -t "$pkgdir/usr/share/man/man1/"
    install -Dm 644 "$_pkgname".info -t "$pkgdir/usr/share/info/"
}

package_hledger-bin() {
    pkgdesc='Command-line interface for the hledger accounting system'
    provides=(hledger="$pkgver")
    conflicts=(hledger)
    _common_package hledger
}

package_hledger-ui-bin() {
    pkgdesc='Curses-style terminal interface for the hledger accounting system'
    provides=(hledger-ui="$pkgver")
    conflicts=(hledger-ui)
    _common_package hledger-ui
}

package_hledger-web-bin() {
    pkgdesc='Web-based user interface for the hledger accounting system'
    provides=(hledger-web="$pkgver")
    conflicts=(hledger-web)
    _common_package hledger-web
}