summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: ef5a806bc868241e297e2bcfa4b43b88f2d4d9b9 (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
# Maintainer: Adrian Perez <aperez@igalia.com>
pkgname=beancount-git
pkgdesc='Double-Entry Accounting from Text Input'
pkgver=2.3.3.r451.gf9481591
pkgrel=1
arch=(i686 x86_64)
url=http://furius.ca/beancount/
license=(GPL)
source=("${pkgname}::git+https://github.com/beancount/beancount/")
sha512sums=('SKIP')
depends=('mpdecimal'
         'python-beautifulsoup4'
         'python-bottle'
         'python-chardet'
         'python-dateutil'
         'python-google-api-python-client'
         'python-google-auth-oauthlib'
         'python-lxml'
         'python-magic-ahupp'
         'python-ply'
         'python-requests'
         'python>=3.5'
         'python-pytest')
makedepends=('git' 'python-nose' 'make')
replaces=(ledgerhub-hg beancount-hg)
provides=(ledgerhub-hg "beancount=${pkgver%%.r*}")
conflicts=(beancount beancount-hg)

pkgver() {
	cd "${pkgname}"
	(
		 set -o pipefail
		 git describe --long --tags 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' ||
		 printf "%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
	)
}

# TODO: Tests are failing at the moment, needs investigating.
# check () {
# 	cd "${pkgname}"
# 	export CFLAGS='-std=gnu99'
# 	make tests
# }

package () {
	cd "${pkgname}"
	python3 setup.py install --prefix=/usr --root="${pkgdir}"
}