1 # Based on PKGBUILD by: Nathan Jones <nathanj@insightbb.com>
2 # Contributor: Johann Klähn <kljohann@gmail.com>
5 pkgdesc="CLI double-entry accounting tool"
9 # uncomment the following line if you want a debug build.
12 depends=('gmp' 'pcre' 'expat' 'mpfr>=2.4.0' 'boost' 'libedit')
13 makedepends=('git' 'sed' 'python2')
14 url="http://ledger-cli.org"
16 arch=('i686' 'x86_64')
19 [[ $_build == "debug" ]] && options=('!strip')
20 install=ledger.install
24 _gitroot="git://github.com/jwiegley/ledger.git"
30 msg "Connecting to GIT server..."
31 if [[ -d $_gitname ]]; then
32 (cd $_gitname && git pull origin)
34 git clone $_gitroot $_gitname
36 msg "GIT checkout done or server timeout"
37 msg "Starting make..."
39 rm -rf $_gitname-build
40 git clone $_gitname $_gitname-build
43 find -iname '*.py' -execdir sed -i 's/^#!.*python/#!\/usr\/bin\/python2/' '{}' \;
44 sed -i 's/^#!.*python/#!\/usr\/bin\/python2/' ./acprep
47 ./acprep ${_build:-opt} make --no-python -- --prefix=/usr
53 cd "$srcdir/$_gitname-build"
54 make DESTDIR=$pkgdir install
56 rm -rf $pkgdir/usr/share/locale
58 # handle the dir file in the install script
59 rm -rf $pkgdir/usr/share/info/dir
61 install -D -m644 doc/LICENSE $pkgdir/usr/share/licenses/custom/ledger-git/license.txt