aboutsummaryrefslogtreecommitdiffstats
path: root/testing
diff options
context:
space:
mode:
authorLeonardo Arena <rnalrd@alpinelinux.org>2012-01-26 22:34:38 +0000
committerLeonardo Arena <rnalrd@alpinelinux.org>2012-01-26 22:35:16 +0000
commitfbe3f23374f511ad6406ab81d9a43c543acef843 (patch)
treebab64ab4025faaaff3adf545f30ef6cc3a9d55bb /testing
parentcc177e898dde61ffbc3282eda7df24dd2612e708 (diff)
downloadaports-fbe3f23374f511ad6406ab81d9a43c543acef843.tar.gz
aports-fbe3f23374f511ad6406ab81d9a43c543acef843.tar.bz2
aports-fbe3f23374f511ad6406ab81d9a43c543acef843.tar.xz
testing/lua-dbi: new aport
A database interface library for Lua
Diffstat (limited to 'testing')
-rw-r--r--testing/lua-dbi/APKBUILD66
-rw-r--r--testing/lua-dbi/lua-dbi-postgresql.patch9
2 files changed, 75 insertions, 0 deletions
diff --git a/testing/lua-dbi/APKBUILD b/testing/lua-dbi/APKBUILD
new file mode 100644
index 0000000000..aba26ab0a2
--- /dev/null
+++ b/testing/lua-dbi/APKBUILD
@@ -0,0 +1,66 @@
+# Contributor: Leonardo Arena <rnarld@alpinelinux.org>
+# Maintainer:
+pkgname=lua-dbi
+_realname=luadbi
+pkgver=0.5
+pkgrel=0
+pkgdesc="A database interface library for Lua"
+url="http://code.google.com/p/luadbi"
+arch="all"
+license="GPL"
+depends=""
+makedepends="lua-dev mysql-dev postgresql-dev sqlite-dev"
+install=""
+subpackages="$pkgname-mysql $pkgname-postgresql $pkgname-sqlite"
+source="http://luadbi.googlecode.com/files/$_realname.$pkgver.tar.gz
+ lua-dbi-postgresql.patch"
+
+_builddir="$srcdir"
+
+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
+}
+
+build() {
+ cd "$_builddir"
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ # install -d "$pkgdir"/usr/lib/lua/5.1
+ install -D -m755 "$srcdir"/DBI.lua "$pkgdir"/usr/lib/lua/5.1/DBI.lua || return 1
+ rm -f "$pkgdir"/usr/lib/*.la
+}
+
+_mv_backend() {
+ install -d "$subpkgdir"/usr/lib/lua/5.1
+ mv "$srcdir"/dbd${1}.so "$subpkgdir"/usr/lib/lua/5.1
+}
+
+sqlite() {
+ pkgdesc="lua-dbi SQLite backend"
+ depends="lua-dbi sqlite"
+ _mv_backend sqlite3
+}
+
+mysql() {
+ pkgdesc="lua-dbi MySQL backend"
+ depends="lua-dbi mysql"
+ _mv_backend mysql
+}
+
+postgresql() {
+ pkgdesc="lua-dbi PostgreSQL backend"
+ depends="lua-dbi postgresql"
+ _mv_backend postgresql
+}
+
+md5sums="ede2b003aadddc151aac87050c3d926e luadbi.0.5.tar.gz
+67fa36ca81d2d7003be5a3f86d35c79c lua-dbi-postgresql.patch"
diff --git a/testing/lua-dbi/lua-dbi-postgresql.patch b/testing/lua-dbi/lua-dbi-postgresql.patch
new file mode 100644
index 0000000000..2d2ba272da
--- /dev/null
+++ b/testing/lua-dbi/lua-dbi-postgresql.patch
@@ -0,0 +1,9 @@
+--- a/dbd/postgresql/dbd_postgresql.h.old 2010-05-01 06:25:12.000000000 +0200
++++ b/dbd/postgresql/dbd_postgresql.h 2011-04-19 16:59:53.364944209 +0200
+@@ -1,5 +1,5 @@
+ #include <libpq-fe.h>
+-#include <postgres_fe.h>
++#include <server/postgres_fe.h>
+ #include <dbd/common.h>
+
+ /*