1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-21 00:25:50 +00:00

- Stagify; cleanup installation routine; fix whitespace

- Add missing USE_PERL5 (run)
- Explain the need for non-obvious move (post-extract)
- Point MASTER_SITES and WWW line to a working website
This commit is contained in:
Alexey Dokuchaev 2014-07-08 11:52:24 +00:00
parent d2c28a32ec
commit 8f42e5a930
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=361223
5 changed files with 31 additions and 32 deletions

View File

@ -1,60 +1,60 @@
# Created by: Xavier Beaudouin (kiwi@oav.net) # Created by: Xavier Beaudouin <kiwi@oav.net>
# $FreeBSD$ # $FreeBSD$
PORTNAME= couriergraph PORTNAME= couriergraph
PORTVERSION= 20060202 PORTVERSION= 20060202
PORTREVISION= 3 PORTREVISION= 3
CATEGORIES= mail CATEGORIES= mail
MASTER_SITES= ftp://ftp.oav.net/couriergraph/ MASTER_SITES= http://www.arschkrebs.de/postfix/${PORTNAME}/
DIST_SUBDIR= ${PORTNAME} DISTNAME= ${PORTNAME}
MAINTAINER= ports@FreeBSD.org MAINTAINER= ports@FreeBSD.org
COMMENT= RRDtool frontend for Courier statistics COMMENT= RRDtool frontend for Courier statistics
RUN_DEPENDS= rrdtool>=0:${PORTSDIR}/databases/rrdtool \ RUN_DEPENDS= rrdtool>=0:${PORTSDIR}/databases/rrdtool \
p5-File-Tail>=0:${PORTSDIR}/devel/p5-File-Tail p5-File-Tail>=0:${PORTSDIR}/devel/p5-File-Tail
NO_BUILD= yes
USES= perl5 USES= perl5
USE_PERL5= run
USE_RC_SUBR= ${PORTNAME}
NO_BUILD= yes
WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}
DATADIR?= /var/db/couriergraph DATADIR?= /var/db/couriergraph
COURIERGRAPH_USER?= ${WWWOWN} COURIERGRAPH_USER?= ${WWWOWN}
COURIERGRAPH_GROUP?= ${WWWGRP} COURIERGRAPH_GROUP?= ${WWWGRP}
USE_RC_SUBR= ${PORTNAME} SUB_LIST= COURIERGRAPH_USER=${COURIERGRAPH_USER} \
SUB_LIST+= COURIERGRAPH_USER=${COURIERGRAPH_USER} COURIERGRAPH_GROUP=${COURIERGRAPH_GROUP} COURIERGRAPH_GROUP=${COURIERGRAPH_GROUP}
STARTUP_FILE= ${PREFIX}/etc/rc.d/couriergraph.sh STARTUP_FILE= ${PREFIX}/etc/rc.d/couriergraph.sh
SUB_FILES= pkg-message SUB_FILES= pkg-message
NO_STAGE= yes
pre-everything:: pre-everything::
@${ECHO_MSG} @${ECHO_MSG}
@${ECHO_MSG} "You may set following options:" @${ECHO_MSG} "You may set the following options:"
@${ECHO_MSG} @${ECHO_MSG}
@${ECHO_MSG} "DATADIR=/var/db/couriergraph Where do you put RRD databases?" @${ECHO_MSG} "DATADIR=/var/db/couriergraph Where do you put RRD databases?"
@${ECHO_MSG} "COURIERGRAPH_USER=www User to run couriergraph (Default: ${WWWOWN})" @${ECHO_MSG} "COURIERGRAPH_USER=www User to run couriergraph (default: ${WWWOWN})"
@${ECHO_MSG} "COURIERGRAPH_GROUP=www Group to run couriergraph (Default: ${WWWGRP})" @${ECHO_MSG} "COURIERGRAPH_GROUP=www Group to run couriergraph (default: ${WWWGRP})"
@${ECHO_MSG} @${ECHO_MSG}
# To avoid conflict between default WRKSRC and RC_SUBR file being the same
post-extract: post-extract:
@${MV} ${WRKDIR}/${PORTNAME} ${WRKSRC} @${MV} ${WRKDIR}/${PORTNAME} ${WRKSRC}
post-patch: post-patch:
@${REINPLACE_CMD} -e "s,%%DATADIR%%,${DATADIR}," ${WRKSRC}/couriergraph.cgi @${REINPLACE_CMD} -e "s,%%DATADIR%%,${DATADIR}," \
@${REINPLACE_CMD} -e "s,%%DATADIR%%,${DATADIR}," ${WRKSRC}/couriergraph.pl ${WRKSRC}/couriergraph.cgi ${WRKSRC}/couriergraph.pl
do-install: do-install:
${MKDIR} ${PREFIX}/www/cgi-bin @${MKDIR} ${STAGEDIR}${PREFIX}/www/cgi-bin
${MKDIR} ${DATADIR} @${MKDIR} ${STAGEDIR}${DATADIR}
@${CHOWN} -R ${COURIERGRAPH_USER}:${COURIERGRAPH_GROUP} ${DATADIR} @${CHOWN} -R ${COURIERGRAPH_USER}:${COURIERGRAPH_GROUP} \
@${INSTALL_SCRIPT} ${WRKSRC}/couriergraph.pl ${PREFIX}/sbin ${STAGEDIR}${DATADIR}
@${INSTALL_SCRIPT} ${WRKSRC}/couriergraph.cgi ${PREFIX}/www/cgi-bin ${INSTALL_SCRIPT} ${WRKSRC}/couriergraph.pl \
${STAGEDIR}${PREFIX}/sbin
post-install: ${INSTALL_SCRIPT} ${WRKSRC}/couriergraph.cgi \
@${ECHO} ${STAGEDIR}${PREFIX}/www/cgi-bin
@${CAT} ${PKGMESSAGE}
@${ECHO}
.include <bsd.port.mk> .include <bsd.port.mk>

