Commit f3edb5b2 authored by Natanael Copa's avatar Natanael Copa

main/lua-xml: upgrade to 130610 and fix lua 5.2 support

parent 36534066
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
_luaversions="5.1 5.2"
pkgname=lua-xml
_name=LuaXML
pkgver=101012
pkgver=130610
pkgrel=1
pkgdesc="a minimal set of functions for the processing of XML data in Lua"
url="http://viremo.eludi.net/LuaXML/index.html"
arch="all"
license="MIT"
depends=
makedepends="lua-dev"
makedepends=""
install=
subpackages=
for _v in $_luaversions; do
depends="$depends lua$_v-xml"
makedepends="$makedepends lua$_v-dev"
subpackages="$subpackages lua$_v-xml:split_${_v/./_}"
done
source="http://viremo.eludi.net/LuaXML/LuaXML_$pkgver.zip"
_builddir="$srcdir"
prepare() {
cd "$_builddir"
for i in $source; do
case $i in
*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
esac
done
for i in $_luaversions; do
mkdir $i
cp *.c Makefile *.lua $i/ || return 1
done
}
build() {
cd "$_builddir"
make || return 1
for i in $_luaversions; do
cd "$_builddir"/$i
make INCDIR="$CFLAGS $(pkg-config --cflags lua$i)" \
LIBS= \
|| return 1
done
}
package() {
cd "$_builddir"
install -m755 -D LuaXML_lib.so "$pkgdir"/usr/lib/lua/5.1/LuaXML_lib.so\
|| return 1
install -m755 -D LuaXml.lua "$pkgdir"/usr/share/lua/5.1/LuaXml.lua \
|| return 1
for i in $_luaversions; do
cd "$_builddir"/$i
install -m755 -D LuaXML_lib.so \
"$pkgdir"/usr/lib/lua/$i/LuaXML_lib.so || return 1
install -m755 -D LuaXml.lua \
"$pkgdir"/usr/share/lua/$i/LuaXml.lua || return 1
done
}
md5sums="81c2f0c7c4238d3115e3c3e1ebc7d194 LuaXML_101012.zip"
_split() {
local d= _ver=$1
pkgdesc="$pkgdesc for Lua $_ver"
depends=
for d in usr/lib/lua usr/share/lua; do
if [ -d "$pkgdir"/$d/$_ver ]; then
mkdir -p "$subpkgdir"/$d
mv "$pkgdir"/$d/$_ver "$subpkgdir"/$d/ || return 1
fi
done
}
for _v in $_luaversions; do
eval "split_${_v/./_}() { _split $_v; }"
done
md5sums="25e4c276c5d8716af1de0c7853aec2b4 LuaXML_130610.zip"
sha256sums="f2c7475c9ff842d110cfcbc0d0859856b4df18baea3edb5b9379c41a92415e6e LuaXML_130610.zip"
sha512sums="8f4ab1ba0b186ae8778ec7e2cdf5ebb403233ac9a551c6e476d0554bc27b0eb16a69a070c56747d59d6ee7aa53be70245d9be302ca69ea02226c3543b0ca654f LuaXML_130610.zip"
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=lua5.2-xml
_name=LuaXML
pkgver=130610
pkgrel=0
pkgdesc="a minimal set of functions for the processing of XML data in Lua"
url="http://viremo.eludi.net/LuaXML/index.html"
arch="all"
license="MIT"
depends=
makedepends="lua5.2-dev"
install=
subpackages=
source="http://viremo.eludi.net/LuaXML/LuaXML_$pkgver.zip"
_builddir="$srcdir"
prepare() {
cd "$_builddir"
}
build() {
cd "$_builddir"
make \
INCDIR="$(pkg-config --cflags lua5.2)" \
LIBDIR="$(pkg-config --libs lua5.2)" \
|| return 1
}
package() {
cd "$_builddir"
install -m755 -D LuaXML_lib.so "$pkgdir"/usr/lib/lua/5.2/LuaXML_lib.so\
|| return 1
install -m755 -D LuaXml.lua "$pkgdir"/usr/share/lua/5.2/LuaXml.lua \
|| return 1
}
md5sums="25e4c276c5d8716af1de0c7853aec2b4 LuaXML_130610.zip"
sha256sums="f2c7475c9ff842d110cfcbc0d0859856b4df18baea3edb5b9379c41a92415e6e LuaXML_130610.zip"
sha512sums="8f4ab1ba0b186ae8778ec7e2cdf5ebb403233ac9a551c6e476d0554bc27b0eb16a69a070c56747d59d6ee7aa53be70245d9be302ca69ea02226c3543b0ca654f LuaXML_130610.zip"
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