mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-12-28 21:02:25 +01:00
63 lines
1.5 KiB
Plaintext
63 lines
1.5 KiB
Plaintext
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
|
|
_luaversions="5.1 5.2 5.3"
|
|
pkgname=lua-iconv
|
|
pkgver=7
|
|
pkgrel=1
|
|
pkgdesc="Lua binding to the POSIX 'iconv' library"
|
|
url="http://ittner.github.io/lua-iconv/"
|
|
arch="all"
|
|
license="MIT"
|
|
depends=
|
|
makedepends=""
|
|
for _i in $_luaversions; do
|
|
makedepends="$makedepends lua$_i-dev"
|
|
subpackages="$subpackages lua$_i-iconv:split_${_i/./_}"
|
|
done
|
|
install=
|
|
source="https://github.com/downloads/ittner/lua-iconv/lua-iconv-$pkgver.tar.gz
|
|
0001-lua-iconv-make-close-available-from-lua.patch"
|
|
|
|
_builddir="$srcdir"/$pkgname-$pkgver
|
|
prepare() {
|
|
cd "$_builddir"
|
|
patch -p1 -i "$srcdir"/0001-lua-iconv-make-close-available-from-lua.patch
|
|
cd "$srcdir"
|
|
for _i in $_luaversions; do
|
|
cp -r $_builddir $_i || return 1
|
|
done
|
|
}
|
|
|
|
build() {
|
|
for _i in $_luaversions; do
|
|
msg "Build for Lua $_i"
|
|
cd "$srcdir"/$_i
|
|
make LUAPKG="lua$_i" \
|
|
CFLAGS="$CFLAGS $(pkg-config lua$_i --cflags)" \
|
|
|| return 1
|
|
done
|
|
}
|
|
|
|
package() {
|
|
cd "$srcdir"
|
|
for _i in $_luaversions; do
|
|
install -D -s $_i/iconv.so "$pkgdir"/usr/lib/lua/$_i/iconv.so \
|
|
|| return 1
|
|
done
|
|
}
|
|
|
|
_split() {
|
|
local d=usr/lib/lua _ver=$1
|
|
pkgdesc="$pkgdesc for Lua $_ver"
|
|
install_if="lua$_ver $pkgname=$pkgver-r$pkgrel"
|
|
depends=
|
|
mkdir -p "$subpkgdir/$d" || return 1
|
|
mv "$pkgdir/$d/$1" "$subpkgdir/$d"
|
|
}
|
|
|
|
for _v in $_luaversions; do
|
|
eval "split_${_v/./_}() { _split $_v; }"
|
|
done
|
|
|
|
md5sums="8a38b4e6ac8a9290093898793d16fe4b lua-iconv-7.tar.gz
|
|
88e23691e79f357a6048f226e8ed8e23 0001-lua-iconv-make-close-available-from-lua.patch"
|