View File

@ -1,2 +1,2 @@
SHA256 (couriergraph/couriergraph-20060202.tar.gz) = 3159948a122d808e90567a12ad7db4031b5e47e9ec6c7e90f6fc3283eb0cdc7f SHA256 (couriergraph.tar.gz) = 3159948a122d808e90567a12ad7db4031b5e47e9ec6c7e90f6fc3283eb0cdc7f
SIZE (couriergraph/couriergraph-20060202.tar.gz) = 7559 SIZE (couriergraph.tar.gz) = 7559

View File

@ -23,7 +23,7 @@ stop_postcmd=stop_postcmd
stop_postcmd() stop_postcmd()
{ {
rm -f $pidfile rm -f $pidfile
} }
couriergraph_enable=${couriergraph_enable:-"NO"} couriergraph_enable=${couriergraph_enable:-"NO"}

View File

@ -1,8 +1,7 @@
Make sure this script should be invoked with privilege to read Make sure this script should be invoked with privilege to read
/var/log/maillog. /var/log/maillog.
*** WARNING *** *** WARNING ***
The rrd database has been moved to %%DATADIR%%. The RRD database has been moved to %%DATADIR%%.
If you have previous ones, please move them to %%DATADIR%%. If you have previous ones, please move them to %%DATADIR%%.

View File

@ -2,4 +2,4 @@ Couriergraph is a very simple mail statistics RRDtool frontend for Postfix
that produces daily, weekly, monthly and yearly graphs of Courier's POP3, that produces daily, weekly, monthly and yearly graphs of Courier's POP3,
IMAP, POP3s and IMAPs logins. IMAP, POP3s and IMAPs logins.
WWW: http://www.stahl.bau.tu-bs.de/~hildeb/postfix/couriergraph/ WWW: http://www.arschkrebs.de/postfix/couriergraph/