diff options
author | Jakub Jirutka <jakub@jirutka.cz> | 2016-09-01 15:16:28 +0200 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2016-09-02 06:37:58 +0000 |
commit | 9296a3eed1937ae4695615caade2d7c6c7a7adca (patch) | |
tree | b428a04e5ded25559f246e7b31685fd40b9f884d /main/lua-ossl | |
parent | b86a56b70945a73869ce66e06ae1cf4269c23e53 (diff) | |
download | aports-9296a3eed1937ae4695615caade2d7c6c7a7adca.tar.bz2 aports-9296a3eed1937ae4695615caade2d7c6c7a7adca.tar.xz |
main/lua-ossl: improve abuild and claim maintainership
Diffstat (limited to 'main/lua-ossl')
-rw-r--r-- | main/lua-ossl/APKBUILD | 69 |
1 files changed, 23 insertions, 46 deletions
diff --git a/main/lua-ossl/APKBUILD b/main/lua-ossl/APKBUILD index 8dba198717..f54d779019 100644 --- a/main/lua-ossl/APKBUILD +++ b/main/lua-ossl/APKBUILD @@ -1,73 +1,50 @@ # Contributor: Natanael Copa <ncopa@alpinelinux.org> -# Maintainer: +# Maintainer: Jakub Jirutka <jakub@jirutka.cz> _luaversions="5.1 5.2 5.3" pkgname=lua-ossl +_pkgname=luaossl pkgver=20151221 _ver=${pkgver%_git*} pkgrel=0 -pkgdesc="comprehensive OpenSSL Lua module" +pkgdesc="A comprehensive OpenSSL Lua module" url="http://25thandclement.com/~william/projects/luaossl.html" -arch="all" +arch="noarch" license="MIT" depends="" -depends_dev="" -makedepends="$depends_dev openssl-dev" -install="" +makedepends="openssl-dev" subpackages="" - for _v in $_luaversions; do makedepends="$makedepends lua$_v-dev" - subpackages="$subpackages lua$_v-ossl:split_${_v/./_}" + subpackages="$subpackages lua$_v-${pkgname#lua-}:_package" done - -source="luaossl-$_ver.tar.gz::https://github.com/wahern/luaossl/archive/rel-$_ver.tar.gz - musl-fixes.patch - " - -_builddir="$srcdir"/luaossl-rel-$_ver -prepare() { - local i - cd "$_builddir" - for i in $source; do - case $i in - *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; - esac - done -} +source="luaossl-$_ver.tar.gz::https://github.com/wahern/$_pkgname/archive/rel-$pkgver.tar.gz + musl-fixes.patch" +builddir="$srcdir/$_pkgname-rel-$pkgver" build() { - cd "$_builddir" + cd "$builddir" + make config prefix=/usr || return 1 - for _v in $_luaversions; do - make openssl$_v || return 1 + local lver; for lver in $_luaversions; do + make openssl$lver || return 1 done } package() { - cd "$_builddir" - for _v in $_luaversions; do - make DESTDIR="$pkgdir" install$_v || return 1 - done -} - -_split() { - local d= _ver=$1 - pkgdesc="$pkgdesc for Lua $_ver" - install_if="lua$_ver $pkgname=$pkgver-r$pkgrel" - 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 + mkdir -p "$pkgdir" } +_package() { + local lver="${subpkgname:3:3}" + pkgdesc="$pkgdesc for Lua $lver" + arch="all" + depends="lua$lver" + install_if="lua$lver $pkgname=$pkgver-r$pkgrel" -for _v in $_luaversions; do - eval "split_${_v/./_}() { _split $_v; }" -done + cd "$builddir" + make DESTDIR="$subpkgdir" install$lver +} md5sums="97a11761177c90406c448e749913e4b8 luaossl-20151221.tar.gz fae339e1611cbf84937eb47eab4845ed musl-fixes.patch" |