mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-04 01:48:54 +00:00
60d1a83c2a
- Replace ${MASTER_SITE_FOO} with FOO. - Merge MASTER_SITE_SUBDIR into MASTER_SITES when possible. (This means 99.9% of the time.) - Remove occurrences of MASTER_SITE_LOCAL when no subdirectory was present and no hint of what it should be was present. - Fix some logic. - And generally, make things more simple and easy to understand. While there, add magic values to the FESTIVAL, GENTOO, GIMP, GNUPG, QT and SAMBA macros. Also, replace some EXTRACT_SUFX occurences with USES=tar:*. Checked by: make fetch-urlall-list With hat: portmgr Sponsored by: Absolight
68 lines
1.6 KiB
Makefile
68 lines
1.6 KiB
Makefile
# Created by: Olexander Melnyk <olexander.v.melnyk@gmail.com>
|
|
# $FreeBSD$
|
|
|
|
PORTNAME= luadbi
|
|
PORTVERSION= 0.5
|
|
PORTREVISION= 1
|
|
CATEGORIES= databases
|
|
MASTER_SITES= GOOGLE_CODE
|
|
DISTNAME= ${PORTNAME}.${PORTVERSION}
|
|
|
|
MAINTAINER= olexander.v.melnyk@gmail.com
|
|
COMMENT= LuaDBI driver
|
|
|
|
LICENSE= MIT
|
|
|
|
NO_WRKSUBDIR= yes
|
|
|
|
USES= lua:51 gmake
|
|
|
|
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
|
|
|
|
.include <bsd.port.options.mk>
|
|
|
|
.if ${PORT_OPTIONS:MMYSQL}
|
|
USE_MYSQL= yes
|
|
LDFLAGS+= -L ${LOCALBASE}/lib/mysql
|
|
CFLAGS+= -I ${LOCALBASE}/include/mysql
|
|
ALL_TARGET+= mysql
|
|
PLIST_FILES+= %%LUA_MODLIBDIR%%/dbdmysql.so
|
|
.endif
|
|
|
|
.if ${PORT_OPTIONS:MSQLITE3}
|
|
USE_SQLITE= 3
|
|
ALL_TARGET+= sqlite3
|
|
PLIST_FILES+= %%LUA_MODLIBDIR%%/dbdsqlite3.so
|
|
.endif
|
|
|
|
.if ${PORT_OPTIONS:MPGSQL}
|
|
USES+= pgsql
|
|
ALL_TARGET+= psql
|
|
PLIST_FILES+= %%LUA_MODLIBDIR%%/dbdpostgresql.so
|
|
.endif
|
|
|
|
do-install:
|
|
@${MKDIR} ${STAGEDIR}${LUA_MODLIBDIR}
|
|
@${MKDIR} ${STAGEDIR}${LUA_MODSHAREDIR}
|
|
${CP} ${WRKSRC}/DBI.lua ${STAGEDIR}${LUA_MODSHAREDIR}
|
|
.if ${PORT_OPTIONS:MMYSQL}
|
|
${INSTALL_PROGRAM} ${WRKSRC}/dbdmysql.so ${STAGEDIR}${LUA_MODLIBDIR}
|
|
.endif
|
|
.if ${PORT_OPTIONS:MSQLITE3}
|
|
${INSTALL_PROGRAM} ${WRKSRC}/dbdsqlite3.so ${STAGEDIR}${LUA_MODLIBDIR}
|
|
.endif
|
|
.if ${PORT_OPTIONS:MPGSQL}
|
|
${INSTALL_PROGRAM} ${WRKSRC}/dbdpostgresql.so ${STAGEDIR}${LUA_MODLIBDIR}
|
|
.endif
|
|
|
|
.include <bsd.port.mk>
|