Date: Sat, 04 Jun 2005 20:09:42 +0400 From: Vsevolod Stakhov <vsevolod@highsecure.ru> To: FreeBSD-gnats-submit@FreeBSD.org Cc: sem@FreeBSD.org Subject: ports/81899: New port: mail/exilog Message-ID: <E1DebDS-000IMh-Gr@spray.anyhost.ru> Resent-Message-ID: <200506041610.j54GA6Yl065740@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 81899 >Category: ports >Synopsis: New port: mail/exilog >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Sat Jun 04 16:10:05 GMT 2005 >Closed-Date: >Last-Modified: >Originator: Vsevolod Stakhov >Release: FreeBSD 5.3-STABLE i386 >Organization: >Environment: >Description: Exilog is very nice utility to parse and visualize logs from multiply exim servers. >How-To-Repeat: >Fix: # This is a shell archive. Save it in a file, remove anything before # this line, and then unpack it by entering "sh file". Note, it may # create directories; files and directories will be owned by you and # have default permissions. # # This archive contains: # # exilog # exilog/Makefile # exilog/pkg-descr # exilog/distinfo # exilog/pkg-plist # exilog/files # exilog/files/exilog.sh # exilog/files/htaccess # exilog/files/patch-exilog_agent.pl # echo c - exilog mkdir -p exilog > /dev/null 2>&1 echo x - exilog/Makefile sed 's/^X//' >exilog/Makefile << 'END-of-exilog/Makefile' X# New ports collection makefile for: exilog X# Date created: 03 Jun 2005 X# Whom: Vsevolod Stakhov <vsevolod@highsecure.ru> X# X# $FreeBSD$ X# X XPORTNAME= exilog XPORTVERSION= 0.2 XCATEGORIES= mail XMASTER_SITES= http://duncanthrax.net/exilog/ X XMAINTAINER= vsevolod@highsecure.ru XCOMMENT= Tool to centralize and visualize Exim logs X XRUN_DEPENDS= ${SITE_PERL}/Net/Netmask.pm:${PORTSDIR}/net-mgmt/p5-Net-Netmask X XUSE_PERL5= yes XUSE_APACHE= yes XUSE_REINPLACE= yes XNO_BUILD= yes XWRKSRC= ${WRKDIR}/${PORTNAME} X X# Default sql backend XWITH_SQL_BACKEND?= mysql X X.if (${WITH_SQL_BACKEND} == "mysql") XWITH_MYSQL= yes XRUN_DEPENDS+= ${SITE_PERL}/${PERL_ARCH}/DBD/mysql.pm:${PORTSDIR}/databases/p5-DBD-mysql X.elif (${WITH_SQL_BACKEND} == "postgresql") XWITH_POSTGRESQL= yes XRUN_DEPENDS+= ${SITE_PERL}/${PERL_ARCH}/DBD/pg.pm:${PORTSDIR}/databases/p5-DBD-pg X.else XBROKEN= "You should specify sql backend using WITH_SQL_BACKEND" X.endif X X.ifndef WITHOUT_WWWDIR XEXILOGDIR?= ${PREFIX}/www/exilog X.else XEXILOGDIR?= ${PREFIX}/exilog X.endif X X.if defined(NO_AGENT) XPLIST_SUB+= AGENT="@comment " X.else XUSE_RC_SUBR= yes XPLIST_SUB+= AGENT="" X.endif X XPLIST_SUB+= EXILOGDIR="${EXILOGDIR:S,^${PREFIX}/,,}" X X.if !defined(NOPORTDOCS) XPORTDOC_FILES= doc/Changelog \ X doc/exilog.txt \ X doc/mysql-db-script.sql \ X doc/pgsql-db-script.sql X.endif X Xpre-patch: X @${REINPLACE_CMD} -e 's,$$RealBin/exilog.conf,${PREFIX}/etc/exilog.conf,' ${WRKSRC}/exilog_config.pm X @${REINPLACE_CMD} -e "s,\(use exilog_config\),use lib \'${EXILOGDIR}\'; \1," ${WRKSRC}/exilog_agent.pl X @${REINPLACE_CMD} -e "s,\(use exilog_config\),use lib \'${EXILOGDIR}\'; \1," ${WRKSRC}/exilog_cleanup.pl X @${SED} -e 's,%%RC_SUBR%%,${RC_SUBR},' \ X -e 's,%%PREFIX%%,${PREFIX},' ${FILESDIR}/exilog.sh > ${WRKDIR}/exilog.sh X Xdo-install: X @${MKDIR} ${EXILOGDIR} X @${CP} ${WRKSRC}/*.pm ${WRKSRC}/*.css ${WRKSRC}/*.js ${EXILOGDIR} X.if !defined(NO_AGENT) X @${INSTALL_SCRIPT} ${WRKSRC}/exilog_agent.pl ${PREFIX}/sbin X.endif X @${INSTALL_SCRIPT} ${WRKSRC}/exilog_cleanup.pl ${PREFIX}/sbin X @${INSTALL_SCRIPT} ${WRKSRC}/exilog_cgi.pl ${EXILOGDIR} X @${CP} ${WRKSRC}/exilog.conf-example ${PREFIX}/etc/exilog.conf-dist X @${CHMOD} 0600 ${PREFIX}/etc/exilog.conf-dist X @${CHOWN} ${WWWOWN}:${WWWGRP} ${PREFIX}/etc/exilog.conf-dist X @${CP} ${FILESDIR}/htaccess ${EXILOGDIR}/.htaccess X.if !defined(NO_AGENT) X @${INSTALL_SCRIPT} ${WRKDIR}/exilog.sh ${PREFIX}/etc/rc.d X.endif X.if !defined(NOPORTDOCS) X @${MKDIR} ${DOCSDIR} X.for docfile in ${PORTDOC_FILES} X @${INSTALL_DATA} ${WRKSRC}/${docfile} ${DOCSDIR} X.endfor X.endif X X.include <bsd.port.mk> END-of-exilog/Makefile echo x - exilog/pkg-descr sed 's/^X//' >exilog/pkg-descr << 'END-of-exilog/pkg-descr' XExilog is a tool to centralize and visualize Exim logs Xacross multiple Exim servers. It is used in addition to XExim's standard or syslog logging. It does not require Xchanging Exim or its logging style. X XWWW: http://duncanthrax.net/exilog/ END-of-exilog/pkg-descr echo x - exilog/distinfo sed 's/^X//' >exilog/distinfo << 'END-of-exilog/distinfo' XMD5 (exilog-0.2.tar.gz) = 4f027e5400cc76f580ac9ae760c34671 XSize (exilog-0.2.tar.gz) = 82240 END-of-exilog/distinfo echo x - exilog/pkg-plist sed 's/^X//' >exilog/pkg-plist << 'END-of-exilog/pkg-plist' X%%AGENT%%@unexec [ ! -f /var/run/exilog.pid ] || %D/etc/rc.d/exilog.sh stop X%%AGENT%%sbin/exilog_agent.pl X%%AGENT%%etc/rc.d/exilog.sh Xsbin/exilog_cleanup.pl X%%EXILOGDIR%%/exilog_cgi.pl X%%EXILOGDIR%%/exilog_cgi_html.pm X%%EXILOGDIR%%/exilog_cgi_messages.pm X%%EXILOGDIR%%/exilog_cgi_param.pm X%%EXILOGDIR%%/exilog_cgi_queues.pm X%%EXILOGDIR%%/exilog_cgi_servers.pm X%%EXILOGDIR%%/exilog_config.pm X%%EXILOGDIR%%/exilog_parse.pm X%%EXILOGDIR%%/exilog_sql.pm X%%EXILOGDIR%%/exilog_util.pm X%%EXILOGDIR%%/exilog_jscript.js X%%EXILOGDIR%%/exilog_stylesheet.css X%%EXILOGDIR%%/.htaccess Xetc/exilog.conf-dist X%%PORTDOCS%%%%DOCSDIR%%/Changelog X%%PORTDOCS%%%%DOCSDIR%%/exilog.txt X%%PORTDOCS%%%%DOCSDIR%%/mysql-db-script.sql X%%PORTDOCS%%%%DOCSDIR%%/pgsql-db-script.sql X X@dirrm %%EXILOGDIR%% X%%PORTDOCS%%@dirrm %%DOCSDIR%% END-of-exilog/pkg-plist echo c - exilog/files mkdir -p exilog/files > /dev/null 2>&1 echo x - exilog/files/exilog.sh sed 's/^X//' >exilog/files/exilog.sh << 'END-of-exilog/files/exilog.sh' X#!/bin/sh X# X# $FreeBSD$ X# X# Add the following lines to /etc/rc.conf to enable exilog agent: X# X#exilog_enable="YES" X X. %%RC_SUBR%% X Xname=exilog Xrcvar=`set_rcvar` X Xcommand=%%PREFIX%%/sbin/exilog_agent.pl Xpidfile=/var/run/exilog.pid Xrequired_files=%%PREFIX%%/etc/exilog.conf X X# read settings, set default values Xload_rc_config $name X: ${exilog_enable="NO"} X Xcase $1 in X stop) X kill `cat $pidfile` X rm -f $pidfile X ;; X *) X run_rc_command "$1" X ;; Xesac END-of-exilog/files/exilog.sh echo x - exilog/files/htaccess sed 's/^X//' >exilog/files/htaccess << 'END-of-exilog/files/htaccess' XOptions +ExecCGI XAddHandler cgi-script .pl XDirectoryIndex exilog_cgi.pl END-of-exilog/files/htaccess echo x - exilog/files/patch-exilog_agent.pl sed 's/^X//' >exilog/files/patch-exilog_agent.pl << 'END-of-exilog/files/patch-exilog_agent.pl' X--- exilog_agent.pl.orig Sat Jun 4 19:36:03 2005 X+++ exilog_agent.pl Sat Jun 4 19:39:00 2005 X@@ -46,7 +46,11 @@ X }; X X setsid(); X- X+ my $me = "exilog"; X+ my $pidfile = "/var/run/".$me.".pid"; X+ open (PID,">$pidfile"); X+ print PID $$; X+ close (PID); X # dup STDOUT/ERR X open(STDOUT, ">&LOG"); X open(STDERR, ">&LOG"); END-of-exilog/files/patch-exilog_agent.pl exit >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E1DebDS-000IMh-Gr>