aboutsummaryrefslogtreecommitdiffstats
path: root/main/lua-sqlite
diff options
context:
space:
mode:
authorCarlo Landmeter <clandmeter@gmail.com>2016-11-28 10:39:53 +0100
committerCarlo Landmeter <clandmeter@gmail.com>2016-11-28 10:56:14 +0100
commita09007e537931f0129248fdb269b60fdbb99ccab (patch)
tree29783e7b317706228ddd6205032e92d80a79e654 /main/lua-sqlite
parent8232770f359f6959bbaa338268f23592249279bf (diff)
downloadaports-a09007e537931f0129248fdb269b60fdbb99ccab.tar.bz2
aports-a09007e537931f0129248fdb269b60fdbb99ccab.tar.xz
main/lua-sqlite: upgrade to 0.9.4 and fix apkbuild
Diffstat (limited to 'main/lua-sqlite')
-rw-r--r--main/lua-sqlite/APKBUILD68
1 files changed, 35 insertions, 33 deletions
diff --git a/main/lua-sqlite/APKBUILD b/main/lua-sqlite/APKBUILD
index d365c5acf8..e6f88b9b5a 100644
--- a/main/lua-sqlite/APKBUILD
+++ b/main/lua-sqlite/APKBUILD
@@ -1,63 +1,65 @@
# Contributor: Carlo Landmeter <clandmeter@gmail.com>
# Maintainer: Carlo Landmeter <clandmeter@gmail.com>
pkgname=lua-sqlite
-pkgver=0.9.3
-_realver=fsl09w
+pkgver=0.9.4
+_uuid="fsl_9x"
+[ "$pkgver" != "0.9.4" ] && die "Please update uuid!"
_luaversions="5.1 5.2 5.3"
-pkgrel=3
+pkgrel=0
pkgdesc="Sqlite3 Binding for Lua"
url="http://lua.sqlite.org/index.cgi/home"
arch="all"
license="MIT"
depends=""
-depends_dev=""
-makedepends="$depends_dev sqlite-dev"
+makedepends="sqlite-dev"
install=""
subpackages=""
-source="$pkgname-$pkgver.zip::http://lua.sqlite.org/index.cgi/zip/lsqlite3_$pkgver.zip?uuid=fsl_9w"
+# the uuid determines the archive version and the filename the target directory
+source="$pkgname-$pkgver.zip::http://lua.sqlite.org/index.cgi/zip/$pkgname-$pkgver.zip?uuid=$_uuid"
+
+builddir="$srcdir"/$pkgname-$pkgver
for _v in $_luaversions; do
makedepends="$makedepends lua$_v-dev"
- subpackages="$subpackages lua$_v-${pkgname#*lua-}:split_${_v/./_}"
- eval "split_${_v/./_}() { _split $_v; }"
+ subpackages="$subpackages lua$_v-${pkgname#lua-}:_package:all"
done
-_builddir="$srcdir"/lsqlite3_$pkgver
-
prepare() {
- local i
- cd "$_builddir"
- for i in $source; do
- case $i in
- *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
- esac
- done
- for _v in $_luaversions; do
- cp -r $_builddir "$srcdir"/$pkgname-$_v
+ default_prepare || return 1
+
+ local lver
+ for lver in $_luaversions; do
+ cp -r "$builddir" "$builddir-$lver" || return 1
done
}
build() {
- cd "$_builddir"
+ local lver
+ for lver in $_luaversions; do
+ cd "$builddir-$lver"
+ msg "Building for Lua $lver..."
+ ${CC:-gcc} ${CFLAGS} $(pkg-config --cflags sqlite3) \
+ $(pkg-config --cflags lua$lver) -shared -fPIC \
+ -DLSQLITE_VERSION=\"$pkgver\" -o lsqlite3.so lsqlite3.c \
+ $(pkg-config --libs sqlite3) || return 1
+ done
}
package() {
mkdir -p "$pkgdir"
}
-_split() {
- local _ver="$1"
- cd "$srcdir"/$pkgname-$_ver || return 1
- pkgdesc="$pkgdesc (Lua $_ver)"
- install_if="lua$_ver $pkgname=$pkgver-r$pkgrel"
- ${CC:-gcc} ${CFLAGS} $(pkg-config --cflags sqlite3) \
- $(pkg-config --cflags lua$_ver) -shared -fPIC \
- -DLSQLITE_VERSION=\"$pkgver\" -o lsqlite3.so lsqlite3.c \
- $(pkg-config --libs sqlite3) || return 1
+_package() {
+ local lver="${subpkgname:3:3}"
+ pkgdesc="$pkgdesc (for Lua $lver)"
+ depends="lua$lver"
+ install_if="$pkgname=$pkgver-r$pkgrel lua$lver"
+
+ cd "$builddir-$lver"
install -Dm755 lsqlite3.so \
- "$subpkgdir"/usr/lib/lua/$_ver/lsqlite3.so || return 1
+ "$subpkgdir"/usr/lib/lua/$lver/lsqlite3.so || return 1
}
-md5sums="5f1562412d41db13ba16633728665ca9 lua-sqlite-0.9.3.zip"
-sha256sums="557a983ed708080cfb2e99e0610825aa716d3d3b2fec668d1233f7234bc4a7f0 lua-sqlite-0.9.3.zip"
-sha512sums="f81efa83b6087d7979c4b2958e3c63397708bf017bb9059d1c8df5adb45c10279925546296cf39fb0b39d0b40d9160b78baf4ac9049ed54b58ed858aa506d0f8 lua-sqlite-0.9.3.zip"
+md5sums="1389c43431e57c7f2d13b1293bf322d7 lua-sqlite-0.9.4.zip"
+sha256sums="a0d2e14853bf228e029c5ecab7e41a424126c40218742205e1d7bdd1416e34b2 lua-sqlite-0.9.4.zip"
+sha512sums="f9f786ec22a153495192555ed2d5736231bb740ed143a20118398614e53902d7bbd6939ef08622e367a34111403f7850fe47565a08a48abf6c50250ee11f6fd3 lua-sqlite-0.9.4.zip"