Package Details: lua-sql-mysql 2.6.0-1

Git Clone URL: https://aur.archlinux.org/luasql.git (read-only, click to copy)
Package Base: luasql
Description: MySQL module for Lua
Upstream URL: https://keplerproject.github.io/luasql
Licenses: MIT
Conflicts: luasql-mysql
Replaces: luasql-mysql
Submitter: Barthalion
Maintainer: alerque
Last Packager: alerque
Votes: 2
Popularity: 0.000000
First Submitted: 2018-01-07 16:33 (UTC)
Last Updated: 2024-03-28 15:07 (UTC)

Latest Comments

Nazdravi commented on 2023-08-01 08:09 (UTC) (edited on 2023-08-01 08:16 (UTC) by Nazdravi)

Did not run unmodified with Lua5.4 (as it is installed currently). That's why patching PKGBUILD was necessary:

--- original/PKGBUILD   2023-07-31 22:17:07.603493494 +0200
+++ new/PKGBUILD    2023-08-01 09:53:57.093176209 +0200
@@ -14,10 +14,14 @@
 source=("$pkgname-$pkgver.tar.gz::https://github.com/keplerproject/luasql/archive/$pkgver.tar.gz")
 sha256sums=('8ec445c58fa6148be759080c08f37baea5c3fa84f766197db9bf9c8edb6f8e60')

+luaversion=$(lua -v | sed -E -e 's/^Lua ([0-9]+\.[0-9]+).*$/\1/')
+
 prepare() {
   cd $pkgbase-$pkgver
   # Lua 5.3 compat
   sed -i -e 's/luaL_optint/(int)luaL_optinteger/' src/ls_mysql.c
+  # currently installed lua version
+  sed -E -i -e 's/ 5\.2$/ '$luaversion'/' config
 }

 build() {
@@ -38,7 +42,7 @@
   replaces=('luasql-mysql')

   cd $pkgbase-$pkgver
-  install -Dm644 src/mysql.so "$pkgdir/usr/lib/lua/5.3/luasql/mysql.so"
+  install -Dm644 src/mysql.so "$pkgdir/usr/lib/lua/$luaversion/luasql/mysql.so"
   install -Dm644 doc/us/license.html "$pkgdir/usr/share/licenses/$pkgname/license.html"
 }

@@ -47,7 +51,7 @@
   depends=('lua' 'postgresql-libs')

   cd $pkgbase-$pkgver
-  install -Dm644 src/postgres.so "$pkgdir/usr/lib/lua/5.3/luasql/postgres.so"
+  install -Dm644 src/postgres.so "$pkgdir/usr/lib/lua/$luaversion/luasql/postgres.so"
   install -Dm644 doc/us/license.html "$pkgdir/usr/share/licenses/$pkgname/license.html"
 }

@@ -56,7 +60,7 @@
   depends=('lua' 'sqlite')

   cd $pkgbase-$pkgver
-  install -Dm644 src/sqlite3.so "$pkgdir/usr/lib/lua/5.3/luasql/sqlite3.so"
+  install -Dm644 src/sqlite3.so "$pkgdir/usr/lib/lua/$luaversion/luasql/sqlite3.so"
   install -Dm644 doc/us/license.html "$pkgdir/usr/share/licenses/$pkgname/license.html"
 }

alerque commented on 2020-02-09 07:18 (UTC)

Upstream seems to have moved here: https://keplerproject.github.io/luasql/