summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 66bed6e785ce4c97f9133e84cd27a624714775be (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
# Maintainer: Javier Torres <jtorres@carto.com>
pkgname=carto-crankshaft
pkgver=0.5.2.r0.ce5d1f9
pkgrel=1
pkgdesc="CARTO Spatial Analysis extension for PostgreSQL "
arch=('x86_64')
url="https://github.com/CartoDB/crankshaft"
license=('BSD')
groups=()
depends=('python2' 'python2-joblib' 'python2-pysal' 'python2-scikit-learn')
makedepends=('git' 'python2-pip')
provides=()
conflicts=()
replaces=()
backup=()
options=()
install=
source=('git+https://github.com/CartoDB/crankshaft.git')
noextract=()
sha256sums=('SKIP')

pkgver() {
	cd "$srcdir/crankshaft"
	printf "%s" "$(git describe --long | sed 's/\([^-]*-\)g/r\1/;s/-/./g')"
}

prepare() {
	cd "$srcdir/crankshaft"

  sed -i "s|pip install|pip2 install --root=$pkgdir|g" src/py/Makefile
}

build() {
	cd "$srcdir/crankshaft"
}

package() {
	cd "$srcdir/crankshaft"

  install -d "$pkgdir/usr/share/postgresql/extension/"
  make deploy DESTDIR="$pkgdir" RUN_OPTIONS='--no-deps'
  install -Dm0644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}