diff --git a/mail/exilog/Makefile b/mail/exilog/Makefile index 09031d6a5ef9..2cdba1a826db 100644 --- a/mail/exilog/Makefile +++ b/mail/exilog/Makefile @@ -1,86 +1,80 @@ PORTNAME= exilog PORTVERSION= 0.5 -PORTREVISION= 10 +PORTREVISION= 11 CATEGORIES= mail MASTER_SITES= http://duncanthrax.net/exilog/ MAINTAINER= ports@FreeBSD.org COMMENT= Tool to centralize and visualize Exim logs with a web front end WWW= https://duncanthrax.net/exilog/ LICENSE= GPLv2 LICENSE_FILE= ${WRKSRC}/LICENSE +RUN_DEPENDS= p5-Net-Netmask>=0:net-mgmt/p5-Net-Netmask \ + p5-CGI>0:www/p5-CGI + USES= perl5 shebangfix SHEBANG_GLOB= *.pl -RUN_DEPENDS= p5-Net-Netmask>=0:net-mgmt/p5-Net-Netmask - -# Default sql backend -WITH_SQL_BACKEND?= mysql - -.if (${WITH_SQL_BACKEND} == "mysql") -WITH_MYSQL= yes -RUN_DEPENDS+= p5-DBD-mysql>=0:databases/p5-DBD-mysql -SERVER= mysql -.elif (${WITH_SQL_BACKEND} == "postgresql") -WITH_POSTGRESQL= yes -RUN_DEPENDS+= p5-DBD-Pg>=0:databases/p5-DBD-Pg -SERVER= postgresql -.else -BROKEN= you should specify sql backend using WITH_SQL_BACKEND -.endif -SUB_LIST+= SERVER=${SERVER} .ifndef WITHOUT_WWWDIR EXILOGDIR?= ${PREFIX}/www/exilog .else EXILOGDIR?= ${PREFIX}/exilog .endif -OPTIONS_DEFINE= DOCS +OPTIONS_DEFINE= DOCS AGENT +OPTIONS_MULTI= SQLBACKEND +OPTIONS_MULTI_SQLBACKEND= MYSQL PGSQL +OPTIONS_DEFAULT= AGENT DOCS MYSQL +OPTIONS_SUB= YES +AGENT_DESC= Include exilog agent -.include +MYSQL_RUN_DEPENDS= p5-DBD-mysql>=0:databases/p5-DBD-mysql +MYSQL_USES= mysql -.if defined(WITHOUT_AGENT) -PLIST_SUB+= AGENT="@comment " -.else -USE_RC_SUBR= exilog -PLIST_SUB+= AGENT="" +PGSQL_RUN_DEPENDS= p5-DBD-Pg>=0:databases/p5-DBD-Pg +PGSQL_USES= pgsql + +.include + +.if ${PORT_OPTIONS:MAGENT} +USE_RC_SUBR= ${PORTNAME} .endif NO_BUILD= yes NO_ARCH= yes PLIST_SUB+= EXILOGDIR="${EXILOGDIR:S,^${PREFIX}/,,}" PORTDOC_FILES= doc/Changelog \ doc/exilog.txt \ doc/mysql-db-script.sql \ doc/pgsql-db-script.sql post-extract: @${MV} ${WRKDIR}/${PORTNAME} ${WRKSRC} pre-patch: @${REINPLACE_CMD} -e 's,$$RealBin/exilog.conf,${PREFIX}/etc/exilog.conf,' ${WRKSRC}/exilog_config.pm @${REINPLACE_CMD} -e "s,\(use exilog_config\),use lib \'${EXILOGDIR}\'; \1," ${WRKSRC}/exilog_agent.pl @${REINPLACE_CMD} -e "s,\(use exilog_config\),use lib \'${EXILOGDIR}\'; \1," ${WRKSRC}/exilog_cleanup.pl + @${REINPLACE_CMD} -e "s,\(use exilog_config\),use lib \'${EXILOGDIR}\'; \1," ${WRKSRC}/exilog_cgi.pl do-install: ${MKDIR} ${STAGEDIR}${EXILOGDIR} ${STAGEDIR}${EXILOGDIR}/icons ${CP} ${WRKSRC}/*.pm ${WRKSRC}/*.css ${WRKSRC}/*.js ${STAGEDIR}${EXILOGDIR} ${CP} ${WRKSRC}/icons/* ${STAGEDIR}${EXILOGDIR}/icons -.if !defined(WITHOUT_AGENT) +.if ${PORT_OPTIONS:MAGENT} ${INSTALL_SCRIPT} ${WRKSRC}/exilog_agent.pl ${STAGEDIR}${PREFIX}/sbin .endif ${INSTALL_SCRIPT} ${WRKSRC}/exilog_cleanup.pl ${STAGEDIR}${PREFIX}/sbin ${INSTALL_SCRIPT} ${WRKSRC}/exilog_cgi.pl ${STAGEDIR}${EXILOGDIR} ${CP} ${WRKSRC}/exilog.conf-example ${STAGEDIR}${PREFIX}/etc/exilog.conf-dist - ${CHMOD} 0600 ${STAGEDIR}${PREFIX}/etc/exilog.conf-dist ${CP} ${FILESDIR}/htaccess ${STAGEDIR}${EXILOGDIR}/.htaccess ${MKDIR} ${STAGEDIR}${DOCSDIR} .for docfile in ${PORTDOC_FILES} ${INSTALL_DATA} ${WRKSRC}/${docfile} ${STAGEDIR}${DOCSDIR} .endfor -.include +.include diff --git a/mail/exilog/pkg-plist b/mail/exilog/pkg-plist index 7d9afdca2d1c..cbcd54f78225 100644 --- a/mail/exilog/pkg-plist +++ b/mail/exilog/pkg-plist @@ -1,63 +1,65 @@ @owner www @group www +@mode 600 etc/exilog.conf-dist @owner @group +@mode %%AGENT%%sbin/exilog_agent.pl sbin/exilog_cleanup.pl %%PORTDOCS%%%%DOCSDIR%%/Changelog %%PORTDOCS%%%%DOCSDIR%%/exilog.txt %%PORTDOCS%%%%DOCSDIR%%/mysql-db-script.sql %%PORTDOCS%%%%DOCSDIR%%/pgsql-db-script.sql %%EXILOGDIR%%/.htaccess %%EXILOGDIR%%/exilog_cgi.pl %%EXILOGDIR%%/exilog_cgi_html.pm %%EXILOGDIR%%/exilog_cgi_messages.pm %%EXILOGDIR%%/exilog_cgi_param.pm %%EXILOGDIR%%/exilog_cgi_queues.pm %%EXILOGDIR%%/exilog_cgi_servers.pm %%EXILOGDIR%%/exilog_config.pm %%EXILOGDIR%%/exilog_jscript.js %%EXILOGDIR%%/exilog_parse.pm %%EXILOGDIR%%/exilog_sql.pm %%EXILOGDIR%%/exilog_stylesheet.css %%EXILOGDIR%%/exilog_util.pm %%EXILOGDIR%%/icons/address.png %%EXILOGDIR%%/icons/arrival.png %%EXILOGDIR%%/icons/arrival_auth.png %%EXILOGDIR%%/icons/arrival_local.png %%EXILOGDIR%%/icons/arrival_normal.png %%EXILOGDIR%%/icons/arrival_tls.png %%EXILOGDIR%%/icons/arrival_tls_auth.png %%EXILOGDIR%%/icons/deferral_normal.png %%EXILOGDIR%%/icons/deferral_tls.png %%EXILOGDIR%%/icons/deferred.png %%EXILOGDIR%%/icons/delivered.png %%EXILOGDIR%%/icons/delivery.png %%EXILOGDIR%%/icons/delivery_normal.png %%EXILOGDIR%%/icons/delivery_tls.png %%EXILOGDIR%%/icons/dns.png %%EXILOGDIR%%/icons/dsn_warning.png %%EXILOGDIR%%/icons/errmsg.png %%EXILOGDIR%%/icons/error.png %%EXILOGDIR%%/icons/error_normal.png %%EXILOGDIR%%/icons/error_tls.png %%EXILOGDIR%%/icons/event_type.png %%EXILOGDIR%%/icons/find.png %%EXILOGDIR%%/icons/frozen.png %%EXILOGDIR%%/icons/helo.png %%EXILOGDIR%%/icons/ident.png %%EXILOGDIR%%/icons/queue_deferred.png %%EXILOGDIR%%/icons/queue_frozen.png %%EXILOGDIR%%/icons/queue_normal.png %%EXILOGDIR%%/icons/queued.png %%EXILOGDIR%%/icons/reject_postdata.png %%EXILOGDIR%%/icons/reject_predata.png %%EXILOGDIR%%/icons/router_transport.png %%EXILOGDIR%%/icons/server.png %%EXILOGDIR%%/icons/server_normal.png %%EXILOGDIR%%/icons/size.png %%EXILOGDIR%%/icons/stats_h24.png %%EXILOGDIR%%/icons/stopwatch.png %%EXILOGDIR%%/icons/timerange.png %%EXILOGDIR%%/icons/unknown.png