summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: bb2ea8efff1226f0a3bd0d74463ebfe2be909bcb (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
# Maintainer: Andy Weidenbaum <archbaum@gmail.com>

pkgname=hledger-git
pkgver=20160429
pkgrel=1
pkgdesc="The hledger command-line and web-based accounting tool"
arch=('i686' 'x86_64')
depends=('ncurses')
makedepends=('git' 'haskell-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 '{}' +
}