aboutsummaryrefslogtreecommitdiffstats
path: root/community/luarocks
diff options
context:
space:
mode:
authorJakub Jirutka <jakub@jirutka.cz>2017-07-22 20:21:02 +0200
committerJakub Jirutka <jakub@jirutka.cz>2017-07-22 20:44:52 +0200
commit50395fcbaa5939969c4423e1e60737f91c6d41b6 (patch)
treecef6fd1ae3d881278448bf934265afe967134dc1 /community/luarocks
parent26fecd4b4e36b7c0a73dea662996d74ca5d1433e (diff)
downloadaports-50395fcbaa5939969c4423e1e60737f91c6d41b6.tar.bz2
aports-50395fcbaa5939969c4423e1e60737f91c6d41b6.tar.xz
community/luarocks: configure it to see rocks installed by apk
https://github.com/luarocks/luarocks/wiki/Integrating-distro-modules-with-LuaRocks
Diffstat (limited to 'community/luarocks')
-rw-r--r--community/luarocks/APKBUILD16
-rw-r--r--community/luarocks/config.lua6
-rw-r--r--community/luarocks/luarocks5.1.trigger5
-rw-r--r--community/luarocks/luarocks5.2.trigger5
-rw-r--r--community/luarocks/luarocks5.3.trigger5
5 files changed, 32 insertions, 5 deletions
diff --git a/community/luarocks/APKBUILD b/community/luarocks/APKBUILD
index 51d218bbe0..f88b4ad5de 100644
--- a/community/luarocks/APKBUILD
+++ b/community/luarocks/APKBUILD
@@ -2,7 +2,7 @@
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=luarocks
pkgver=2.4.2
-pkgrel=0
+pkgrel=1
pkgdesc="Deployment and management system for Lua modules"
url="http://www.luarocks.org/"
arch="noarch"
@@ -10,7 +10,9 @@ license="MIT"
depends="curl"
makedepends=""
subpackages=""
-source="http://luarocks.org/releases/$pkgname-$pkgver.tar.gz"
+triggers=""
+source="http://luarocks.org/releases/$pkgname-$pkgver.tar.gz
+ config.lua"
builddir="$srcdir/$pkgname-$pkgver"
_lua_versions="5.1 5.2 5.3"
@@ -57,6 +59,7 @@ _subpackage() {
pkgdesc="Deployment and management system for Lua $lver modules"
install_if="lua$lver $pkgname=$pkgver-r$pkgrel"
depends="lua$lver"
+ triggers="$subpkgname.trigger=/usr/lib/luarocks/rocks-$lver/*"
cd "$builddir-$lver"
@@ -70,8 +73,11 @@ _subpackage() {
sed -i "s/env lua/env lua${lver}/" \
"$subpkgdir"/usr/bin/luarocks-$lver \
"$subpkgdir"/usr/bin/luarocks-admin-$lver
+
+ # Config based on:
+ # https://github.com/luarocks/luarocks/wiki/Integrating-distro-modules-with-LuaRocks
+ install -D -m 644 "$srcdir"/config.lua "$subpkgdir"/etc/$pkgname/config-$lver.lua
}
-md5sums="32f30478d6bb3594aff9b59ebe591bbd luarocks-2.4.2.tar.gz"
-sha256sums="0e1ec34583e1b265e0fbafb64c8bd348705ad403fe85967fd05d3a659f74d2e5 luarocks-2.4.2.tar.gz"
-sha512sums="30e3b3fb338387412f406c415af49d3624f4dfc05ac5f245185127a0288248ccfae924e7bbdd5b68fef00524c7cc70d9f632ae00f4c696bdf0582e71e8945bc4 luarocks-2.4.2.tar.gz"
+sha512sums="30e3b3fb338387412f406c415af49d3624f4dfc05ac5f245185127a0288248ccfae924e7bbdd5b68fef00524c7cc70d9f632ae00f4c696bdf0582e71e8945bc4 luarocks-2.4.2.tar.gz
+c41bf3f8491e25d69ce0fee379203cc3721f2c79bb9ff652488aa2d66bc1e4613bd59d331cf17b9f18521d4f63539ce946b6a39038dc844083463c2c96f71811 config.lua"
diff --git a/community/luarocks/config.lua b/community/luarocks/config.lua
new file mode 100644
index 0000000000..2b6c029f94
--- /dev/null
+++ b/community/luarocks/config.lua
@@ -0,0 +1,6 @@
+rocks_trees = {
+ { name = 'user', root = home..'/.luarocks' },
+ { name = 'distro-modules', root = '/usr' },
+ { name = 'system', root = '/usr/local' },
+}
+deps_mode = 'all'
diff --git a/community/luarocks/luarocks5.1.trigger b/community/luarocks/luarocks5.1.trigger
new file mode 100644
index 0000000000..1769aad4e0
--- /dev/null
+++ b/community/luarocks/luarocks5.1.trigger
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+luarocks-admin-5.1 make-manifest --local-tree --tree=/usr >/dev/null 2>&1
+
+exit 0
diff --git a/community/luarocks/luarocks5.2.trigger b/community/luarocks/luarocks5.2.trigger
new file mode 100644
index 0000000000..2f727a5ee9
--- /dev/null
+++ b/community/luarocks/luarocks5.2.trigger
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+luarocks-admin-5.2 make-manifest --local-tree --tree=/usr >/dev/null 2>&1
+
+exit 0
diff --git a/community/luarocks/luarocks5.3.trigger b/community/luarocks/luarocks5.3.trigger
new file mode 100644
index 0000000000..1b751b090d
--- /dev/null
+++ b/community/luarocks/luarocks5.3.trigger
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+luarocks-admin-5.3 make-manifest --local-tree --tree=/usr >/dev/null 2>&1
+
+exit 0