blob: 5c992f6d44418a4e84874e633a122e4317af4707 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
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
}
|