From owner-svn-ports-head@FreeBSD.ORG Mon Oct 7 11:45:10 2013 Return-Path: Delivered-To: svn-ports-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 681509E; Mon, 7 Oct 2013 11:45:10 +0000 (UTC) (envelope-from madpilot@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 5450B2CC4; Mon, 7 Oct 2013 11:45:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r97BjAgA067421; Mon, 7 Oct 2013 11:45:10 GMT (envelope-from madpilot@svn.freebsd.org) Received: (from madpilot@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r97Bj9t4067392; Mon, 7 Oct 2013 11:45:09 GMT (envelope-from madpilot@svn.freebsd.org) Message-Id: <201310071145.r97Bj9t4067392@svn.freebsd.org> From: Guido Falsi Date: Mon, 7 Oct 2013 11:45:09 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r329694 - in head/www/squidguard: . files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Oct 2013 11:45:10 -0000 Author: madpilot Date: Mon Oct 7 11:45:08 2013 New Revision: 329694 URL: http://svnweb.freebsd.org/changeset/ports/329694 Log: - Respect EXAMPLES option and EXAMPLESDIR. - Install sample configuration from distribution (with a small fix applied) - Stop compiling sample blacklists automatically during installation - Modify pkg-message to be in line with the above changes - Support staging - Use option helpers Reviewed by: bapt Added: head/www/squidguard/files/patch-sample_sample.conf.in (contents, props changed) Deleted: head/www/squidguard/files/sgcfg.in Modified: head/www/squidguard/Makefile head/www/squidguard/files/patch-Makefile.in (contents, props changed) head/www/squidguard/files/pkg-deinstall.in (contents, props changed) head/www/squidguard/files/pkg-message.in (contents, props changed) head/www/squidguard/pkg-plist (contents, props changed) Modified: head/www/squidguard/Makefile ============================================================================== --- head/www/squidguard/Makefile Mon Oct 7 11:24:23 2013 (r329693) +++ head/www/squidguard/Makefile Mon Oct 7 11:45:08 2013 (r329694) @@ -2,7 +2,7 @@ PORTNAME= squidGuard PORTVERSION= 1.4 -PORTREVISION= 4 +PORTREVISION= 5 CATEGORIES= www MASTER_SITES= http://www.squidguard.org/Downloads/:a \ http://www.squidguard.org/Downloads/Contrib/:b @@ -21,74 +21,47 @@ USE_BDB= 40+ GNU_CONFIGURE= yes CONFIGURE_ARGS= --with-db-inc=${BDB_INCLUDE_DIR} \ --with-db-lib=${BDB_LIB_DIR} \ - --with-sg-config=${PREFIX}/etc/squid/${PORTNAME}.conf \ + --with-sg-config=${ETCDIR}/${PORTNAME}.conf \ --with-sg-dbhome=${DATADIR} \ --with-sg-logdir=${LOGDIR} \ --exec-prefix=${PREFIX} CPPFLAGS+= -I${PREFIX}/include -I${LOCALBASE}/include -CFGINPUT= ${FILESDIR}/sgcfg.in - SQUID_UID?= squid SQUID_GID?= squid +PLIST_SUB+= SQUID_UID='${SQUID_UID}' SQUID_GID='${SQUID_GID}' DATADIR?= /var/db/${PORTNAME} -SAMPLE_BL_DIR= ${DATADIR}.sample -PLIST_SUB+= SAMPLE_BL_DIR=${SAMPLE_BL_DIR} +ETCDIR= ${PREFIX}/etc/squid _DATADIR= ${WRKDIR}/data -LOGDIR?= /var/log +LOGDIR?= /var/log/${PORTNAME} +PLIST_SUB+= LOGDIR="${LOGDIR}" -SUB_FILES= pkg-message pkg-deinstall -SUB_LIST= PORTNAME=${PORTNAME} \ - SAMPLE_BL_DIR=${SAMPLE_BL_DIR} -PKGMESSAGE= ${WRKDIR}/pkg-message +SUB_FILES= pkg-deinstall pkg-message +SUB_LIST= PORTNAME=${PORTNAME} -OPTIONS_DEFINE= DNS_BL DOCS LDAP QUOTE_STRING SAMPLE_BL +OPTIONS_DEFINE= DNS_BL DOCS EXAMPLES LDAP QUOTE_STRING OPTIONS_SINGLE= SV OPTIONS_SINGLE_SV= SQUID27 SQUID32 SQUID33 -OPTIONS_DEFAULT= SAMPLE_BL SQUID27 +OPTIONS_DEFAULT= SQUID27 -SAMPLE_BL_DESC= Install sample blacklists +EXAMPLES_DESC= Install sample blacklists DNS_BL_DESC= Enable DNS based blacklists QUOTE_STRING_DESC= Add quoted string patch SQUID27_DESC= Depend on Squid 2.7.x SQUID32_DESC= Depend on Squid 3.2.x SQUID33_DESC= Depend on Squid 3.3.x -NO_STAGE= yes -.include - -.if ${PORT_OPTIONS:MSQUID27} -RUN_DEPENDS= ${LOCALBASE}/sbin/squid:${PORTSDIR}/www/squid -.endif - -.if ${PORT_OPTIONS:MSQUID32} -RUN_DEPENDS= ${LOCALBASE}/sbin/squid:${PORTSDIR}/www/squid32 -.endif - -.if ${PORT_OPTIONS:MSQUID33} -RUN_DEPENDS= ${LOCALBASE}/sbin/squid:${PORTSDIR}/www/squid33 -.endif - -.if ${PORT_OPTIONS:MLDAP} -CONFIGURE_ARGS+= --with-ldap -LDFLAGS+= -L${LOCALBASE}/lib -USE_OPENLDAP= yes -.else -CONFIGURE_ARGS+= --without-ldap -.endif +OPTIONS_SUB= yes +SQUID27_RUN_DEPENDS= ${LOCALBASE}/sbin/squid:${PORTSDIR}/www/squid +SQUID32_RUN_DEPENDS= ${LOCALBASE}/sbin/squid:${PORTSDIR}/www/squid32 +SQUID33_RUN_DEPENDS= ${LOCALBASE}/sbin/squid:${PORTSDIR}/www/squid33 +LDAP_CONFIGURE_ON= --with-ldap +LDAP_CONFIGURE_OFF= --without-ldap +LDAP_LDFLAGS= -L${LOCALBASE}/lib +LDAP_USE= OPENLDAP=yes -.if ${PORT_OPTIONS:MSAMPLE_BL} -. if !exists(${DATADIR}) -INSTALL_BL= yes -. else -INSTALL_BL= no -. endif -PLIST_SUB+= BLACKLIST="" -.else -INSTALL_BL= no -PLIST_SUB+= BLACKLIST="@comment " -.endif +.include pre-fetch: @if [ ${SQUID_UID} = "squid" -o ${SQUID_GID} = "squid" ] ; then \ @@ -112,9 +85,9 @@ post-patch: .endif post-build: -.if ${PORT_OPTIONS:MSAMPLE_BL} - @${ECHO_MSG} "===> Building blacklists" - ${MKDIR} ${_DATADIR} +.if ${PORT_OPTIONS:MEXAMPLES} + @${ECHO_MSG} "===> Preparing blacklists" + @${MKDIR} ${_DATADIR} @${TAR} -C ${_DATADIR} --exclude *.diff -pxzf \ ${WRKSRC}/samples/dest/blacklists.tar.gz @${MV} -f ${_DATADIR}/blacklists/README ${WRKDIR}/README.blacklists @@ -123,93 +96,30 @@ post-build: .endif pre-install: -# -# Install blacklists -# -.if ${PORT_OPTIONS:MSAMPLE_BL} - @${MKDIR} ${SAMPLE_BL_DIR} - @${CP} -Rpf ${_DATADIR}/* ${SAMPLE_BL_DIR} - @${CHOWN} -R ${SQUID_UID}:${SQUID_GID} ${SAMPLE_BL_DIR} - ${CHMOD} -R 550 ${SAMPLE_BL_DIR} -.endif - @${MKDIR} ${DATADIR} -.if ${INSTALL_BL} == "yes" - @${ECHO_MSG} "===> Installing blacklists" - @${CP} -Rpf ${_DATADIR}/* ${DATADIR}/ - @${CHOWN} -R ${SQUID_UID}:${SQUID_GID} ${DATADIR} - @${CHMOD} -R 550 ${DATADIR} - @${ECHO_MSG} " -> Blacklists installed in: ${DATADIR}" -.else - @${ECHO_MSG} "===> Found existing datadirectory - skipping blacklist installation" -.endif - -# -# Create sample configuration file -# - @if [ ! -f "${PREFIX}/etc/squid/${PORTNAME}.conf" ] ; then \ - ${ECHO_MSG} "===> Installing sample configuration file" ; \ - ${MKDIR} "${PREFIX}/etc/squid/" ; \ - BLACKLIST_DIRS=`(cd ${DATADIR} && ${FIND} . -type d | \ - ${SED} '/^\.$$/d; s/^\.\//!/' | ${XARGS} ${ECHO_CMD})`; \ - for I in `${ECHO_CMD} $${BLACKLIST_DIRS} | ${SED} 's/!//g'`; do \ - ${ECHO_CMD} "dest $${I} {"; \ - ${TEST} -f ${DATADIR}/$${I}/domains && \ - ${ECHO_CMD} " domainlist $${I}/domains"; \ - ${TEST} -f ${DATADIR}/$${I}/urls && \ - ${ECHO_CMD} " urllist $${I}/urls"; \ - ${TEST} -f ${DATADIR}/$${I}/expressions && \ - ${ECHO_CMD} " expressionlist $${I}/expressions"; \ - ${ECHO_CMD} "}"; \ - done > ${WRKDIR}/${PORTNAME}.conf.dests ; \ - ${SED} -e "s|DATADIR|${DATADIR}|" -e "s|LOGDIR|${LOGDIR}|" \ - -e "s|BLACKLIST_DIRS|$${BLACKLIST_DIRS}|;" \ - -e "/DEST_CLASSES/r ${WRKDIR}/${PORTNAME}.conf.dests" \ - ${CFGINPUT} | \ - ${SED} "/DEST_CLASSES/d" > \ - ${PREFIX}/etc/squid/${PORTNAME}.conf.sample ; \ - ${CHOWN} ${SQUID_UID}:${SQUID_GID} \ - ${PREFIX}/etc/squid/${PORTNAME}.conf.sample ; \ - ${ECHO_MSG} " -> Sample configuration file installed in: ${PREFIX}/etc/squid" ; \ - else \ - ${ECHO_MSG} "===> Existing configuration file found - sample not installed" ; \ - fi - -# -# Create blacklist databases (assume fresh install if we only have a -# sample config) -# -.if ${INSTALL_BL} == "yes" - @${ECHO_MSG} "===> Creating blacklist databases" ; \ - ${WRKSRC}/src/${PORTNAME} -d -c \ - ${PREFIX}/etc/squid/${PORTNAME}.conf.sample -C all ; \ - ${CHOWN} -R ${SQUID_UID}:${SQUID_GID} ${DATADIR} ; \ - ${FIND} ${DATADIR} -type f -name *.db -exec ${CHMOD} 660 {} \; ; \ - ${ECHO_MSG} " -> Blacklist databases installed in: ${DATADIR}" -.else - @${ECHO_MSG} "===> Existing configuration file found - blacklist databases not created" -.endif +.if ${PORT_OPTIONS:MEXAMPLES} + @${ECHO_MSG} "===> Installing sample blacklists" + @${MKDIR} ${STAGEDIR}${EXAMPLESDIR}/blacklists + @(cd ${_DATADIR} && ${COPYTREE_SHARE} . ${STAGEDIR}${EXAMPLESDIR}/blacklists) + @${INSTALL_DATA} ${WRKDIR}/README.blacklists ${STAGEDIR}${EXAMPLESDIR} + @${CHOWN} -R ${SQUID_UID}:${SQUID_GID} ${STAGEDIR}${EXAMPLESDIR}/blacklists + @${CHMOD} -R 550 ${STAGEDIR}${EXAMPLESDIR}/blacklists + @${ECHO_MSG} " -> Sample blacklists installed in ${EXAMPLESDIR}/blacklists" +.endif + @${ECHO_MSG} "===> Installing sample configuration file" + @${MKDIR} ${STAGEDIR}${ETCDIR} + @${SED} -e "s|@sg_dbhome@|${EXAMPLESDIR}/blacklists|" -e "s|@sg_logdir@|${LOGDIR}|" \ + ${WRKSRC}/samples/sample.conf.in \ + >${STAGEDIR}${ETCDIR}/${PORTNAME}.conf.sample ; \ + ${ECHO_MSG} " -> Sample configuration file installed in: ${ETCDIR}" ; \ post-install: -# -# Install documentation -# -.if ${PORT_OPTIONS:MDOCS} @${ECHO_MSG} "===> Installing ${PORTNAME} documentation" - -@${MKDIR} ${DOCSDIR} + @${MKDIR} ${STAGEDIR}${DOCSDIR} . for i in ${WRKSRC}/doc/*.txt ${WRKSRC}/doc/*.html ${WRKSRC}/doc/*.gif ${WRKSRC}/doc/README - @${INSTALL_DATA} ${WRKSRC}$i ${DOCSDIR} + @${INSTALL_DATA} ${WRKSRC}$i ${STAGEDIR}${DOCSDIR} . endfor - @if [ -f ${WRKDIR}/README.blacklists ] ; then \ - ${INSTALL_DATA} ${WRKDIR}/README.blacklists ${DOCSDIR} ; \ - fi @${ECHO_MSG} " -> Documentation installed in: ${DOCSDIR}" -.endif - -.if !exists(${LOGDIR}) - @${MKDIR} ${LOGDIR} - @${CHOWN} -R ${SQUID_UID}:${SQUID_GID} ${LOGDIR} -.endif - - @${CAT} ${PKGMESSAGE} + @${MKDIR} ${STAGEDIR}${LOGDIR} + @${CHOWN} -R ${SQUID_UID}:${SQUID_GID} ${STAGEDIR}${LOGDIR} .include Modified: head/www/squidguard/files/patch-Makefile.in ============================================================================== --- head/www/squidguard/files/patch-Makefile.in Mon Oct 7 11:24:23 2013 (r329693) +++ head/www/squidguard/files/patch-Makefile.in Mon Oct 7 11:45:08 2013 (r329694) @@ -1,6 +1,6 @@ --- Makefile.in.orig 2008-05-17 20:36:44.000000000 +0200 -+++ Makefile.in 2008-12-29 18:15:29.429334258 +0100 -@@ -47,12 +47,6 @@ ++++ Makefile.in 2013-09-24 12:55:55.029854067 +0200 +@@ -47,48 +47,33 @@ install-conf: @echo Installing configuration file ; @@ -10,12 +10,34 @@ - chown -R $(SQUIDUSER) $(prefix)/squidGuard || exit 1 ; \ - echo Assigned $(prefix)/squidGuard to user $(SQUIDUSER) ; \ - fi ; - @if [ ! -d $(dbhomedir) ]; then \ - $(MKINSTALLDIRS) $(dbhomedir) ; \ - echo Created directory $(dbhomedir) ; \ -@@ -70,15 +64,6 @@ - mkdir -p `dirname $(configfile)` ; \ - echo No configuration directory found. Created `dirname $(configfile)`. ; \ +- @if [ ! -d $(dbhomedir) ]; then \ +- $(MKINSTALLDIRS) $(dbhomedir) ; \ +- echo Created directory $(dbhomedir) ; \ +- chown -R $(SQUIDUSER) $(dbhomedir) || exit 1 ; \ +- echo Assigned $(dbhomedir) to user $(SQUIDUSER) ; \ ++ @if [ ! -d $(DESTDIR)$(dbhomedir) ]; then \ ++ $(MKINSTALLDIRS) $(DESTDIR)$(dbhomedir) ; \ ++ echo Created directory $(DESTDIR)$(dbhomedir) ; \ ++ chown -R $(SQUIDUSER) $(DESTDIR)$(dbhomedir) || exit 1 ; \ ++ echo Assigned $(DESTDIR)$(dbhomedir) to user $(SQUIDUSER) ; \ + fi ; + @if [ ! -d $(logdir) ]; then \ +- $(MKINSTALLDIRS) $(logdir) ; \ +- echo Created directory $(logdir) ; \ +- chown -R $(SQUIDUSER) $(logdir) || exit 1 ; \ +- echo Assigned $(logdir) to user $(SQUIDUSER) ; \ ++ $(MKINSTALLDIRS) $(DESTDIR)$(logdir) ; \ ++ echo Created directory $(DESTDIR)$(logdir) ; \ ++ chown -R $(SQUIDUSER) $(DESTDIR)$(logdir) || exit 1 ; \ ++ echo Assigned $(DESTDIR)$(logdir) to user $(SQUIDUSER) ; \ + fi ; +- @if [ ! -d `dirname $(configfile)` ]; then \ ++ @if [ ! -d `dirname $(DESTDIR)$(configfile)` ]; then \ + umask 022 ; \ +- mkdir -p `dirname $(configfile)` ; \ +- echo No configuration directory found. Created `dirname $(configfile)`. ; \ ++ mkdir -p `dirname $(DESTDIR)$(configfile)` ; \ ++ echo No configuration directory found. Created `dirname $(DESTDIR)$(configfile)`. ; \ fi; - @if test ! -f $(configfile); then \ - cp samples/sample.conf $(configfile) || exit 1 ; \ @@ -29,3 +51,16 @@ @echo ; @echo Congratulation. SquidGuard is sucessfully installed. ; @echo ; + + install-build: + @echo Installing squidGuard +- @if [ ! -d $(bindir) ]; then \ +- $(MKINSTALLDIRS) $(bindir) ; \ ++ @if [ ! -d $(DESTDIR)$(bindir) ]; then \ ++ $(MKINSTALLDIRS) $(DESTDIR)$(bindir) ; \ + fi ; \ +- cp src/squidGuard $(bindir) || exit 1 ; \ ++ cp src/squidGuard $(DESTDIR)$(bindir) || exit 1 ; \ + echo Done. ; + + clean:: Added: head/www/squidguard/files/patch-sample_sample.conf.in ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/www/squidguard/files/patch-sample_sample.conf.in Mon Oct 7 11:45:08 2013 (r329694) @@ -0,0 +1,15 @@ +--- samples/sample.conf.in.orig 2007-11-16 17:58:32.000000000 +0100 ++++ samples/sample.conf.in 2013-10-05 15:30:39.997329900 +0200 +@@ -53,9 +53,9 @@ + } + + dest adult { +- domainlist dest/adult/domains +- urllist dest/adult/urls +- expressionlist dest/adult/expressions ++ domainlist porn/domains ++ urllist porn/urls ++ expressionlist porn/expressions + redirect http://admin.foo.bar.de/cgi/blocked?clientaddr=%a+clientname=%n+clientuser=%i+clientgroup=%s+targetgroup=%t+url=%u + } + Modified: head/www/squidguard/files/pkg-deinstall.in ============================================================================== --- head/www/squidguard/files/pkg-deinstall.in Mon Oct 7 11:24:23 2013 (r329693) +++ head/www/squidguard/files/pkg-deinstall.in Mon Oct 7 11:45:08 2013 (r329694) @@ -1,11 +1,12 @@ #!/bin/sh # $FreeBSD$ -if [ "$2" != "POST-DEINSTALL" ]; then - exit 0 +if [ "$2" != "DEINSTALL" ]; then + exit 0 fi -echo "If you are completely removing squidguard you may want to also" -echo "manually delete the blacklists in %%DATADIR%%" +# Remove database files created if the sample blacklists were +# compiled. +find %%EXAMPLESDIR%% -name '*.db' -delete exit 0 Modified: head/www/squidguard/files/pkg-message.in ============================================================================== --- head/www/squidguard/files/pkg-message.in Mon Oct 7 11:24:23 2013 (r329693) +++ head/www/squidguard/files/pkg-message.in Mon Oct 7 11:45:08 2013 (r329694) @@ -1,10 +1,24 @@ =================================================================== -= In order to activate %%PORTNAME%% you have to edit squid.conf -= To the contain "url_rewrite_program %%PREFIX%%/bin/%%PORTNAME%%" -= and create a configuration file for %%PORTNAME%%. -= -= On disinstallation if you want to completely remove the blacklists -= you will have to manually remove what remains in %%DATADIR%%. -= -= To activate the changes do a %%PREFIX%%/sbin/squid -k reconfigure + In order to activate %%PORTNAME%% you have to edit squid.conf + To the contain "url_rewrite_program %%PREFIX%%/bin/%%PORTNAME%%" + and create a configuration file for %%PORTNAME%%. + + Sample blacklists have been installed in %%EXAMPLESDIR%%. + + A sample configuration file has beeen installed in + %%PREFIX%%/etc/squid/squidGuard.conf.sample. + + You need to edit the configuration and compile the blacklist + you choose to use with: + squidGuard -d -C all + + Please bear in mind that this is just a sample configuration file + and for any real world usage you need to download or create your + own updated blacklists and create your own configuration file. + + Check documentation here: + + http://www.squidguard.org/Doc/ + + To activate the changes do a %%PREFIX%%/sbin/squid -k reconfigure =================================================================== Modified: head/www/squidguard/pkg-plist ============================================================================== --- head/www/squidguard/pkg-plist Mon Oct 7 11:24:23 2013 (r329693) +++ head/www/squidguard/pkg-plist Mon Oct 7 11:45:08 2013 (r329694) @@ -1,5 +1,7 @@ bin/squidGuard +@unexec if cmp -s %D/etc/squid/squidGuard.conf.sample %D/etc/squid/squidGuard.conf; then rm -f %D/etc/squid/squidGuard.conf; fi etc/squid/squidGuard.conf.sample +@exec if [ ! -f %D/etc/squid/squidGuard.conf ]; then cp -p %D/%F %B/squidGuard.conf; fi %%PORTDOCS%%%%DOCSDIR%%/LDAPFlow.txt %%PORTDOCS%%%%DOCSDIR%%/README %%PORTDOCS%%%%DOCSDIR%%/authentication.html @@ -30,43 +32,48 @@ etc/squid/squidGuard.conf.sample %%PORTDOCS%%%%DOCSDIR%%/troubleshoot.html %%PORTDOCS%%%%DOCSDIR%%/troubleshoot.txt %%PORTDOCS%%%%DOCSDIR%%/squidGuard.gif -%%BLACKLIST%%%%PORTDOCS%%%%DOCSDIR%%/README.blacklists %%PORTDOCS%%@dirrm %%DOCSDIR%% -%%BLACKLIST%%@cwd %%SAMPLE_BL_DIR%% -%%BLACKLIST%%ads/domains -%%BLACKLIST%%ads/urls -%%BLACKLIST%%aggressive/domains -%%BLACKLIST%%aggressive/urls -%%BLACKLIST%%audio-video/domains -%%BLACKLIST%%audio-video/urls -%%BLACKLIST%%drugs/domains -%%BLACKLIST%%drugs/urls -%%BLACKLIST%%gambling/domains -%%BLACKLIST%%gambling/urls -%%BLACKLIST%%hacking/domains -%%BLACKLIST%%hacking/urls -%%BLACKLIST%%mail/domains -%%BLACKLIST%%porn/domains -%%BLACKLIST%%porn/urls -%%BLACKLIST%%porn/expressions -%%BLACKLIST%%proxy/domains -%%BLACKLIST%%proxy/urls -%%BLACKLIST%%violence/domains -%%BLACKLIST%%violence/urls -%%BLACKLIST%%violence/expressions -%%BLACKLIST%%warez/domains -%%BLACKLIST%%warez/urls -%%BLACKLIST%%@dirrm ads -%%BLACKLIST%%@dirrm aggressive -%%BLACKLIST%%@dirrm audio-video -%%BLACKLIST%%@dirrm drugs -%%BLACKLIST%%@dirrm gambling -%%BLACKLIST%%@dirrm hacking -%%BLACKLIST%%@dirrm mail -%%BLACKLIST%%@dirrm porn -%%BLACKLIST%%@dirrm proxy -%%BLACKLIST%%@dirrm violence -%%BLACKLIST%%@dirrm warez -%%BLACKLIST%%@cwd / -%%BLACKLIST%%@dirrm %%SAMPLE_BL_DIR%% -%%BLACKLIST%%@dirrmtry %%DATADIR%% +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/blacklists/ads/domains +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/blacklists/ads/urls +%%PORTEXAMPLES%%@dirrm %%EXAMPLESDIR%%/blacklists/ads +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/blacklists/aggressive/domains +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/blacklists/aggressive/urls +%%PORTEXAMPLES%%@dirrm %%EXAMPLESDIR%%/blacklists/aggressive +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/blacklists/audio-video/domains +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/blacklists/audio-video/urls +%%PORTEXAMPLES%%@dirrm %%EXAMPLESDIR%%/blacklists/audio-video +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/blacklists/drugs/domains +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/blacklists/drugs/urls +%%PORTEXAMPLES%%@dirrm %%EXAMPLESDIR%%/blacklists/drugs +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/blacklists/gambling/domains +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/blacklists/gambling/urls +%%PORTEXAMPLES%%@dirrm %%EXAMPLESDIR%%/blacklists/gambling +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/blacklists/hacking/domains +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/blacklists/hacking/urls +%%PORTEXAMPLES%%@dirrm %%EXAMPLESDIR%%/blacklists/hacking +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/blacklists/mail/domains +%%PORTEXAMPLES%%@dirrm %%EXAMPLESDIR%%/blacklists/mail +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/blacklists/porn/domains +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/blacklists/porn/expressions +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/blacklists/porn/urls +%%PORTEXAMPLES%%@dirrm %%EXAMPLESDIR%%/blacklists/porn +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/blacklists/proxy/domains +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/blacklists/proxy/urls +%%PORTEXAMPLES%%@dirrm %%EXAMPLESDIR%%/blacklists/proxy +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/blacklists/violence/domains +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/blacklists/violence/expressions +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/blacklists/violence/urls +%%PORTEXAMPLES%%@dirrm %%EXAMPLESDIR%%/blacklists/violence +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/blacklists/warez/domains +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/blacklists/warez/urls +%%PORTEXAMPLES%%@dirrm %%EXAMPLESDIR%%/blacklists/warez +%%PORTEXAMPLES%%@dirrm %%EXAMPLESDIR%%/blacklists +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/README.blacklists +%%PORTEXAMPLES%%@dirrm %%EXAMPLESDIR%% +%%PORTEXAMPLES%%@exec chown -R %%SQUID_UID%%:%%SQUID_GID%% %D/%%EXAMPLESDIR%%/blacklists +%%PORTEXAMPLES%%@exec chmod -R 550 %D/%%EXAMPLESDIR%%/blacklists +@exec mkdir -p %%DATADIR%% || true +@exec mkdir -p %%LOGDIR%% || true +%%PORTEXAMPLES%%@exec chown -R %%SQUID_UID%%:%%SQUID_GID%% %%LOGDIR%% +@exec rmdir %%DATADIR%% /var/db/fbsdmon 2>/dev/null || true +@exec rmdir %%LOGDIR%% /var/db/fbsdmon 2>/dev/null || true