aboutsummaryrefslogtreecommitdiffstats
path: root/main/postgresql-pllua/APKBUILD
blob: 9f3354669bd232675910b8dcc1cc49e7b2f797c9 (plain) (blame)
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
# Contributor: Michael Mason <ms13sp@gmail.com>
# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Michael Mason <ms13sp@gmail.com>
pkgname=postgresql-pllua
pkgver=2.0.6
_pkgver="REL_${pkgver//./_}"
pkgrel=1
pkgdesc="Procedural language for PostgreSQL using Lua"
url="https://github.com/RhodiumToad/pllua-ng"
arch="all !riscv64"
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/pllua-ng/archive/$_pkgver/pllua-ng-$_pkgver.tar.gz
	luajit.patch
	"
builddir="$srcdir/pllua-ng-$_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="910e3805f0ce8fb82d78c137069fbeb7f48d790e4a50eb0585a0c55d9e38692982cb5117f4e92e5e15eaa05e95f51eeba38ec17dafd59a6f03d7f96291458544  pllua-ng-REL_2_0_6.tar.gz
4ea62efdd67c18f40e01400bf1c23bd15eb2061d012a0b0fe9a7553751406a05e631afb4e50b0315b215550643a78a702c8534c55048aa60729e83d4d7e57cfb  luajit.patch"