mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-08-06 22:07:19 +02:00
testing/lua-linenoise: new aport
Lua bindings for linenoise https://github.com/hoelzro/lua-linenoise
This commit is contained in:
parent
9e0f3ef79e
commit
a8d366d7d1
45
testing/lua-linenoise/APKBUILD
Normal file
45
testing/lua-linenoise/APKBUILD
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
|
||||||
|
pkgname=lua-linenoise
|
||||||
|
pkgver=0.8
|
||||||
|
pkgrel=0
|
||||||
|
pkgdesc="Lua bindings for linenoise"
|
||||||
|
url="https://github.com/hoelzro/lua-linenoise"
|
||||||
|
arch="all"
|
||||||
|
license="MIT"
|
||||||
|
makedepends="linenoise-dev"
|
||||||
|
subpackages=""
|
||||||
|
source="lua-linenoise-$pkgver.tar.gz::https://github.com/hoelzro/lua-linenoise/archive/$pkgver.tar.gz"
|
||||||
|
builddir="$srcdir/lua-linenoise-$pkgver"
|
||||||
|
|
||||||
|
_luaversions="5.1 5.2 5.3"
|
||||||
|
for _v in $_luaversions; do
|
||||||
|
subpackages="$subpackages lua${_v}-${pkgname#lua-}:_subpackage"
|
||||||
|
makedepends="$makedepends lua${_v}-dev"
|
||||||
|
done
|
||||||
|
|
||||||
|
build() {
|
||||||
|
for _v in $_luaversions; do
|
||||||
|
msg "Lua $_v"
|
||||||
|
cp -r "$builddir" "$srcdir"/build-$_v
|
||||||
|
make -C "$srcdir"/build-$_v \
|
||||||
|
LIBLINENOISE="-l linenoise" \
|
||||||
|
CFLAGS="-fPIC $CFLAGS $(pkg-config --cflags lua$_v)"
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
package() {
|
||||||
|
mkdir -p "$pkgdir"
|
||||||
|
}
|
||||||
|
|
||||||
|
_subpackage() {
|
||||||
|
local lua="${subpkgname%-*}"
|
||||||
|
local lver=${lua#lua}
|
||||||
|
pkgdesc="$pkgdesc (for Lua ${lver})"
|
||||||
|
depends="$lua"
|
||||||
|
install_if="$pkgname=$pkgver-r$pkgrel $lua"
|
||||||
|
|
||||||
|
install -m 644 -D "$srcdir"/build-$lver/linenoise.so \
|
||||||
|
"$subpkgdir"/usr/lib/lua/${lver}/linenoise.so
|
||||||
|
}
|
||||||
|
|
||||||
|
sha512sums="7d4476570a3de054916047e201f8eabf2f1d4f8c0a6a5fa492dd477c580c81607a536a79c7a73a7f63ceeda0d6554a41f4f353ae34bb1d978679bc0aa5a757c4 lua-linenoise-0.8.tar.gz"
|
Loading…
Reference in New Issue
Block a user