mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-08-06 05:47:13 +02:00
main/lua-b64: rename from lua5.2-b64 and add lua5.[23]-b64 subpkgs
This commit is contained in:
parent
6072a80961
commit
4dcc1b1a73
52
main/lua-b64/APKBUILD
Normal file
52
main/lua-b64/APKBUILD
Normal file
@ -0,0 +1,52 @@
|
||||
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
|
||||
pkgname=lua-b64
|
||||
pkgver=0.1
|
||||
pkgrel=2
|
||||
pkgdesc="Lua base64 implementation with support for urlsafe"
|
||||
url="https://github.com/ncopa/lua-b64"
|
||||
arch="all"
|
||||
license="MIT"
|
||||
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"
|
||||
|
||||
_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() {
|
||||
local lver; for lver in $_luaversions; do
|
||||
msg "Building for Lua $lver..."
|
||||
make -C "$builddir-$lver" LUAPC=lua$lver
|
||||
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 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
|
||||
6da3b8048b2e6772a4aac954ea2db35f9c21897d720e7ff9dc6c1d63ffc37eeb4fb91be46bc13b32a2c3d1b88997172fe259ea699ac8591f0f3e1fd53cae378b 0001-b64-fix-segfault-caused-by-signed-char.patch"
|
@ -1,26 +0,0 @@
|
||||
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
|
||||
pkgname=lua5.2-b64
|
||||
_pkgname=lua-b64
|
||||
pkgver=0.1
|
||||
pkgrel=1
|
||||
pkgdesc="Lua 5.2 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
|
||||
0001-b64-fix-segfault-caused-by-signed-char.patch"
|
||||
builddir="$srcdir/$_pkgname-$pkgver"
|
||||
|
||||
build() {
|
||||
cd "$builddir"
|
||||
make
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "$builddir"
|
||||
install -D b64.so "$pkgdir"/usr/lib/lua/5.2/b64.so
|
||||
}
|
||||
|
||||
sha512sums="8740d5061db01dca166ce2c959548a3232c85dce156fce3502da35f457db79db2bf23242ee6d26b64f4141c451db733898328b8fc3d1f62b47e8f7ec790577d1 lua-b64-0.1.tar.gz
|
||||
6da3b8048b2e6772a4aac954ea2db35f9c21897d720e7ff9dc6c1d63ffc37eeb4fb91be46bc13b32a2c3d1b88997172fe259ea699ac8591f0f3e1fd53cae378b 0001-b64-fix-segfault-caused-by-signed-char.patch"
|
Loading…
Reference in New Issue
Block a user