aboutsummaryrefslogtreecommitdiffstats
path: root/community/lua-fun
diff options
context:
space:
mode:
authorJakub Jirutka <jakub@jirutka.cz>2018-01-01 18:11:05 +0100
committerJakub Jirutka <jakub@jirutka.cz>2018-01-01 21:25:48 +0100
commit57c0127ab99dff84688ffd4df60086a01b77d91a (patch)
tree58c620e414f17ec7959fb7bc7509415906ee5e32 /community/lua-fun
parentccca3236711b56d6ecc58247063a4e4f51c80476 (diff)
downloadaports-57c0127ab99dff84688ffd4df60086a01b77d91a.tar.bz2
aports-57c0127ab99dff84688ffd4df60086a01b77d91a.tar.xz
community/lua-fun: install into lua/common, remove subpackages
Diffstat (limited to 'community/lua-fun')
-rw-r--r--community/lua-fun/APKBUILD31
1 files changed, 10 insertions, 21 deletions
diff --git a/community/lua-fun/APKBUILD b/community/lua-fun/APKBUILD
index bc1f7b65d1..07d2b2e6ca 100644
--- a/community/lua-fun/APKBUILD
+++ b/community/lua-fun/APKBUILD
@@ -4,13 +4,12 @@ pkgname=lua-fun
_rockname=fun
_pkgname=luafun
pkgver=0.1.3
-pkgrel=7
+pkgrel=8
pkgdesc="Functional programming library"
url="https://rtsisyk.github.io/luafun/"
arch="noarch"
license="MIT"
-depends=""
-makedepends=""
+depends="lua"
checkdepends=""
source="$pkgname-$pkgver.tar.gz::https://github.com/rtsisyk/$_pkgname/archive/$pkgver.tar.gz"
builddir="$srcdir/$_pkgname-$pkgver"
@@ -23,8 +22,8 @@ esac
_luaversions="5.1 5.2 5.3"
for _v in $_luaversions; do
- makedepends="$makedepends lua$_v-dev"
- subpackages="$subpackages lua$_v-${pkgname#lua-}:_subpackage"
+ checkdepends="$checkdepends lua$_v"
+ provides="lua$_v-${pkgname#lua-}=$pkgver-r$pkgrel" # for backward compatibility
done
check() {
@@ -32,28 +31,18 @@ check() {
local lver; for lver in $_luaversions $_luajit; do
msg "Testing on Lua $lver"
- lua$lver tests/runtest tests/*.lua || return 1
+ lua$lver tests/runtest tests/*.lua
done
}
package() {
- mkdir -p "$pkgdir"
-}
-
-_subpackage() {
- local lver="${subpkgname:3:3}"
- pkgdesc="$pkgdesc for Lua $lver"
- depends="lua$lver"
- install_if="$pkgname=$pkgver-r$pkgrel lua$lver"
- local rockdir="$subpkgdir/usr/lib/luarocks/rocks-$lver/$_rockname/$pkgver-1"
-
cd "$builddir"
- install -m 644 -D fun.lua "$subpkgdir"/usr/share/lua/$lver/fun.lua
- mkdir -p "$rockdir"
- echo 'rock_manifest = {}' > "$rockdir"/rock_manifest
+ install -m 644 -D fun.lua "$pkgdir"/usr/share/lua/common/fun.lua
+
+ echo 'rock_manifest = {}' > rock_manifest
+ install -D -m 644 rock_manifest \
+ "$pkgdir"/usr/lib/luarocks/rocks-common/$_rockname/$pkgver-1
}
-md5sums="ab774af3d0dea06656039e5fc3ee86ad lua-fun-0.1.3.tar.gz"
-sha256sums="b17a139e94a150595ffce09e800035f71fe9e0631b54b6fbf193dfe57255e4b7 lua-fun-0.1.3.tar.gz"
sha512sums="1959c22453a6f431e4f4ee1ca1e6001c126f8857e00b128e5303049fd574150a68b71490503356f11fefcbd0ef7fbac7b0ae7c182a395ad0c92d2047dfac0662 lua-fun-0.1.3.tar.gz"