summaryrefslogtreecommitdiff
path: root/community/luasql/PKGBUILD
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2013-08-13 01:33:19 -0700
committerroot <root@rshg054.dnsready.net>2013-08-13 01:33:19 -0700
commit7a65a910b77ad191d69881098c47f9b0c852d92e (patch)
tree9564e611af1442f8952a8cbddb3b0ad25ed71aab /community/luasql/PKGBUILD
parent60da6abff6c9577a783d72865f11de7a585e912e (diff)
Tue Aug 13 01:31:08 PDT 2013
Diffstat (limited to 'community/luasql/PKGBUILD')
-rw-r--r--community/luasql/PKGBUILD60
1 files changed, 60 insertions, 0 deletions
diff --git a/community/luasql/PKGBUILD b/community/luasql/PKGBUILD
new file mode 100644
index 000000000..1969e2304
--- /dev/null
+++ b/community/luasql/PKGBUILD
@@ -0,0 +1,60 @@
+# $Id: PKGBUILD 87008 2013-03-25 19:16:48Z bpiotrowski $
+# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
+# Contributor: Sébastien Luttringer <seblu@archlinux.org>
+# Contributor: Anders Bergh <anders1@gmail.com>
+
+pkgbase=luasql
+pkgname=('lua-sql-mysql' 'lua-sql-postgres' 'lua-sql-sqlite')
+pkgver=2.2.0
+pkgrel=3
+arch=('i686' 'x86_64')
+url='http://www.keplerproject.org/luasql/'
+license=('MIT')
+makedepends=('lua' 'libmariadbclient' 'postgresql-libs' 'sqlite')
+source=("https://github.com/downloads/keplerproject/luasql/luasql-$pkgver.tar.gz"
+ 'lua52.patch')
+md5sums=('59d72db444c6369c936d4f03694db6b7'
+ 'a1d6083215e7a83cfc08621b6998914c')
+
+build() {
+ cd $pkgbase-$pkgver
+ patch -p1 < "$srcdir/lua52.patch"
+ msg2 'Building sqlite support'
+ make T=sqlite3 PREFIX=/usr DRIVER_LIBS='-lsqlite3' DRIVER_INCS='-fPIC -std=c99'
+ msg2 'Building PostgreSQL support'
+ make T=postgres PREFIX=/usr DRIVER_LIBS='-lpq' DRIVER_INCS='-fPIC'
+ msg2 'Building MySQL support'
+ make T=mysql PREFIX=/usr DRIVER_LIBS="$(mysql_config --libs)" \
+ DRIVER_INCS="$(mysql_config --include) -fPIC"
+}
+
+package_lua-sql-mysql() {
+ pkgdesc='MySQL module for Lua'
+ depends=('lua' 'libmariadbclient')
+ conflicts=('luasql-mysql')
+ replaces=('luasql-mysql')
+
+ cd $pkgbase-$pkgver
+ install -Dm644 src/mysql.so "$pkgdir/usr/lib/lua/5.2/luasql/mysql.so"
+ install -Dm644 doc/us/license.html "$pkgdir/usr/share/licenses/$pkgname/license.html"
+}
+
+package_lua-sql-postgres() {
+ pkgdesc='PostgreSQL module for Lua'
+ depends=('lua' 'postgresql-libs')
+
+ cd $pkgbase-$pkgver
+ install -Dm644 src/postgres.so "$pkgdir/usr/lib/lua/5.2/luasql/postgres.so"
+ install -Dm644 doc/us/license.html "$pkgdir/usr/share/licenses/$pkgname/license.html"
+}
+
+package_lua-sql-sqlite() {
+ pkgdesc='SQLite module for Lua'
+ depends=('lua' 'sqlite')
+
+ cd $pkgbase-$pkgver
+ install -Dm644 src/sqlite3.so "$pkgdir/usr/lib/lua/5.2/luasql/sqlite3.so"
+ install -Dm644 doc/us/license.html "$pkgdir/usr/share/licenses/$pkgname/license.html"
+}
+
+# vim:set ts=2 sw=2 et: