blob: 399192c509f2b49cb77eb3a8d3f812d95a60d875 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
# $Id: PKGBUILD 81122 2012-12-12 00:49:33Z eric $
# 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=1
arch=('i686' 'x86_64')
url='http://www.keplerproject.org/luasql/'
license=('MIT')
conflicts=('luasql-mysql')
makedepends=('lua' 'libmysqlclient' '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' 'libmysqlclient')
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:
|