[arch-commits] Commit in (lua51-dbi luadbi luadbi/trunk/PKGBUILD)

Sergej Pupykin spupykin at archlinux.org
Mon Nov 26 17:30:43 UTC 2018


    Date: Monday, November 26, 2018 @ 17:30:42
  Author: spupykin
Revision: 409786

luadbi: support all lua version

Added:
  luadbi/
Modified:
  luadbi/trunk/PKGBUILD
Deleted:
  lua51-dbi/

----------+
 PKGBUILD |   42 ++++++++++++++++++++++++++++++++++--------
 1 file changed, 34 insertions(+), 8 deletions(-)

Modified: luadbi/trunk/PKGBUILD
===================================================================
--- lua51-dbi/trunk/PKGBUILD	2018-11-26 16:29:46 UTC (rev 409785)
+++ luadbi/trunk/PKGBUILD	2018-11-26 17:30:42 UTC (rev 409786)
@@ -1,15 +1,15 @@
 # Maintainer: Sergej Pupykin <arch+pub at sergej.pp.ru>
 # Maintainer: Robert Knauer <robert at privatdemail.net>
 
-pkgname=lua51-dbi
+pkgname=luadbi
+pkgname=(lua51-dbi lua52-dbi lua-dbi)
 pkgver=0.7.1
-pkgrel=1
-pkgdesc="Database interface library for Lua (5.1)"
+pkgrel=2
+pkgdesc="Database interface library for Lua"
 arch=('x86_64')
 url="https://github.com/mwild1/luadbi"
 license=('MIT')
-makedepends=('sqlite3' 'libmariadbclient' 'postgresql')
-depends=('lua51')
+makedepends=('sqlite3' 'libmariadbclient' 'postgresql' 'lua' 'lua52' 'lua51')
 optdepends=('sqlite3: sqlite3 Support'
             'postgresql-libs: postgresql Support'
             'libmariadbclient: mysql Support')
@@ -16,13 +16,39 @@
 source=("$pkgname-$pkgver.tar.gz::https://github.com/mwild1/luadbi/archive/v$pkgver.tar.gz")
 sha1sums=('992c322b09e8a109c45aae938c14303a6b28720c')
 
+prepare() {
+  cp -r "$srcdir"/luadbi-$pkgver "$srcdir"/luadbi51-$pkgver
+  cp -r "$srcdir"/luadbi-$pkgver "$srcdir"/luadbi52-$pkgver
+}
+
 build() {
+  cd "$srcdir"/luadbi51-$pkgver
+  make free LUA_V=5.1
+
+  cd "$srcdir"/luadbi52-$pkgver
+  make free LUA_V=5.2
+
   cd "$srcdir"/luadbi-$pkgver
-  make free
+  make free LUA_V=5.3
 }
 
-package() {
+package_lua51-dbi() {
+  depends=('lua51')
+  cd "$srcdir"/luadbi51-$pkgver
+  make install_free DESTDIR="$pkgdir" LUA_V=5.1
+  install -Dm644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/COPYING"
+}
+
+package_lua52-dbi() {
+  depends=('lua52')
+  cd "$srcdir"/luadbi52-$pkgver
+  make install_free DESTDIR="$pkgdir" LUA_V=5.2
+  install -Dm644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/COPYING"
+}
+
+package_lua-dbi() {
+  depends=('lua')
   cd "$srcdir"/luadbi-$pkgver
-  make install_free DESTDIR="$pkgdir"
+  make install_free DESTDIR="$pkgdir" LUA_V=5.3
   install -Dm644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/COPYING"
 }


More information about the arch-commits mailing list