summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 4c3343722a9c027862fd5b616f89b24079660565 (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
# Maintainer: Harrison Thorne <harrison.thorne@gmail.com>
# Contributor: Andy Weidenbaum <archbaum@gmail.com>
# Contributor: Xander van der Goot <xandervandergoot@gmail.com>

pkgname=hledger-git
pkgver=20191117
pkgrel=1
pkgdesc="The hledger command-line and web-based accounting tool"
arch=('i686' 'x86_64')
depends=('ncurses')
makedepends=('git' 'stack')
url="http://hledger.org"
license=('GPL3')
options=('strip')
source=(git+https://github.com/simonmichael/hledger)
sha256sums=('SKIP')
provides=('hledger' 'hledger-ui' 'hledger-web')
conflicts=('hledger' 'hledger-ui' 'hledger-web')

pkgver() {
  cd ${pkgname%-git}
  git log -1 --format="%cd" --date=short | sed "s|-||g"
}

package() {
  cd ${pkgname%-git}

  msg2 'Installing license...'
  install -Dm 644 LICENSE -t "$pkgdir/usr/share/licenses/hledger"

  msg2 'Installing...'
  mkdir -p "$pkgdir/usr/bin"
  stack --local-bin-path "$pkgdir/usr/bin" install

  msg2 'Cleaning up pkgdir...'
  find "$pkgdir" -type f -name .gitignore -exec rm -r '{}' +
}