From 17f7ee70bdb907629c089d1804aa8d4b1189a80d Mon Sep 17 00:00:00 2001 From: Rajdeep Malakar Date: Sat, 21 Oct 2023 01:47:54 +0530 Subject: [PATCH] +luarocks.org (#3741) * +luarocks.org * omit unnecessary env * fix tests * fix * fix lua hardcoded paths --------- Co-authored-by: Jacob Heider --- projects/luarocks.org/package.yml | 39 +++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 projects/luarocks.org/package.yml diff --git a/projects/luarocks.org/package.yml b/projects/luarocks.org/package.yml new file mode 100644 index 00000000..a8ce15ba --- /dev/null +++ b/projects/luarocks.org/package.yml @@ -0,0 +1,39 @@ +distributable: + url: https://github.com/luarocks/luarocks/archive/refs/tags/v{{version.raw}}.tar.gz + strip-components: 1 + +versions: + github: luarocks/luarocks/tags + strip: /v/ + +dependencies: + lua.org: '*' + info-zip.org/unzip: '*' + +build: + dependencies: + gnu.org/make: ^4 + gnu.org/sed: ^4 + script: + - ./configure $ARGS + - make --jobs {{ hw.concurrency }} install + - run: | + fix-shebangs.ts luarocks-admin luarocks + sed -i.bak \ + -e 's|\[\[{{prefix}}|debug.getinfo(1).source:match("@?(.*/)") .. \[\[..|g' \ + luarocks-admin luarocks + rm luarocks-admin.bak luarocks.bak + working-directory: ${{prefix}}/bin + env: + ARGS: + - --prefix="{{prefix}}" + - --sysconfdir="{{prefix}}/etc" + - --rocks-tree="{{prefix}}" + - --force-config + - --disable-incdir-check + +provides: + - bin/luarocks + - bin/luarocks-admin + +test: test "$(luarocks --version | awk 'NR==1 {print $NF}')" = "{{version.raw}}"