diff options
author | Jakub Jirutka <jakub@jirutka.cz> | 2017-07-22 20:09:13 +0200 |
---|---|---|
committer | Jakub Jirutka <jakub@jirutka.cz> | 2017-07-22 20:44:51 +0200 |
commit | 26fecd4b4e36b7c0a73dea662996d74ca5d1433e (patch) | |
tree | 4073748537c51e5d113a51cc9d95ca45452d5eb3 /community/luarocks | |
parent | 5a1f4c721da7e259617df223da89a5d119742916 (diff) | |
download | aports-26fecd4b4e36b7c0a73dea662996d74ca5d1433e.tar.bz2 aports-26fecd4b4e36b7c0a73dea662996d74ca5d1433e.tar.xz |
community/luarocks: modernize abuild
Diffstat (limited to 'community/luarocks')
-rw-r--r-- | community/luarocks/APKBUILD | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/community/luarocks/APKBUILD b/community/luarocks/APKBUILD index 1773f83607..51d218bbe0 100644 --- a/community/luarocks/APKBUILD +++ b/community/luarocks/APKBUILD @@ -16,11 +16,11 @@ builddir="$srcdir/$pkgname-$pkgver" _lua_versions="5.1 5.2 5.3" for _v in $_lua_versions; do makedepends="$makedepends lua$_v-dev" - subpackages="$subpackages $pkgname${_v}:_package" + subpackages="$subpackages $pkgname${_v}:_subpackage" done prepare() { - default_prepare || return 1 + default_prepare # Create builddir for each Lua version. local lver; for lver in $_lua_versions; do @@ -43,9 +43,8 @@ build() { --with-lua-lib="$(pkg-config --variable=libdir lua$lver)" \ --with-downloader=curl \ --with-md5-checker=md5sum \ - --versioned-rocks-dir \ - || return 1 - make || return 1 + --versioned-rocks-dir + make done } @@ -53,7 +52,7 @@ package() { mkdir -p "$pkgdir" } -_package() { +_subpackage() { local lver="${subpkgname#$pkgname}" pkgdesc="Deployment and management system for Lua $lver modules" install_if="lua$lver $pkgname=$pkgver-r$pkgrel" @@ -61,11 +60,11 @@ _package() { cd "$builddir-$lver" - make install DESTDIR="$subpkgdir" || return 1 + make install DESTDIR="$subpkgdir" # Remove default script names which conflict per Lua version. rm "$subpkgdir"/usr/bin/luarocks \ - "$subpkgdir"/usr/bin/luarocks-admin || return 1 + "$subpkgdir"/usr/bin/luarocks-admin # Set the correct Lua version. sed -i "s/env lua/env lua${lver}/" \ |