1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-24 04:33:24 +00:00

- Better use of rc_subr framework

- Updated startup script
- Fixed pkg-plist

PR:		ports/94802
Submitted by:	Freddie Cash <fcash@sd73.bc.ca> (maintainer)
This commit is contained in:
Pav Lucistnik 2006-04-08 12:57:43 +00:00
parent f0df633c49
commit 4a2fb110ae
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=159114
4 changed files with 37 additions and 29 deletions

View File

@ -7,7 +7,7 @@
PORTNAME= dansguardian
PORTVERSION= 2.8.0.6
PORTREVISION= 1
PORTREVISION= 2
CATEGORIES= www
MASTER_SITES= # empty, see below
DISTNAME= ${PORTNAME}-${PORTVERSION}.source
@ -17,8 +17,7 @@ COMMENT= A fast, feature-rich web content filter for Squid proxy servers
RUN_DEPENDS= ${LOCALBASE}/sbin/squid:${PORTSDIR}/www/squid
USE_RC_SUBR= yes
RC_SCRIPTS_SUB= PREFIX=${PREFIX} RC_SUBR=${RC_SUBR}
USE_RC_SUBR= dansguardian.sh
CONFLICTS= dansguardian-2.[67]*
LATEST_LINK= dansguardian
@ -36,15 +35,15 @@ CONFIGURE_ARGS= --bindir=/sbin/ \
MAN8= dansguardian.8
NOMANCOMPRESSED= yes
OPTIONS= DG_APACHE "Enable Apache support." on \
OPTIONS= DG_APACHE "Enable Apache support for access denied page" on \
DG_PHRASELISTS "Install new phraselists over the old ones." off
DG_URL= http://dansguardian.org/index.php?page=copyright2
CONFDIR= ${PREFIX}/etc/dansguardian
NO_CDROM= "Commercial download is restricted. Check ${DG_URL} for more info"
NO_PACKAGE= "Redistribution is restricted. Check ${DG_URL} for more info"
RESTRICTED= "${NO_PACKAGE}"
NO_CDROM= Commercial download is restricted. Check ${DG_URL} for more info
NO_PACKAGE= Redistribution is restricted. Check ${DG_URL} for more info
RESTRICTED= ${NO_PACKAGE}
.include <bsd.port.pre.mk>
@ -64,10 +63,6 @@ USE_APACHE= 1.3+
IGNORE="Commercial source download is restricted. Please visit and read ${DG_URL} and download ${DISTNAME}${EXTRACT_SUFX} into ${DISTDIR} before running make"
.endif
post-extract:
@${SED} ${RC_SCRIPTS_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \
${FILESDIR}/dansguardian.sh > ${WRKSRC}/dansguardian.sh
pre-install:
# Configure pkg-plist based on whether phraselists are to be installed or not
.if defined(WITH_DG_PHRASELISTS)
@ -86,8 +81,8 @@ post-install:
.endif
# Install startup script
@${ECHO_MSG} "===> Installing startup script into ${PREFIX}/etc/rc.d"
@${INSTALL_SCRIPT} ${WRKSRC}/dansguardian.sh ${PREFIX}/etc/rc.d/start-dg.sh
# @${ECHO_MSG} "===> Installing startup script into ${PREFIX}/etc/rc.d"
# @${INSTALL_SCRIPT} ${WRKSRC}/dansguardian.sh ${PREFIX}/etc/rc.d/start-dg.sh
# Display post-install message
@${CAT} pkg-message

View File

@ -2,9 +2,9 @@
# $FreeBSD$
# PROVIDE: dansguardian
# REQUIRE: DAEMON squid
# BEFORE: LOGIN
# KEYWORD: shutdown
# REQUIRE: NETWORKING SERVERS squid
# BEFORE: DAEMON
# KEYWORD: FreeBSD shutdown
# Define these dansguardian_* variables in one of these files:
# /etc/rc.conf
@ -13,9 +13,9 @@
#
# DO NOT CHANGE THESE DEFAULT VALUES HERE
#
dansguardian_enable=${dansguardian_enable-"NO"}
dansguardian_flags=${dansguardian_flags-""}
dansguardian_pidfile=${dansguardian_pidfile-"/var/run/dansguardian.pid"}
dansguardian_enable=${dansguardian_enable:-"NO"}
dansguardian_flags=${dansguardian_flags:-""}
dansguardian_pidfile=${dansguardian_pidfile:-"/var/run/dansguardian.pid"}
. %%RC_SUBR%%

View File

@ -1,10 +1,15 @@
===> Please Note:
*******************************************************************************
This port has placed a log file in /var/log/ named dansguardian.log
This log file can get quite large. Please read the newsyslog(8) man
page for instructions on setting up log rotation and compression.
All initial config files have been placed under a samples/ directory.
You will need to copy these files into the config directory before
running DansGuardian for the first time.
WARNING: This port uses RCng. Please read the comments in the startup
script for instructions on enabling the daemon.
This port has created a log file named dansguardian.log that can get
quite large. Please read the newsyslog(8) man page for instructions
on setting up log rotation and compression.
This port hasa been converted to the new RC framework and should work
correctly via rcorder. Please read the comments in the startup script
for instructions on enabling the daemon.
*******************************************************************************

View File

@ -8,7 +8,6 @@
@exec mkdir -p etc/dansguardian/languages/danish
@exec mkdir -p etc/dansguardian/languages/french
@exec mkdir -p etc/dansguardian/languages/german
@exec mkdir -p etc/dansguardian/languages/german2
@exec mkdir -p etc/dansguardian/languages/hebrew
@exec mkdir -p etc/dansguardian/languages/indonesian
@exec mkdir -p etc/dansguardian/languages/italian
@ -16,6 +15,9 @@
@exec mkdir -p etc/dansguardian/languages/mxspanish
@exec mkdir -p etc/dansguardian/languages/polish
@exec mkdir -p etc/dansguardian/languages/portuguese
@exec mkdir -p etc/dansguardian/languages/russian-1251
@exec mkdir -p etc/dansguardian/languages/slovak
@exec mkdir -p etc/dansguardian/languages/spanish
@exec mkdir -p etc/dansguardian/languages/swedish
@exec mkdir -p etc/dansguardian/languages/turkish
@exec mkdir -p etc/dansguardian/languages/ukenglish
@ -82,8 +84,6 @@ etc/dansguardian/languages/french/messages
etc/dansguardian/languages/french/template.html
etc/dansguardian/languages/german/messages
etc/dansguardian/languages/german/template.html
etc/dansguardian/languages/german2/messages
etc/dansguardian/languages/german2/template.html
etc/dansguardian/languages/hebrew/messages
etc/dansguardian/languages/hebrew/template.html
etc/dansguardian/languages/indonesian/messages
@ -97,6 +97,7 @@ etc/dansguardian/languages/mxspanish/template.html
etc/dansguardian/languages/polish/messages
etc/dansguardian/languages/polish/template.html
etc/dansguardian/languages/portuguese/messages
etc/dansguardian/languages/portuguese/messagesaccents
etc/dansguardian/languages/portuguese/template.html
etc/dansguardian/languages/swedish/messages
etc/dansguardian/languages/swedish/template.html
@ -104,6 +105,12 @@ etc/dansguardian/languages/turkish/messages
etc/dansguardian/languages/turkish/template.html
etc/dansguardian/languages/ukenglish/messages
etc/dansguardian/languages/ukenglish/template.html
etc/dansguardian/languages/spanish/messages
etc/dansguardian/languages/spanish/template.html
etc/dansguardian/languages/slovak/messages
etc/dansguardian/languages/slovak/template.html
etc/dansguardian/languages/russian-1251/messages
etc/dansguardian/languages/russian-1251/template.html
%%PHRASELISTS%%etc/dansguardian/phraselists/chat/weighted
%%PHRASELISTS%%etc/dansguardian/phraselists/drugadvocacy/weighted
%%PHRASELISTS%%etc/dansguardian/phraselists/dutchbadwords/weighted
@ -127,7 +134,6 @@ etc/dansguardian/languages/ukenglish/template.html
%%PHRASELISTS%%etc/dansguardian/phraselists/violence/weighted
%%PHRASELISTS%%etc/dansguardian/phraselists/warezhacking/weighted
%%PHRASELISTS%%etc/dansguardian/phraselists/weapons/weighted
etc/rc.d/start-dg.sh
sbin/dansguardian
@dirrm etc/dansguardian/languages/arspanish
@dirrm etc/dansguardian/languages/bulgarian
@ -138,7 +144,6 @@ sbin/dansguardian
@dirrm etc/dansguardian/languages/dutch
@dirrm etc/dansguardian/languages/french
@dirrm etc/dansguardian/languages/german
@dirrm etc/dansguardian/languages/german2
@dirrm etc/dansguardian/languages/hebrew
@dirrm etc/dansguardian/languages/indonesian
@dirrm etc/dansguardian/languages/italian
@ -146,6 +151,9 @@ sbin/dansguardian
@dirrm etc/dansguardian/languages/mxspanish
@dirrm etc/dansguardian/languages/polish
@dirrm etc/dansguardian/languages/portuguese
@dirrm etc/dansguardian/languages/russian-1251
@dirrm etc/dansguardian/languages/slovak
@dirrm etc/dansguardian/languages/spanish
@dirrm etc/dansguardian/languages/swedish
@dirrm etc/dansguardian/languages/turkish
@dirrm etc/dansguardian/languages/ukenglish