summaryrefslogtreecommitdiffstats
path: root/testing/luasql-mysql/APKBUILD
blob: 42f5d7604d4ff1997ed3a8446cfcf6b2047d29d5 (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
# Maintainer: Natanael Copa <natanael.copa@gmail.com>
pkgname=luasql-mysql
pkgver=2.1.1
pkgrel=0
pkgdesc="MySQL driver for LuaSQL"
url="http://www.keplerproject.org/luasql/"
license="MIT"
depends="lua"
makedepends="lua-dev mysql-dev"
install=
subpackages=
source="http://luaforge.net/frs/download.php/2686/luasql-$pkgver.tar.gz"

build() {
	cd "$srcdir"/luasql-$pkgver

	# The config has DRIVER_INCS but it seems like its not respected
	# so we just fix the .c file
	sed -i -e 's:^\#include "mysql.h":\#include <mysql/mysql.h>:' \
		src/ls_mysql.c || return 1

	make CFLAGS="$CFLAGS" T=mysql DRIVER_LIBS="-lmysqlclient" || return 1
	install -D src/mysql.so "$pkgdir"/usr/lib/lua/5.1/luasql/mysql.so
}

md5sums="63bdd57de4b9d1be336ba112d8cb69eb  luasql-2.1.1.tar.gz"