summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: e4cb229b9623680c622c80c0f182f0e6ad01aac6 (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
# Maintainer: éclairevoyant

_pkgname=python-geomag
pkgname="$_pkgname-todd-dembrey-git"
pkgver=r31.421564e
pkgrel=3
pkgdesc="Python library to calculate magnetic variation/declination (todd-dembrey fork)"
arch=(any)
# see https://code.google.com/archive/p/geomag/
license=(LGPL)
url="https://github.com/todd-dembrey/geomag"
depends=(python)
makedepends=(git python-setuptools)
provides=($_pkgname)
conflicts=($_pkgname)
source=("$_pkgname::git+$url" data-install.patch)
b2sums=('SKIP'
        '049527085f0b8cf75642b0d8469769ffd2f667064080c300b7720f0dab0897f53e0b1b7c9ad775d38a6f72a010812d1ba5d5ee612f414d06db459ec9d91a8f2b')

pkgver() {
	cd $_pkgname
	printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

prepare() {
	cd $_pkgname
	patch -Np1 -i ../data-install.patch
	echo 'include geomag/model_data/*.COF' > MANIFEST.in
}

build() {
	cd $_pkgname
	python setup.py build
}

package() {
	cd $_pkgname
	python setup.py install --root="$pkgdir" --optimize=1 --skip-build
}