freebsd-ports/net/traff/Makefile
Robert Clausecker 98a1bc7f0d net/traff: fix build with -fno-common
Also:

 * define LICENSE
 * fix missing LIB_DEPENDS on libargp.so

PR:		267594
Reported by:	fuz@fuz.su
Approved by:	daniel@freebsd.ro (maintainer, timeout 2 weeks)
MFH:		2022Q4 (build fix)
2022-11-17 08:03:33 +01:00

49 lines
1.1 KiB
Makefile

PORTNAME= traff
PORTVERSION= 0.7
PORTREVISION= 2
CATEGORIES= net net-mgmt
MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/${PORTNAME}-${PORTVERSION}
MAINTAINER= daniel@freebsd.ro
COMMENT= Libpcab based fast traffic accounting program
WWW= https://sourceforge.net/projects/traff
LICENSE= GPLv2
LICENSE_FILE= ${WRKSRC}/COPYING
LIB_DEPENDS= libargp.so:devel/argp-standalone
USES= gmake
USE_RC_SUBR= traff
GNU_CONFIGURE= yes
LIBS+= -L${LOCALBASE}/lib -largp
OPTIONS_DEFINE= MYSQL PGSQL
OPTIONS_DEFAULT= MYSQL
.include <bsd.port.options.mk>
.if ${PORT_OPTIONS:MMYSQL}
USES+= mysql
CPPFLAGS+= -DwithMYSQL -I${LOCALBASE}/include
LIBS+= -L${LOCALBASE}/lib/mysql -lmysqlclient_r
CONFIGURE_ARGS+=--enable-mysql
.endif
.if ${PORT_OPTIONS:MPGSQL}
USES+= pgsql
CPPFLAGS+= -DwithPGSQL -I${LOCALBASE}/include
LIBS+= -L${LOCALBASE}/lib -lpq
CONFIGURE_ARGS+=--enable-postgresql
.endif
post-configure:
@${REINPLACE_CMD} -e "s|%%PREFIX%%|${PREFIX}|g" \
${WRKSRC}/Makefile ${WRKSRC}/traff.c
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/traff ${STAGEDIR}${PREFIX}/sbin
${INSTALL_DATA} ${WRKSRC}/traff.conf ${STAGEDIR}${PREFIX}/etc/traff.conf.sample
.include <bsd.port.mk>