mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-08-06 05:47:13 +02:00
community/luarocks: configure it to see rocks installed by apk
https://github.com/luarocks/luarocks/wiki/Integrating-distro-modules-with-LuaRocks
This commit is contained in:
parent
26fecd4b4e
commit
50395fcbaa
@ -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"
|
||||
|
6
community/luarocks/config.lua
Normal file
6
community/luarocks/config.lua
Normal file
@ -0,0 +1,6 @@
|
||||
rocks_trees = {
|
||||
{ name = 'user', root = home..'/.luarocks' },
|
||||
{ name = 'distro-modules', root = '/usr' },
|
||||
{ name = 'system', root = '/usr/local' },
|
||||
}
|
||||
deps_mode = 'all'
|
5
community/luarocks/luarocks5.1.trigger
Normal file
5
community/luarocks/luarocks5.1.trigger
Normal file
@ -0,0 +1,5 @@
|
||||
#!/bin/sh
|
||||
|
||||
luarocks-admin-5.1 make-manifest --local-tree --tree=/usr >/dev/null 2>&1
|
||||
|
||||
exit 0
|
5
community/luarocks/luarocks5.2.trigger
Normal file
5
community/luarocks/luarocks5.2.trigger
Normal file
@ -0,0 +1,5 @@
|
||||
#!/bin/sh
|
||||
|
||||
luarocks-admin-5.2 make-manifest --local-tree --tree=/usr >/dev/null 2>&1
|
||||
|
||||
exit 0
|
5
community/luarocks/luarocks5.3.trigger
Normal file
5
community/luarocks/luarocks5.3.trigger
Normal file
@ -0,0 +1,5 @@
|
||||
#!/bin/sh
|
||||
|
||||
luarocks-admin-5.3 make-manifest --local-tree --tree=/usr >/dev/null 2>&1
|
||||
|
||||
exit 0
|
Loading…
Reference in New Issue
Block a user