summaryrefslogtreecommitdiff
path: root/pcr/ledger-git
diff options
context:
space:
mode:
Diffstat (limited to 'pcr/ledger-git')
-rw-r--r--pcr/ledger-git/PKGBUILD66
1 files changed, 66 insertions, 0 deletions
diff --git a/pcr/ledger-git/PKGBUILD b/pcr/ledger-git/PKGBUILD
new file mode 100644
index 000000000..3be389f37
--- /dev/null
+++ b/pcr/ledger-git/PKGBUILD
@@ -0,0 +1,66 @@
+# Maintainer: Luke R. <g4jc@openmailbox.org> GPG: rsa4096/3EAE8697
+# Contributor: Johann Klahn <kljohann@gmail.com>
+# Contributor: Nathan Jones <nathanj@insightbb.com>
+# Contributor: korjjj <korjjj+aur[at]gmail[dot]com>
+# Contributor: TDY <tdy at archlinux dot info>
+# Contributor: Adam Ehlers Nyholm Thomsen <adament at gmail dot com>
+# Contributor: Nathan Jones <nathanj at insightbb dot com>
+
+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')
+install="ledger.install"
+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"
+}