freebsd-ports/security/webfwlog/Makefile
Stefan Eßer b7f05445c0 Add WWW entries to port Makefiles
It has been common practice to have one or more URLs at the end of the
ports' pkg-descr files, one per line and prefixed with "WWW:". These
URLs should point at a project website or other relevant resources.

Access to these URLs required processing of the pkg-descr files, and
they have often become stale over time. If more than one such URL was
present in a pkg-descr file, only the first one was tarnsfered into
the port INDEX, but for many ports only the last line did contain the
port specific URL to further information.

There have been several proposals to make a project URL available as
a macro in the ports' Makefiles, over time.

This commit implements such a proposal and moves one of the WWW: entries
of each pkg-descr file into the respective port's Makefile. A heuristic
attempts to identify the most relevant URL in case there is more than
one WWW: entry in some pkg-descr file. URLs that are not moved into the
Makefile are prefixed with "See also:" instead of "WWW:" in the pkg-descr
files in order to preserve them.

There are 1256 ports that had no WWW: entries in pkg-descr files. These
ports will not be touched in this commit.

The portlint port has been adjusted to expect a WWW entry in each port
Makefile, and to flag any remaining "WWW:" lines in pkg-descr files as
deprecated.

Approved by:		portmgr (tcberner)
2022-09-07 23:10:59 +02:00

117 lines
3.9 KiB
Makefile

