openbsd-ports/net/pmacct/Makefile

68 lines
1.6 KiB
Makefile
Raw Normal View History

2013-03-11 07:35:43 -04:00
# $OpenBSD: Makefile,v 1.14 2013/03/11 11:35:55 espie Exp $
COMMENT= IP accounting software
2011-04-12 07:32:50 -04:00
DISTNAME= pmacct-0.12.5
2012-04-23 13:15:17 -04:00
REVISION= 1
CATEGORIES= net
HOMEPAGE= http://www.pmacct.net/
# GPLv2
PERMIT_PACKAGE_CDROM= Yes
2010-11-19 17:31:32 -05:00
WANTLIB= c m pcap z sqlite3>=8
MASTER_SITES= ${HOMEPAGE}
2013-03-11 07:35:43 -04:00
NO_TEST= Yes
CONFIGURE_STYLE=gnu
CONFIGURE_ARGS= --enable-64bit \
--enable-ipv6 \
--enable-sqlite3 \
2012-04-26 02:33:15 -04:00
--with-sqlite3-includes="/usr/include" \
2011-12-12 07:07:19 -05:00
ac_cv_prog_MAKE="/usr/bin/make"
.ifdef DEBUG
MAKE_ARGS+= DEBUG=1
.endif
FLAVORS= mysql postgresql threads
FLAVOR?=
2012-04-26 02:33:15 -04:00
.if ${FLAVOR:Mpostgresql}
2010-11-19 17:31:32 -05:00
LIB_DEPENDS+= databases/postgresql
WANTLIB += pq>=2
CONFIGURE_ARGS+= --enable-pgsql \
--with-pgsql-includes="${LOCALBASE}/include/postgresql/"
.else
CONFIGURE_ARGS+= --disable-pgsql
.endif
2012-04-26 02:33:15 -04:00
.if ${FLAVOR:Mmysql}
2010-11-19 17:31:32 -05:00
LIB_DEPENDS+= databases/mysql
WANTLIB += lib/mysql/mysqlclient>=10
CONFIGURE_ARGS+= --enable-mysql
.else
CONFIGURE_ARGS+= --disable-mysql
.endif
2012-04-26 02:33:15 -04:00
.if ${FLAVOR:Mthreads}
WANTLIB += pthread
CONFIGURE_ARGS+= --enable-threads
.else
CONFIGURE_ARGS+= --disable-threads
.endif
post-install:
${INSTALL_DATA_DIR} ${PREFIX}/share/doc/pmacct
${INSTALL_DATA_DIR} ${PREFIX}/share/examples/pmacct/sql
${INSTALL_DATA} ${WRKSRC}/CONFIG-KEYS ${PREFIX}/share/doc/pmacct/
${INSTALL_DATA} ${WRKSRC}/EXAMPLES ${PREFIX}/share/doc/pmacct/
${INSTALL_DATA} ${WRKSRC}/docs/* ${PREFIX}/share/doc/pmacct/
${INSTALL_DATA} ${WRKSRC}/examples/* ${PREFIX}/share/examples/pmacct/
${INSTALL_DATA} ${WRKSRC}/sql/README* ${PREFIX}/share/doc/pmacct/
${INSTALL_DATA} `find ${WRKSRC}/sql -type f \! -name README*` \
${PREFIX}/share/examples/pmacct/sql/
.include <bsd.port.mk>