aboutsummaryrefslogtreecommitdiff
path: root/mail/exilog
diff options
context:
space:
mode:
authorPav Lucistnik <pav@FreeBSD.org>2006-05-19 22:50:37 +0000
committerPav Lucistnik <pav@FreeBSD.org>2006-05-19 22:50:37 +0000
commita7eba119363d24560d002b2096156d13e9cffd27 (patch)
tree1b9f8f1e335c370cee4eb01fe64f41a86cd104c9 /mail/exilog
parent67569141b6ae2255e8be55f227d9db03d81911a4 (diff)
downloadports-a7eba119363d24560d002b2096156d13e9cffd27.tar.gz
ports-a7eba119363d24560d002b2096156d13e9cffd27.zip
- Fix rc script installation
- Stop daemon on deinstall - REQUIRE/PROVIDE PR: ports/97327 Submitted by: Larry Rosenman <ler@lerctr.org> (maintainer)
Notes
Notes: svn path=/head/; revision=162831
Diffstat (limited to 'mail/exilog')
-rw-r--r--mail/exilog/Makefile23
-rw-r--r--mail/exilog/files/exilog.sh.in4
-rw-r--r--mail/exilog/pkg-plist3
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