mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2026-03-31 19:33:09 +02:00
43 lines
1.2 KiB
Plaintext
43 lines
1.2 KiB
Plaintext
# Contributor: Leo <thinkabit.ukim@gmail.com>
|
|
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
|
|
pkgname=lua-alt-getopt
|
|
pkgver=0.8.0
|
|
pkgrel=1
|
|
pkgdesc="Lua module for processing options similar to getopt_long(3)"
|
|
url="https://github.com/cheusov/lua-alt-getopt"
|
|
arch="noarch"
|
|
license="MIT"
|
|
source="$pkgname-$pkgver.tar.gz::https://github.com/cheusov/lua-alt-getopt/archive/$pkgver.tar.gz
|
|
"
|
|
options="!check"
|
|
|
|
_luaversions="5.1 5.2 5.3 5.4"
|
|
for _v in $_luaversions; do
|
|
makedepends="$makedepends lua$_v-dev"
|
|
subpackages="$subpackages lua$_v-alt-getopt:_split"
|
|
done
|
|
|
|
package() {
|
|
for _i in $_luaversions; do
|
|
mkdir -p "$pkgdir"/usr/share/lua/$_i
|
|
install -Dm644 alt_getopt.lua \
|
|
"$pkgdir"/usr/share/lua/$_i/alt_getopt.lua
|
|
done
|
|
}
|
|
|
|
_split() {
|
|
local d= _ver=${subpkgname%%-*}
|
|
_ver=${_ver#lua}
|
|
pkgdesc="$pkgdesc for Lua $_ver"
|
|
install_if="lua$_ver $pkgname=$pkgver-r$pkgrel"
|
|
depends=
|
|
for d in usr/lib/lua usr/share/lua; do
|
|
if [ -d "$pkgdir"/$d/$_ver ]; then
|
|
mkdir -p "$subpkgdir"/$d
|
|
mv "$pkgdir"/$d/$_ver "$subpkgdir"/$d/
|
|
fi
|
|
done
|
|
}
|
|
|
|
sha512sums="1c0768e98793ee060a8a70bc47355abf5feac3b51d9844a26816267c0901df9f30c9ef3280766dec2c5b754123ca548c8f49cb294bf4f04c378c62ea377e09de lua-alt-getopt-0.8.0.tar.gz"
|