diff options
Diffstat (limited to 'main/lua-discount/APKBUILD')
-rw-r--r-- | main/lua-discount/APKBUILD | 36 |
1 files changed, 29 insertions, 7 deletions
diff --git a/main/lua-discount/APKBUILD b/main/lua-discount/APKBUILD index 1736b0f77c..249bdca876 100644 --- a/main/lua-discount/APKBUILD +++ b/main/lua-discount/APKBUILD @@ -2,22 +2,44 @@ # Maintainer: Natanael Copa <ncopa@alpinelinux.org> pkgname=lua-discount pkgver=1.2.10.1 -pkgrel=2 +pkgrel=3 pkgdesc="Lua binding to discount, a Markdown implementation in C" url="http://asbradbury.org/projects/lua-discount" arch="all" license="BSD" -depends="lua" -makedepends="lua-dev" +depends="lua5.1-discount lua5.2-discount" +makedepends="lua5.1-dev lua5.2-dev" install= -subpackages= +subpackages="lua5.1-discount:_lua51 lua5.2-discount:_lua52" + source="http://luaforge.net/frs/download.php/3758/lua-discount-1.2.10.1.tar.gz" build() { - cd "$srcdir"/$pkgname-$pkgver + cd "$srcdir" + + for i in 5.1 5.2; do + cp -r $pkgname-$pkgver $i + (cd $i + make INCS="$(pkg-config --cflags lua$i)" + ) || return 1 + done +} - make || return 1 - install -D -m644 discount.so "$pkgdir"/usr/lib/lua/5.1/discount.so +package() { + cd "$srcdir" + for i in 5.1 5.2; do + install -D -m644 $i/discount.so \ + "$pkgdir"/usr/lib/lua/$i/discount.so || return 1 + done } +_split() { + pkgdesc="Lua $1 binding to discount, a Markdown implementation in C" + mkdir -p "$subpkgdir"/usr/lib/lua/ + mv "$pkgdir"/usr/lib/lua/$1 "$subpkgdir"/usr/lib/lua/ || return 1 +} + +_lua51() { _split 5.1; } +_lua52() { _split 5.2; } + md5sums="7dc7055816dc755aacb48bfd5eb2eb5b lua-discount-1.2.10.1.tar.gz" |