diff options
author | Carlos José Ruiz-Henestrosa Ruiz | 2019-01-06 21:19:27 +0100 |
---|---|---|
committer | Carlos José Ruiz-Henestrosa Ruiz | 2019-01-06 21:19:27 +0100 |
commit | 832f8982dbd7080600a2b7984b3a447a8b23c799 (patch) | |
tree | 03675e4cd39ff51f85d87e75199ec79579f3bc18 /PKGBUILD | |
download | aur-832f8982dbd7080600a2b7984b3a447a8b23c799.tar.gz |
First upload
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..5c992f6d4441 --- /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 +} |