Commit 4dcc1b1a authored by Jakub Jirutka's avatar Jakub Jirutka

main/lua-b64: rename from lua5.2-b64 and add lua5.[23]-b64 subpkgs

parent 6072a809
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=lua5.2-b64
_pkgname=lua-b64
pkgname=lua-b64
pkgver=0.1
pkgrel=1
pkgdesc="Lua 5.2 base64 implementation with support for urlsafe"
pkgrel=2
pkgdesc="Lua base64 implementation with support for urlsafe"
url="https://github.com/ncopa/lua-b64"
arch="all"
license="MIT"
makedepends="lua5.2-dev"
source="$_pkgname-$pkgver.tar.gz::https://github.com/ncopa/$_pkgname/archive/v$pkgver.tar.gz
depends="lua"
makedepends=""
subpackages=""
source="$pkgname-$pkgver.tar.gz::https://github.com/ncopa/$pkgname/archive/v$pkgver.tar.gz
0001-b64-fix-segfault-caused-by-signed-char.patch"
builddir="$srcdir/$_pkgname-$pkgver"
builddir="$srcdir/$pkgname-$pkgver"
_luaversions="5.2 5.3"
for _v in $_luaversions; do
makedepends="$makedepends lua$_v-dev"
subpackages="$subpackages lua$_v-${pkgname#lua-}:_subpackage"
done
prepare() {
default_prepare
local lver; for lver in $_luaversions; do
cp -r "$builddir" "$builddir-$lver"
done
}
build() {
cd "$builddir"
make
local lver; for lver in $_luaversions; do
msg "Building for Lua $lver..."
make -C "$builddir-$lver" LUAPC=lua$lver
done
}
package() {
cd "$builddir"
install -D b64.so "$pkgdir"/usr/lib/lua/5.2/b64.so
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 cmod_dir="$subpkgdir/$(pkg-config --variable=INSTALL_CMOD lua$lver)"
install -D -m 755 "$builddir-$lver"/b64.so "$cmod_dir"/b64.so
}
sha512sums="8740d5061db01dca166ce2c959548a3232c85dce156fce3502da35f457db79db2bf23242ee6d26b64f4141c451db733898328b8fc3d1f62b47e8f7ec790577d1 lua-b64-0.1.tar.gz
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment