blob: 7c718ee187a8f56266284c58c9a6332c09ac8a9c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
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"
|