2013-10-29 02:07:34 +00:00
|
|
|
# Created by: Olexander Melnyk <olexander.v.melnyk@gmail.com>
|
|
|
|
# $FreeBSD$
|
|
|
|
|
|
|
|
PORTNAME= luadbi
|
|
|
|
PORTVERSION= 0.5
|
2015-09-04 18:57:49 +00:00
|
|
|
PORTREVISION= 2
|
2013-10-29 02:07:34 +00:00
|
|
|
CATEGORIES= databases
|
2015-05-14 10:15:04 +00:00
|
|
|
MASTER_SITES= GOOGLE_CODE
|
2013-10-29 02:07:34 +00:00
|
|
|
DISTNAME= ${PORTNAME}.${PORTVERSION}
|
|
|
|
|
|
|
|
MAINTAINER= olexander.v.melnyk@gmail.com
|
|
|
|
COMMENT= LuaDBI driver
|
|
|
|
|
|
|
|
LICENSE= MIT
|
|
|
|
|
|
|
|
NO_WRKSUBDIR= yes
|
|
|
|
|
2015-09-04 18:57:49 +00:00
|
|
|
USES= gmake lua:51 shebangfix
|
|
|
|
SHEBANG_FILES= DBI.lua
|
2013-10-29 02:07:34 +00:00
|
|
|
|
|
|
|
CFLAGS+= -fpic -I${LOCALBASE}/include -I${LUA_INCDIR} -I. \
|
|
|
|
-I${LOCALBASE}/include/postgresql/server
|
|
|
|
LDFLAGS+= -shared -L${LOCALBASE}/lib -L${LUA_LIBDIR}
|
|
|
|
MAKE_ENV+= COMMON_LDFLAGS="${LDFLAGS}"
|
|
|
|
|
|
|
|
OPTIONS_MULTI= DATABASE
|
|
|
|
OPTIONS_MULTI_DATABASE= MYSQL SQLITE3 PGSQL
|
|
|
|
OPTIONS_DEFAULT= MYSQL
|
|
|
|
|
|
|
|
PLIST_FILES= %%LUA_MODSHAREDIR%%/DBI.lua
|
|
|
|
|
2015-09-04 18:57:49 +00:00
|
|
|
MYSQL_USE= MYSQL=yes
|
|
|
|
MYSQL_LDFLAGS= -L ${LOCALBASE}/lib/mysql
|
|
|
|
MYSQL_CFLAGS= -I ${LOCALBASE}/include/mysql
|
|
|
|
MYSQL_ALL_TARGET= mysql
|
|
|
|
MYSQL_PLIST_FILES= %%LUA_MODLIBDIR%%/dbdmysql.so
|
2013-10-29 02:07:34 +00:00
|
|
|
|
2015-09-04 18:57:49 +00:00
|
|
|
SQLITE3_USE= SQLITE=3
|
|
|
|
SQLITE3_ALL_TARGET= sqlite3
|
|
|
|
SQLITE3_PLIST_FILES= %%LUA_MODLIBDIR%%/dbdsqlite3.so
|
2013-10-29 02:07:34 +00:00
|
|
|
|
2015-09-04 18:57:49 +00:00
|
|
|
PGSQL_USES= pgsql
|
|
|
|
PGSQL_ALL_TARGET= psql
|
|
|
|
PGSQL_PLIST_FILES= %%LUA_MODLIBDIR%%/dbdpostgresql.so
|
2013-10-29 02:07:34 +00:00
|
|
|
|
|
|
|
do-install:
|
|
|
|
@${MKDIR} ${STAGEDIR}${LUA_MODLIBDIR}
|
|
|
|
@${MKDIR} ${STAGEDIR}${LUA_MODSHAREDIR}
|
|
|
|
${CP} ${WRKSRC}/DBI.lua ${STAGEDIR}${LUA_MODSHAREDIR}
|
2015-09-04 18:57:49 +00:00
|
|
|
|
|
|
|
do-install-MYSQL-on:
|
2013-10-29 02:07:34 +00:00
|
|
|
${INSTALL_PROGRAM} ${WRKSRC}/dbdmysql.so ${STAGEDIR}${LUA_MODLIBDIR}
|
2015-09-04 18:57:49 +00:00
|
|
|
|
|
|
|
do-install-SQLITE3-on:
|
2013-10-29 02:07:34 +00:00
|
|
|
${INSTALL_PROGRAM} ${WRKSRC}/dbdsqlite3.so ${STAGEDIR}${LUA_MODLIBDIR}
|
2015-09-04 18:57:49 +00:00
|
|
|
|
|
|
|
do-install-PGSQL-on:
|
2013-10-29 02:07:34 +00:00
|
|
|
${INSTALL_PROGRAM} ${WRKSRC}/dbdpostgresql.so ${STAGEDIR}${LUA_MODLIBDIR}
|
|
|
|
|
|
|
|
.include <bsd.port.mk>
|