diff options
author | pav <pav@FreeBSD.org> | 2006-05-20 06:50:37 +0800 |
---|---|---|
committer | pav <pav@FreeBSD.org> | 2006-05-20 06:50:37 +0800 |
commit | 05b66161eee382f21c20cb48cfaf7bbeb5718e77 (patch) | |
tree | 9ea4f1c6f0886d7482ec6a605232b1c282064a15 /mail/exilog | |
parent | 26b976fcfef224c62c90c0d2c8354570200f3684 (diff) | |
download | freebsd-ports-gnome-05b66161eee382f21c20cb48cfaf7bbeb5718e77.tar.gz freebsd-ports-gnome-05b66161eee382f21c20cb48cfaf7bbeb5718e77.tar.zst freebsd-ports-gnome-05b66161eee382f21c20cb48cfaf7bbeb5718e77.zip |
- Fix rc script installation
- Stop daemon on deinstall
- REQUIRE/PROVIDE
PR: ports/97327
Submitted by: Larry Rosenman <ler@lerctr.org> (maintainer)
Diffstat (limited to 'mail/exilog')
-rw-r--r-- | mail/exilog/Makefile | 23 | ||||
-rw-r--r-- | mail/exilog/files/exilog.sh.in | 4 | ||||
-rw-r--r-- | mail/exilog/pkg-plist | 3 |
3 files changed, 19 insertions, 11 deletions
diff --git a/mail/exilog/Makefile b/mail/exilog/Makefile index 185ee305e6da..e1f96c142551 100644 --- a/mail/exilog/Makefile +++ b/mail/exilog/Makefile @@ -7,7 +7,7 @@ PORTNAME= exilog PORTVERSION= 0.5 -PORTREVISION= 3 +PORTREVISION= 4 CATEGORIES= mail MASTER_SITES= http://duncanthrax.net/exilog/ @@ -27,24 +27,32 @@ WITH_SQL_BACKEND?= mysql .if (${WITH_SQL_BACKEND} == "mysql") WITH_MYSQL= yes RUN_DEPENDS+= ${SITE_PERL}/${PERL_ARCH}/DBD/mysql.pm:${PORTSDIR}/databases/p5-DBD-mysql +SERVER= mysql .elif (${WITH_SQL_BACKEND} == "postgresql") WITH_POSTGRESQL= yes RUN_DEPENDS+= ${SITE_PERL}/${PERL_ARCH}/DBD/Pg.pm:${PORTSDIR}/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 - -.if defined(NO_AGENT) +.include <bsd.port.pre.mk> +.if defined(WITHOUT_AGENT) PLIST_SUB+= AGENT="@comment " .else USE_RC_SUBR= exilog.sh PLIST_SUB+= AGENT="" +.if (${OSVERSION} >= 700007 || (${OSVERSION} < 700000 && ${OSVERSION} >= 600101)) +RCSCRIPT= exilog +.else +RCSCRIPT= exilog.sh +.endif +PLIST_SUB+= RCSCRIPT=${RCSCRIPT} .endif PLIST_SUB+= EXILOGDIR="${EXILOGDIR:S,^${PREFIX}/,,}" @@ -67,7 +75,7 @@ do-install: @${CP} ${WRKSRC}/*.pm ${WRKSRC}/*.css ${WRKSRC}/*.js ${EXILOGDIR} @${CP} ${WRKSRC}/icons/* ${EXILOGDIR}/icons -.if !defined(NO_AGENT) +.if !defined(WITHOUT_AGENT) @${INSTALL_SCRIPT} ${WRKSRC}/exilog_agent.pl ${PREFIX}/sbin .endif @${INSTALL_SCRIPT} ${WRKSRC}/exilog_cleanup.pl ${PREFIX}/sbin @@ -76,9 +84,6 @@ do-install: @${CHMOD} 0600 ${PREFIX}/etc/exilog.conf-dist @${CHOWN} ${WWWOWN}:${WWWGRP} ${PREFIX}/etc/exilog.conf-dist @${CP} ${FILESDIR}/htaccess ${EXILOGDIR}/.htaccess -.if !defined(NO_AGENT) - @${INSTALL_SCRIPT} ${WRKDIR}/exilog.sh ${PREFIX}/etc/rc.d -.endif .if !defined(NOPORTDOCS) @${MKDIR} ${DOCSDIR} .for docfile in ${PORTDOC_FILES} @@ -86,4 +91,4 @@ do-install: .endfor .endif -.include <bsd.port.mk> +.include <bsd.port.post.mk> diff --git a/mail/exilog/files/exilog.sh.in b/mail/exilog/files/exilog.sh.in index 2e35be60ad15..2453d30df454 100644 --- a/mail/exilog/files/exilog.sh.in +++ b/mail/exilog/files/exilog.sh.in @@ -2,6 +2,10 @@ # # $FreeBSD$ # +# PROVIDE: exilog +# REQUIRE: %%SERVER%% +# KEYWORD: shutdown +# # Add the following lines to /etc/rc.conf to enable exilog agent: # #exilog_enable="YES" diff --git a/mail/exilog/pkg-plist b/mail/exilog/pkg-plist index 3fb034718a95..0184ec2fdd96 100644 --- a/mail/exilog/pkg-plist +++ b/mail/exilog/pkg-plist @@ -1,6 +1,5 @@ -%%AGENT%%@unexec [ ! -f /var/run/exilog.pid ] || %D/etc/rc.d/exilog.sh stop +%%AGENT%%@unexec [ ! -f /var/run/exilog.pid ] || %D/etc/rc.d/%%RCSCRIPT%% stop %%AGENT%%sbin/exilog_agent.pl -%%AGENT%%etc/rc.d/exilog.sh sbin/exilog_cleanup.pl %%EXILOGDIR%%/exilog_cgi.pl %%EXILOGDIR%%/exilog_cgi_html.pm |