summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: e10f98182afc561a6d9b42ff787d4ac1e8dc32b3 (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
# Maintainer: vltr <rkuesters@gmail.com>
pkgname=postgresql-unit-git
pkgver=4.0.r2.g7845111
pkgrel=1
pkgdesc="SI Units for PostgreSQL"
url="https://github.com/ChristophBerg/postgresql-unit"
arch=('any')
license=('GPL3')
depends=('postgresql')
makedepends=('postgresql-libs' git)
source=(git+https://github.com/ChristophBerg/postgresql-unit)
sha1sums=('SKIP')

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

build() {
	cd postgresql-unit
	make
}

package() {
	cd postgresql-unit
	make DESTDIR=${pkgdir} install
}