diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2014-05-29 09:32:19 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2014-05-29 09:32:19 +0000 |
commit | 6ef416d04da9be0960a3de87bcb2613d9046e689 (patch) | |
tree | 553f20d2d395b22e9402e758d50ec9e87935c1de /main/lua-discount/APKBUILD | |
parent | d7b0660f5a429ae9f0515ce8b0fd5f8e0a1e982a (diff) | |
download | aports-6ef416d04da9be0960a3de87bcb2613d9046e689.tar.bz2 aports-6ef416d04da9be0960a3de87bcb2613d9046e689.tar.xz |
main/lua-discount: add support for lua 5.2
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" |