blob: df6ed40a08d3dafbb2b720da85044a70e98487a7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=lua-cliargs
_pkgname=lua_cliargs
pkgver=3.0_p2
_pkgver=${pkgver%_p*}-${pkgver##*_p}
pkgrel=0
pkgdesc="A command-line argument parsing module for Lua"
url="https://github.com/amireh/lua_cliargs"
arch="noarch"
license="MIT"
makedepends=""
subpackages=""
source="$pkgname-$pkgver.tar.gz::https://github.com/amireh/$_pkgname/archive/v$_pkgver.tar.gz"
builddir="$srcdir/$_pkgname-$_pkgver"
_luaversions="5.1 5.2 5.3"
for _v in $_luaversions; do
makedepends="$makedepends luarocks$_v"
subpackages="$subpackages lua$_v-${pkgname#lua-}:_subpackage"
done
package() {
mkdir -p "$pkgdir"
}
_subpackage() {
local lver="${subpkgname:3:3}"
pkgdesc="$pkgdesc $lver"
depends="lua$lver"
install_if="$pkgname=$pkgver-r$pkgrel lua$lver"
local rockdir="$subpkgdir/usr/lib/luarocks/rocks-$lver/$_pkgname/$_pkgver"
cd "$builddir"
luarocks-$lver install \
--deps-mode=none \
--tree="$subpkgdir/usr" \
$_pkgname-$_pkgver.rockspec
rm -r "$rockdir"/../../manifest "$rockdir"/doc
}
sha512sums="e7a475f1d41249b0a35f021a6ccca46078f5b689c1927a4dd4cab80b2e4d291babaab35cf7d64fad3ebf68d871fb5177f030c7a2b28d9f55fbeb4dd26021d024 lua-cliargs-3.0_p2.tar.gz"
|