# Maintainer: Luke R. GPG: rsa4096/3EAE8697 # Contributor: Johann Klahn # Contributor: Nathan Jones # Contributor: korjjj # Contributor: TDY # Contributor: Adam Ehlers Nyholm Thomsen # Contributor: Nathan Jones pkgname=ledger-git pkgdesc="A double-entry accounting system with a command-line reporting interface" pkgver=20160420 pkgrel=1 _branch=next ## Uncomment this line if you want a debug build: # _build=debug _defines=(BUILD_DOCS=ON CMAKE_INSTALL_LIBDIR=lib/) ## Uncomment this line if you want to include the ledger-mode: # _defines+=(BUILD_EMACSLISP=ON) depends=('mpfr' 'boost-libs' 'libedit') makedepends=('boost' 'git' 'sed' 'python2' 'cmake' 'texinfo' 'texlive-plainextra') url="http://ledger-cli.org" license=('BSD3') arch=('i686' 'x86_64') provides=('ledger') conflicts=('ledger') [[ "${_build}" == "debug" ]] && options=('!strip') source=("ledger::git://github.com/ledger/ledger.git#branch=${_branch}") sha256sums=('SKIP') pkgver() { cd ledger # git describe --always | sed 's|-|.|g' git log --format="%cd" --date=short -1 | sed 's/-//g' } prepare() { cd ledger find -iname '*.py' -execdir sed -i 's|^#!.*python$|#!/usr/bin/python2|' '{}' \; sed -i 's|^#!.*python$|#!/usr/bin/python2|' ./acprep cmake ./ \ -DCMAKE_INSTALL_PREFIX:PATH=/usr \ -DCMAKE_INSTALL_LIBDIR:PATH=lib \ -DCMAKE_SKIP_RPATH:BOOL=TRUE \ -DDISABLE_ASSERTS:BOOL=TRUE \ -DBUILD_DEBUG:BOOL=FALSE \ -DBUILD_DOCS:BOOL=FALSE \ -DUSE_PYTHON:BOOL=TRUE \ -DBUILD_EMACSLISP:BOOL=TRUE } build() { cd ledger make } package () { cd ledger make DESTDIR="${pkgdir}" install install -Dm644 LICENSE.md "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" }