summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD50
1 files changed, 50 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..5c992f6d444
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,50 @@
+# Maintainer: Carlos José Ruiz-Henestrosa Ruiz <ruizh.cj@gmail.com>
+pkgname=beancount-import-git
+_name=${pkgname%-git}
+pkgver=1.0.7.r0.0341cf8
+pkgrel=1
+pkgdesc=""
+arch=('any')
+url="https://beancount.github.io/fava/"
+license=('MIT')
+groups=()
+depends=('beancount' # >=2.1.3, but beancount-hg doesn't provide a version.
+ 'python>=3.5'
+ 'python-setuptools'
+ 'python-tornado'
+ 'python-scikit-learn'
+ 'python-nltk'
+ 'python-dateutil'
+ 'python-atomicwrites'
+ 'python-jsonschema')
+
+makedepends=('git')
+
+provides=("beancount-import=${pkgver%%.r*}")
+conflicts=("beancount-import")
+source=('git://github.com/jbms/beancount-import.git')
+md5sums=('SKIP')
+
+pkgver() {
+ cd "$srcdir/${_name}"
+
+ # The repo does not tag releases, so we have to get creative
+ _release_commit=$(git log -L '/version=/',+1:setup.py \
+ --max-count=1 --pretty="format:%h" | \
+ head --lines=1)
+ _ver=$(grep version setup.py | sed "s/.*'\([^']*\)'.*/\1/")
+ printf "%s.r%s.%s" \
+ "${_ver}" \
+ "$(git rev-list --count ${_release_commit}..HEAD)" \
+ "$(git rev-parse --short HEAD)"
+}
+
+build() {
+ cd "$srcdir/${_name}"
+ python setup.py build
+}
+
+package() {
+ cd "$srcdir/${_name}"
+ python setup.py install --root="${pkgdir}/" --optimize=1 --skip-build
+}