updated on Mon Jan 16 04:00:32 UTC 2012
[aur-mirror.git] / ledger-git / PKGBUILD
blob82ddf41c7629101557f0d3b0e94bbfa78a0f9408
1 # Based on PKGBUILD by: Nathan Jones <nathanj@insightbb.com>
2 # Contributor: Johann Klähn <kljohann@gmail.com>
4 pkgname=ledger-git
5 pkgdesc="CLI double-entry accounting tool"
6 pkgver=20110707
7 pkgrel=1
9 # uncomment the following line if you want a debug build.
10 #_build=debug
12 depends=('gmp' 'pcre' 'expat' 'mpfr>=2.4.0' 'boost' 'libedit')
13 makedepends=('git' 'sed' 'python2')
14 url="http://ledger-cli.org"
15 license=('BSD')
16 arch=('i686' 'x86_64')
17 provides=('ledger')
18 conflicts=('ledger')
19 [[ $_build == "debug" ]] && options=('!strip')
20 install=ledger.install
21 source=()
22 md5sums=()
24 _gitroot="git://github.com/jwiegley/ledger.git"
25 _gitname="ledger"
27 build() {
28   cd $srcdir
30   msg "Connecting to GIT server..."
31   if [[ -d $_gitname ]]; then
32     (cd $_gitname && git pull origin)
33   else
34     git clone $_gitroot $_gitname
35   fi
36   msg "GIT checkout done or server timeout"
37   msg "Starting make..."
39   rm -rf $_gitname-build
40   git clone $_gitname $_gitname-build
41   cd $_gitname-build
43   find -iname '*.py' -execdir sed -i 's/^#!.*python/#!\/usr\/bin\/python2/' '{}' \;
44   sed -i 's/^#!.*python/#!\/usr\/bin\/python2/' ./acprep
46   ./acprep submodule
47   ./acprep ${_build:-opt} make --no-python -- --prefix=/usr
49   #make check
52 package () {
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