diff --git a/main/pllua/APKBUILD b/main/pllua/APKBUILD
index 03be248d2edfb780529b353a9015ccd81435c6e6..d354ac8bae323915a46a59751a010c34246dcded 100644
--- a/main/pllua/APKBUILD
+++ b/main/pllua/APKBUILD
@@ -5,10 +5,10 @@ pkgver=1.1.0
 pkgrel=0
 pkgdesc="Procedural language for PostgreSQL using Lua"
 url="https://github.com/pllua/pllua"
-arch="all"
+arch="all !s390x"  # s390x: luajit is not avail
 license="GPL"
 depends="postgresql"
-makedepends="postgresql-dev lua-dev"
+makedepends="postgresql-dev luajit-dev"
 source="$pkgname-$pkgver.tar.gz::https://github.com/pllua/$pkgname/archive/v$pkgver.tar.gz
 	fix-on-32bit.patch
 	fix-postgres10.patch"
@@ -17,7 +17,9 @@ options="!check"  # tests require running PostgreSQL
 
 build() {
 	cd "$builddir"
-	LUA_INCDIR=/usr/include LUALIB='-llua' USE_PGXS=1 make
+	make LUA_INCDIR=$(pkgconf --variable=includedir luajit) \
+		LUALIB=$(pkgconf --libs luajit) \
+		USE_PGXS=1
 }
 
 package() {