1 # Build recipe for luarocks.
3 # Copyright (C) 2020 Kevin "The Nuclear" Bloom, <kevin.bloom@posteo.net>.
4 # Copyright (c) 2020 Matias Fonzo, <selk@dragora.org>.
6 # Licensed under the Apache License, Version 2.0 (the "License");
7 # you may not use this file except in compliance with the License.
8 # You may obtain a copy of the License at
10 # http://www.apache.org/licenses/LICENSE-2.0
12 # Unless required by applicable law or agreed to in writing, software
13 # distributed under the License is distributed on an "AS IS" BASIS,
14 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 # See the License for the specific language governing permissions and
16 # limitations under the License.
22 # To define release of Lua
25 # Set 'outdir' for a nice and well-organized output directory
26 outdir="${outdir}/${arch}/lua"
28 tarname=${program}-${version}.tar.gz
31 fetch=http://luarocks.org/releases/${tarname}
34 The package manager for Lua modules.
36 Luarocks allows you to create and install Lua modules
37 as self-contained packages called rocks.
40 homepage=http://luarocks.org/
43 # Source documentation
44 docs="CHANGELOG.md COPYING CODE_OF_CONDUCT.md README.md"
45 docsdir="${docdir}/${program}-${version}"
47 # Limit parallel jobs for this build
54 unpack "${tardir}/$tarname"
58 # Set sane permissions
59 chmod -R u+w,go-w,a+rX-s .
64 --with-lua-lib=/usr/lib${libSuffix} \
66 --lua-version=${lua_version}
69 make -j${jobs} DESTDIR="$destdir" install
70 mkdir -p "${destdir}/usr/lib${libSuffix}/luarocks/rocks-${lua_version}"
72 # To manage (dot) new files
73 touch "${destdir}/etc/luarocks/.graft-config"
76 mkdir -p "${destdir}${docsdir}"
77 cp -p $docs "${destdir}${docsdir}"