summaryrefslogtreecommitdiff
path: root/main/acf-lib/APKBUILD
blob: 0279472631a29b53273283ab26396f7e4ba46ff6 (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
# Contributor: Ted Trask <ttrask01@yahoo.com>
# Maintainer: Ted Trask <ttrask01@yahoo.com>
_luaversions="5.1 5.2"
pkgname=acf-lib
pkgver=0.10.1
pkgrel=0
pkgdesc="Lua libraries for ACF"
url="https://git.alpinelinux.org/cgit/acf/acf-lib"
arch="noarch"
license="GPL2"
depends="lua-subprocess"
subpackages=""
for _i in $_luaversions; do
	subpackages="$subpackages acf-lib-lua$_i:split_${_i/./_}"
done
source="http://dev.alpinelinux.org/archive/$pkgname/$pkgname-$pkgver.tar.xz"

package() {
	mkdir -p "$pkgdir"
	echo "package with pkgdir=$pkgdir"
	cd "$srcdir/$pkgname-$pkgver"
	for _i in $_luaversions; do
		sed "s~luadir=.*~luadir=\${prefix}/share/lua/$_i/acf~" -i config.mk
		make DESTDIR="$pkgdir-lua$_i" install
	done
}

_split() {
	local d= _ver=$1
	pkgdesc="Lua $_ver libraries for ACF"
	install_if="lua$_ver $pkgname=$pkgver-r$pkgrel"
	replaces="$pkgname"
	depends=
}

for _i in $_luaversions; do
	eval "split_${_i/./_}() { _split $_i; }"
done

sha512sums="714e78648c664e4e99f2762ceb55a79f80bcd080a00925e4af0ebf1a9c51ab743d71861d653645df09d38abfbb24fa32a55b6cba459e46a147dcdcdba6526a3c  acf-lib-0.10.1.tar.xz"