Commit d04f8adc authored by Natanael Copa's avatar Natanael Copa

main/lua-sql: add lua 5.3 and use install_if

parent ef41e800
# Contributor: Łukasz Jendrysik <scadu@yandex.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
_luaversions="5.1 5.2"
_luaversions="5.1 5.2 5.3"
_drivers="mysql postgres sqlite3 odbc"
pkgname=lua-sql
pkgver=2.3.0
pkgrel=2
pkgrel=3
pkgdesc="Lua SQL drivers"
url="http://www.keplerproject.org/luasql/"
url="http://keplerproject.github.io/luasql/doc/us/"
arch="all"
license="MIT"
depends=""
......@@ -87,11 +87,9 @@ package() {
_split() {
local d= _ver=$1 _driver=$2
pkgdesc="Lua $_ver SQL driver for $2"
install_if="lua$_ver lua-sql-$_driver=$pkgver-r$pkgrel"
depends=
replaces=
if [ "$_ver" = "5.1" ]; then
replaces="lua-sql-$_driver"
fi
mkdir -p "$subpkgdir"/usr/lib/lua/$_ver/luasql
mv "$pkgdir"/usr/lib/lua/$_ver/luasql/$_driver.so \
"$subpkgdir"/usr/lib/lua/$_ver/luasql/ || return 1
......@@ -103,13 +101,8 @@ for _i in $_luaversions; do
done
done
for _j in $_drivers; do
_deps=
for _i in $_luaversions; do
_deps="$_deps lua${_i}-sql-${_j}"
done
eval "split_$_j() {
pkgdesc=\"Lua SQL drivers for $_j\";
depends=\"$_deps\";
mkdir -p \"$subpkgdir\";
}"
done
......
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