mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-08-31 03:11:18 +02:00
42 lines
1.2 KiB
Plaintext
42 lines
1.2 KiB
Plaintext
# 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"
|