blob: 869aed1005762366b0ae5a4f8e42cab0e6590dce (
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
|
# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=lua-optparse
_pkgname=optparse
pkgver=1.3
pkgrel=0
pkgdesc="Parse and process command-line options"
url="https://github.com/gvvaughan/optparse"
arch="noarch"
license="MIT"
subpackages=""
source="$pkgname-$pkgver.tar.gz::https://github.com/gvvaughan/$_pkgname/archive/v$pkgver.tar.gz"
builddir="$srcdir/$_pkgname-$pkgver"
options="!check" # tests requires additional dependencies
_luaversions="5.1 5.2 5.3"
for _v in $_luaversions; do
subpackages="$subpackages lua$_v-${pkgname#lua-}:_subpackage"
done
package() {
mkdir -p "$pkgdir"
}
_subpackage() {
local lver="${subpkgname:3:3}"
pkgdesc="$pkgdesc (for Lua $lver)"
depends="lua$lver"
install_if="$pkgname=$pkgver-r$pkgrel lua$lver"
local lmod_dir="$subpkgdir/usr/share/lua/$lver"
local rockdir="$subpkgdir/usr/lib/luarocks/rocks-$lver/$_pkgname/$pkgver-1"
cd "$builddir"
mkdir -p "$lmod_dir"
cp -r "$builddir"/lib/* "$lmod_dir"/
mkdir -p "$rockdir"
echo 'rock_manifest = {}' > "$rockdir"/rock_manifest
}
sha512sums="a1ee1d2d1d0982dee6484e354158fdef5a6fbd04075ba4cc33018e387ceb3a881a518419247c7520d6466ef062fdc4c8f96e9428af5c7b2a8e65bdf7bec07ae1 lua-optparse-1.3.tar.gz"
|