diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2014-11-05 15:07:58 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2014-11-05 15:08:32 +0000 |
commit | c86ff816cb23c3dd39124556867e7563450c9d3f (patch) | |
tree | 2cf36a4158a63dcf10c5551d65b36f0533d4283c /main/lua-ossl/APKBUILD | |
parent | 9fcab355c2695c46f281a7e47e4d1a7b502058b3 (diff) | |
download | aports-c86ff816cb23c3dd39124556867e7563450c9d3f.tar.bz2 aports-c86ff816cb23c3dd39124556867e7563450c9d3f.tar.xz |
main/lua-ossl: build 5.1 module
Diffstat (limited to 'main/lua-ossl/APKBUILD')
-rw-r--r-- | main/lua-ossl/APKBUILD | 38 |
1 files changed, 34 insertions, 4 deletions
diff --git a/main/lua-ossl/APKBUILD b/main/lua-ossl/APKBUILD index fa1d9f9950..79e897b075 100644 --- a/main/lua-ossl/APKBUILD +++ b/main/lua-ossl/APKBUILD @@ -1,18 +1,27 @@ # Contributor: Natanael Copa <ncopa@alpinelinux.org> # Maintainer: + +_luaversions="5.1 5.2" pkgname=lua-ossl pkgver=20140718 _ver=${pkgver%_git*} -pkgrel=1 +pkgrel=2 pkgdesc="comprehensive OpenSSL Lua module" url="http://25thandclement.com/~william/projects/luaossl.html" arch="all" license="MIT" depends="" depends_dev="" -makedepends="$depends_dev lua5.2-dev openssl-dev" +makedepends="$depends_dev openssl-dev" install="" subpackages="" + +for _v in $_luaversions; do + depends="$depends lua$_v-ossl" + makedepends="$makedepends lua$_v-dev" + subpackages="$subpackages lua$_v-ossl:split_${_v/./_}" +done + source="luaossl-$_ver.tar.gz::https://github.com/wahern/luaossl/archive/rel-$_ver.tar.gz musl-fixes.patch 0001-parse-CRLs-from-PEM-and-DER-formats.patch @@ -32,15 +41,36 @@ prepare() { build() { cd "$_builddir" make config prefix=/usr || return 1 - make openssl5.2 || return 1 + for _v in $_luaversions; do + make openssl$_v || return 1 + done } package() { cd "$_builddir" - make DESTDIR="$pkgdir" install5.2 || return 1 + for _v in $_luaversions; do + make DESTDIR="$pkgdir" install$_v || return 1 + done rm -f "$pkgdir"/usr/lib/*.la } +_split() { + local d= _ver=$1 + pkgdesc="$pkgdesc for Lua $_ver" + depends= + for d in usr/lib/lua usr/share/lua; do + if [ -d "$pkgdir"/$d/$_ver ]; then + mkdir -p "$subpkgdir"/$d + mv "$pkgdir"/$d/$_ver "$subpkgdir"/$d/ || return 1 + fi + done +} + + +for _v in $_luaversions; do + eval "split_${_v/./_}() { _split $_v; }" +done + md5sums="38d7c4527580e03335299349be4d70bc luaossl-20140718.tar.gz 7d03f360ebc62b60279ff0f2066ed6f6 musl-fixes.patch 0ec967f53f6abaac1c9143338811e160 0001-parse-CRLs-from-PEM-and-DER-formats.patch" |