PORTNAME= webfwlog
PORTVERSION= 1.1.1
CATEGORIES= security
MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/ \
http://devel.webfwlog.net/download/v1.1.x/
MAINTAINER= zeus@ix.netcom.com
COMMENT= Web-based firewall log analyzer
WWW= http://www.webfwlog.net/
LICENSE= GPLv2
USES= cpe php:web
GNU_CONFIGURE= yes
CONFIGURE_ARGS+= --enable-syslog \
--sysconfdir=${ETCDIR} \
--disable-dependency-tracking
USE_PHP= session
OPTIONS_DEFINE= DOCS
OPTIONS_MULTI= BACKENDS
OPTIONS_MULTI_BACKENDS= MYSQLIPV6 MYSQL PGSQL
BACKENDS_DESC= Database backends, choose at least one
OPTIONS_GROUP= GEOIPV2
OPTIONS_GROUP_GEOIPV2= LIBMAXMINDDB MAXMINDDB BDB
GEOIPV2_DESC= GEOIPv2 support
OPTIONS_DEFAULT= MYSQLIPV6 MYSQL
MYSQL_CONFIGURE_WITH= mysql
MYSQL_USE= php=mysqli
MYSQLIPV6_DESC= Build plugin for Mysql IPv6 support (implies MYSQL)
MYSQLIPV6_IMPLIES= MYSQL
MYSQLIPV6_CONFIGURE_ENABLE= mysql-ipv6
MYSQLIPV6_PLUGIN_DIR_REL= lib/mysql/plugin
MYSQLIPV6_PLUGIN_DIR= ${LOCALBASE}/${MYSQLIPV6_PLUGIN_DIR_REL}
MYSQLIPV6_CONFIGURE_ON= --libdir=${MYSQLIPV6_PLUGIN_DIR}
MYSQLIPV6_USES= libtool
MYSQLIPV6_USE= ldconfig=${MYSQLIPV6_PLUGIN_DIR}
MYSQLIPV6_PLIST_FILES= ${MYSQLIPV6_PLUGIN_DIR_REL}/libwebfwlog_udf.so \
${MYSQLIPV6_PLUGIN_DIR_REL}/libwebfwlog_udf.so.0 \
${MYSQLIPV6_PLUGIN_DIR_REL}/libwebfwlog_udf.so.0.0.0
PGSQL_CONFIGURE_WITH= pgsql
PGSQL_USE= php=pgsql
PGSQL_USES= pgsql
LIBMAXMINDDB_DESC= Full geoipv2 support for file logs, and lookup only
LIBMAXMINDDB_CONFIGURE_WITH= libmaxminddb
LIBMAXMINDDB_CPPFLAGS= -I${LOCALBASE}/include
LIBMAXMINDDB_LDFLAGS= -L${LOCALBASE}/lib
LIBMAXMINDDB_LIB_DEPENDS= libmaxminddb.so:net/libmaxminddb
MAXMINDDB_DESC= PHP extension for geoipv2 speed (implies LIBMAXMINDDB)
MAXMINDDB_IMPLIES= LIBMAXMINDDB
MAXMINDDB_RUN_DEPENDS= ${PHPBASE}/lib/php/${PHP_EXT_DIR}/maxminddb.so:devel/php-maxminddb
BDB_DESC= Use berkeley DB for file log speed (implies LIBMAXMINDDB)
BDB_IMPLIES= LIBMAXMINDDB
BDB_CONFIGURE_WITH= libdb=${BDB_LIB_NAME}
BDB_CPPFLAGS= -I${BDB_INCLUDE_DIR}
BDB_LDFLAGS= -L${BDB_LIB_DIR}
BDB_USES= bdb
PORTDOCS= AUTHORS COPYING CREDITS ChangeLog INSTALL \
README README.geoip README.pdf ReleaseNotes
SUB_FILES= pkg-message
SUB_LIST+= VERSION=${PORTVERSION}
PLIST_SUB+= WWWGRP=${WWWGRP}
.include <bsd.port.options.mk>
.if ${PORT_OPTIONS:MMYSQLIPV6}
USES+= mysql:server,client
.elif ${PORT_OPTIONS:MMYSQL}
USES+= mysql:client
.endif
do-install:
@${MKDIR} ${STAGEDIR}${WWWDIR}/include/
${INSTALL_DATA} ${WRKSRC}/webfwlog/style.css ${STAGEDIR}${WWWDIR}
${INSTALL_DATA} ${WRKSRC}/webfwlog/index.php ${STAGEDIR}${WWWDIR}
@(cd ${WRKSRC}/webfwlog/include/ && ${COPYTREE_SHARE} \*.php ${STAGEDIR}${WWWDIR}/include/)
@${MKDIR} ${STAGEDIR}${WWWDIR}-vendor
@(cd ${WRKSRC}/webfwlog-vendor/ && ${COPYTREE_SHARE} . ${STAGEDIR}${WWWDIR}-vendor)
@${RM} -r ${STAGEDIR}${WWWDIR}-vendor/maxmind-db/reader/ext
@${ECHO} "Installed web files in ${WWWDIR}"
@${MKDIR} ${STAGEDIR}${ETCDIR}
${INSTALL_DATA} ${WRKSRC}/webfwlog.conf ${STAGEDIR}${ETCDIR}/webfwlog.conf.sample
@${ECHO} "Installed ${ETCDIR}/webfwlog.conf"
${INSTALL_PROGRAM} ${WRKSRC}/src/wfwl_syslog ${STAGEDIR}${PREFIX}/bin/
@${ECHO} "Installed ${PREFIX}/bin/wfwl_syslog"
.if ${PORT_OPTIONS:MMYSQLIPV6} && exists (${MYSQLIPV6_PLUGIN_DIR})
@${MKDIR} ${STAGEDIR}${MYSQLIPV6_PLUGIN_DIR}
@(cd ${WRKSRC}/src/mysql && ${MAKE} DESTDIR=${STAGEDIR} install-strip)
@${ECHO} "Installed mysql shared library in ${MYSQLIPV6_PLUGIN_DIR}"
.endif
post-install-DOCS-on:
@${MKDIR} ${STAGEDIR}${DOCSDIR}/mysql
@${MKDIR} ${STAGEDIR}${DOCSDIR}/pgsql
@${MKDIR} ${STAGEDIR}${DOCSDIR}/examples
@(cd ${WRKSRC}/mysql/ && ${COPYTREE_SHARE} \* ${STAGEDIR}${DOCSDIR}/mysql/)
@(cd ${WRKSRC}/pgsql/ && ${COPYTREE_SHARE} \* ${STAGEDIR}${DOCSDIR}/pgsql/)
@(cd ${WRKSRC}/examples/ && ${COPYTREE_SHARE} \* ${STAGEDIR}${DOCSDIR}/examples/)
.for docs in ${PORTDOCS}
${INSTALL_DATA} ${WRKSRC}/${docs} ${STAGEDIR}${DOCSDIR}
.endfor
.include <bsd.port.mk>