aboutsummaryrefslogtreecommitdiffstats
path: root/main/postgresql-pllua/APKBUILD
blob: 35680381a0dbee78de081f8e2a0589b527e563cd (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
# Contributor: Michael Mason <ms13sp@gmail.com>
# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Michael Mason <ms13sp@gmail.com>
pkgname=postgresql-pllua
_pkgname=pllua-ng
pkgver=2.0.4
_pkgver="REL_${pkgver//./_}"
pkgrel=1
pkgdesc="Procedural language for PostgreSQL using Lua"
url="https://github.com/RhodiumToad/pllua-ng"
arch="all"
license="MIT"
depends="postgresql"
makedepends="postgresql-dev luajit-dev"
options="!check"  # tests require running PostgreSQL
provides="pllua=$pkgver-r$pkgrel"  # for backward compatibility
replaces="pllua"  # for backward compatibility
subpackages="$pkgname-dev"
source="https://github.com/RhodiumToad/$_pkgname/archive/$_pkgver/$_pkgname-$_pkgver.tar.gz"
builddir="$srcdir/$_pkgname-$_pkgver"

case "$CARCH" in
	s390x) makedepends="$makedepends llvm clang" ;;
esac

build() {
	make \
		LUAJIT=luajit \
		LUA_INCDIR=$(pkgconf --variable=includedir luajit) \
		LUALIB=$(pkgconf --libs luajit) \
		USE_PGXS=1
}

package() {
	make USE_PGXS=1 DESTDIR="$pkgdir" install
}

sha512sums="64d6bc74d09d8aeb3f479a18f526599caee4217af383b49bb38f798ac42f5f3644cafc09d1e817951ed60b828a03a7bd96af4f35fad1835ce8040969a97ad99e  pllua-ng-REL_2_0_4.tar.gz"