aboutsummaryrefslogtreecommitdiffstats
path: root/main/acf-lib/APKBUILD
blob: 415ed469d30616ea34deaf5ff08d8ba96a25eec5 (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: Ted Trask <ttrask01@yahoo.com>
# Maintainer: Ted Trask <ttrask01@yahoo.com>
_luaversions="5.1 5.2"
pkgname=acf-lib
pkgver=0.10.0
pkgrel=0
pkgdesc="Lua libraries for ACF"
url="http://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="943f68ac6131f05730e4bb6de8ff848be2c3c4804621a2810c0a0d32adb37b2171594771527abbf0bbcd9529c430b5f6ad7c10a41a6016e23333a70d726dbbe1  acf-lib-0.10.0.tar.xz"