aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2020-01-09 09:16:05 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2020-01-09 09:23:48 +0000
commit39a90c66a57cc652be19f48a18c28cda672698e5 (patch)
tree30065cb515629ba17220c5f8c62fefd3a52b3378
parentef6d7dc3376629321630176819f9686b0690bfd8 (diff)
downloadaports-39a90c66a57cc652be19f48a18c28cda672698e5.tar.gz
aports-39a90c66a57cc652be19f48a18c28cda672698e5.tar.bz2
aports-39a90c66a57cc652be19f48a18c28cda672698e5.tar.xz
main/lua-sec: upgrade to 0.9
-rw-r--r--main/lua-sec/APKBUILD33
1 files changed, 13 insertions, 20 deletions
diff --git a/main/lua-sec/APKBUILD b/main/lua-sec/APKBUILD
index 54e0715509..b688878b9a 100644
--- a/main/lua-sec/APKBUILD
+++ b/main/lua-sec/APKBUILD
@@ -2,28 +2,25 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
_luaversions="5.1 5.2 5.3"
pkgname=lua-sec
-pkgver=0.7
-pkgrel=1
+pkgver=0.9
+pkgrel=0
pkgdesc="TLS/SSL Support for Lua"
url="https://github.com/brunoos/luasec/wiki"
arch="all"
license="MIT"
-depends=
makedepends="openssl-dev"
-install=
subpackages="$pkgname-doc"
for _i in $_luaversions; do
makedepends="$makedepends lua$_i-dev"
- subpackages="$subpackages lua$_i-sec:split_${_i/./_}"
+ subpackages="$subpackages lua$_i-sec:_split"
done
-source="luasec-$pkgver.tar.gz::https://github.com/brunoos/luasec/archive/luasec-$pkgver.tar.gz"
-_builddir="$srcdir"/luasec-luasec-$pkgver
+source="luasec-$pkgver.tar.gz::https://github.com/brunoos/luasec/archive/v$pkgver.tar.gz"
prepare() {
cd "$srcdir"
for _i in $_luaversions; do
- cp -r "$srcdir"/luasec-luasec-$pkgver build-$_i
+ cp -r "$srcdir"/luasec-$pkgver build-$_i
done
}
@@ -31,14 +28,14 @@ build() {
for _i in $_luaversions; do
cd "$srcdir"/build-$_i
make linux INC_PATH="$(pkg-config --cflags lua$_i)" \
- LD="${CC:-gcc}" || return 1
+ LD="${CC:-gcc}"
done
}
package() {
for _i in $_luaversions; do
- _luasharedir=/usr/share/lua/$_i
- _lualibdir=/usr/lib/lua/$_i
+ local _luasharedir=/usr/share/lua/$_i
+ local _lualibdir=/usr/lib/lua/$_i
cd "$srcdir"/build-$_i
mkdir -p "$pkgdir"/$_luasharedir "$pkgdir"/$_lualibdir
make LUAPATH="$pkgdir"/$_luasharedir \
@@ -46,14 +43,14 @@ package() {
install
if ! [ -d "$pkgdir"/usr/share/doc/$pkgname/sambles ]; then
mkdir -p "$pkgdir"/usr/share/doc/$pkgname
- cp -r samples "$pkgdir"/usr/share/doc/$pkgname/ \
- || return 1
+ cp -r samples "$pkgdir"/usr/share/doc/$pkgname/
fi
done
}
_split() {
- local d= _ver=$1
+ local d= _ver=${subpkgname#lua}
+ _ver=${_ver%-*}
pkgdesc="TLS/SSL Support for Lua $_ver"
install_if="lua$_ver $pkgname=$pkgver-r$pkgrel"
replaces="$pkgname"
@@ -61,13 +58,9 @@ _split() {
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
+ mv "$pkgdir"/$d/$_ver "$subpkgdir"/$d/
fi
done
}
-for _i in $_luaversions; do
- eval "split_${_i/./_}() { _split $_i; }"
-done
-
-sha512sums="6adf5241aa5a0d92c9dd7fc7f7e426969475548f47979ccc28187471b3bad4132c215de6da1f471d21b05c6558d36309264512c9c4ac70a53d6f6e204cac1358 luasec-0.7.tar.gz"
+sha512sums="ea601016328232ca0ff12be72897eeedac88a78834a63e1c36d2828a3187039665a2c60597b5af1fa6917b6fe87cd292fbcdfabcd67bab968f587e038d52a933 luasec-0.9.tar.gz"