Index: head/www/squidguard/pkg-plist.blacklist =================================================================== --- head/www/squidguard/pkg-plist.blacklist (revision 220467) +++ head/www/squidguard/pkg-plist.blacklist (nonexistent) @@ -1,58 +0,0 @@ -@cwd %%DATADIR%% -ads/domains -ads/domains.db -ads/urls -ads/urls.db -aggressive/domains -aggressive/domains.db -aggressive/urls -aggressive/urls.db -audio-video/domains -audio-video/domains.db -audio-video/urls -audio-video/urls.db -drugs/domains -drugs/domains.db -drugs/urls -drugs/urls.db -gambling/domains -gambling/domains.db -gambling/urls -gambling/urls.db -hacking/domains -hacking/domains.db -hacking/urls -hacking/urls.db -mail/domains -mail/domains.db -porn/domains -porn/domains.db -porn/urls -porn/urls.db -porn/expressions -proxy/domains -proxy/domains.db -proxy/urls -proxy/urls.db -violence/domains -violence/domains.db -violence/urls -violence/urls.db -violence/expressions -warez/domains -warez/domains.db -warez/urls -warez/urls.db -@dirrm ads -@dirrm aggressive -@dirrm audio-video -@dirrm drugs -@dirrm gambling -@dirrm hacking -@dirrm mail -@dirrm porn -@dirrm proxy -@dirrm violence -@dirrm warez -@cwd / -@dirrm %%DATADIR%% Property changes on: head/www/squidguard/pkg-plist.blacklist ___________________________________________________________________ Deleted: cvs2svn:cvs-rev ## -1 +0,0 ## -1.1 \ No newline at end of property Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Index: head/www/squidguard/Makefile =================================================================== --- head/www/squidguard/Makefile (revision 220467) +++ head/www/squidguard/Makefile (revision 220468) @@ -1,146 +1,159 @@ # New ports collection makefile for: squidGuard # Date created: 5 June 2000 # Whom: dl@tyfon.net # # $FreeBSD$ # PORTNAME= squidGuard PORTVERSION= 1.3 CATEGORIES= www MASTER_SITES= http://www.squidguard.org/Downloads/ MAINTAINER= ports@tyfon.net COMMENT= A fast redirector for squid RUN_DEPENDS= ${LOCALBASE}/sbin/squid:${PORTSDIR}/www/squid -BROKEN= bad plist - USE_BDB= 3+ HAS_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-dbhome=${DATADIR} \ --with-sg-logdir=${LOGDIR} \ --exec-prefix=${PREFIX} CFGINPUT= ${.CURDIR}/files/sgcfg.in SQUID_UID?= squid SQUID_GID?= squid DATADIR?= /var/db/${PORTNAME} +_DATADIR= ${WRKDIR}/data LOGDIR?= /var/log -PLIST:= ${WRKDIR}/PLIST -PLIST_SUB= DATADIR=${DATADIR} +SUB_FILES= pkg-message +SUB_LIST= PORTNAME=${PORTNAME} +PKGMESSAGE= ${WRKDIR}/pkg-message +.include + +.if !exists(${DATADIR}) +PLIST_SUB+= BLACKLIST="" +INSTALL_BL= yes +.else +PLIST_SUB+= BLACKLIST="@comment " +INSTALL_BL= no +.endif + pre-fetch: @if [ ${SQUID_UID} = "squid" -o ${SQUID_GID} = "squid" ] ; then \ ${ECHO_MSG} "===> SQUID_UID is set to \"${SQUID_UID}\" and SQUID_GID is set to \"${SQUID_GID}\"." ; \ ${ECHO_MSG} " To change this specify them with your make arguments, e.g." ; \ ${ECHO_MSG} " make SQUID_UID=nobody SQUID_GID=nogroup" ; \ fi post-patch: @${REINPLACE_CMD} \ -e 's,-ldb,-l${BDB_LIB_NAME},' ${WRKSRC}/configure @if [ "${BDB_LIB_NAME}" = "db-4.2" ] ; then \ ${REINPLACE_CMD} -E -e 's,(db_version),\1_4002,g' \ ${WRKSRC}/configure ; \ fi -pre-install: - @${CP} ${PKGDIR}/pkg-plist ${PLIST} +post-build: +.if ${INSTALL_BL} == "yes" + @${ECHO_MSG} "===> Building blacklists" + ${MKDIR} ${_DATADIR} + @${TAR} -C ${_DATADIR} --exclude *.diff -pxzf \ + ${WRKSRC}/samples/dest/blacklists.tar.gz + @${MV} -f ${_DATADIR}/blacklists/README ${WRKDIR}/README.blacklists + @${MV} -f ${_DATADIR}/blacklists/* ${_DATADIR}/ + @${RM} -r ${_DATADIR}/blacklists + @${CHOWN} -R ${SQUID_UID}:${SQUID_GID} ${_DATADIR} +.endif -### Install blacklists - -.if !exists(${DATADIR}) +pre-install: +# +# Install blacklists +# +.if ${INSTALL_BL} == "yes" @${ECHO_MSG} "===> Installing blacklists" @${MKDIR} ${DATADIR} - @${TAR} -C ${DATADIR} --exclude *.diff -pxzf ${WRKSRC}/samples/dest/blacklists.tar.gz - @${MV} -f ${DATADIR}/blacklists/README ${WRKDIR}/README.blacklists - @${MV} -f ${DATADIR}/blacklists/* ${DATADIR}/ - @${RM} -r ${DATADIR}/blacklists - @${CHOWN} -R ${SQUID_UID}:${SQUID_GID} ${DATADIR} + @${CP} -Rpf ${_DATADIR}/* ${DATADIR}/ @${CHMOD} -R 550 ${DATADIR} - @${CAT} ${PKGDIR}/pkg-plist.blacklist >> ${PLIST} @${ECHO_MSG} " -> Blacklists installed in: ${DATADIR}" .else @${ECHO_MSG} "===> Found existing datadirectory - skipping blacklist installation" .endif -### Create sample configuration file - +# +# Create sample configuration file +# @if [ ! -f "${PREFIX}/etc/squid/${PORTNAME}.conf" ] ; then \ ${ECHO_MSG} "===> Installing sample configuration file" ; \ - BLACKLIST_DIRS=`(cd ${DATADIR} && ${FIND} . -type d | ${SED} '/^\.$$/d; s/^\.\//!/' | ${XARGS} ${ECHO_CMD})`; \ + 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} "s|DATADIR|${DATADIR}|;s|LOGDIR|${LOGDIR}|;s|BLACKLIST_DIRS|$${BLACKLIST_DIRS}|;/DEST_CLASSES/r ${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 ; \ + ${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) +# +# 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 [ ! -f "${PREFIX}/etc/squid/${PORTNAME}.conf" -a \ - -f "${PREFIX}/etc/squid/${PORTNAME}.conf.sample" ] ; then \ - ${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" ; \ - fi - post-install: - -### Install documentation - +# +# Install documentation +# .if !defined(NOPORTDOCS) @${ECHO_MSG} "===> Installing ${PORTNAME} documentation" -@${MKDIR} ${DOCSDIR} .for i in ${WRKSRC}/doc/*.txt ${WRKSRC}/doc/*.html ${WRKSRC}/doc/*.gif ${WRKSRC}/doc/README @${INSTALL_DATA} ${WRKSRC}$i ${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 -### View short howto message + @${CAT} ${PKGMESSAGE} - @${ECHO_MSG} " " - @${ECHO_MSG} "===================================================================" - @${ECHO_MSG} "= In order to activate ${PORTNAME} you have to edit squid.conf" - @${ECHO_MSG} "= To the contain \"url_rewrite_program ${PREFIX}/bin/${PORTNAME}\"" - @${ECHO_MSG} "= and create a configuration file for ${PORTNAME}." - @${ECHO_MSG} "=" - @${ECHO_MSG} "= To activate the changes do a ${PREFIX}/sbin/squid -k reconfigure" - @${ECHO_MSG} "===================================================================" - @${ECHO_MSG} " " - -.include +.include Property changes on: head/www/squidguard/Makefile ___________________________________________________________________ Modified: cvs2svn:cvs-rev ## -1 +1 ## -1.18 \ No newline at end of property +1.19 \ No newline at end of property Index: head/www/squidguard/files/pkg-message.in =================================================================== --- head/www/squidguard/files/pkg-message.in (nonexistent) +++ head/www/squidguard/files/pkg-message.in (revision 220468) @@ -0,0 +1,7 @@ +=================================================================== += 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%%. += += To activate the changes do a %%PREFIX%%/sbin/squid -k reconfigure +=================================================================== Property changes on: head/www/squidguard/files/pkg-message.in ___________________________________________________________________ Added: cvs2svn:cvs-rev ## -0,0 +1 ## +1.1 \ No newline at end of property Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Index: head/www/squidguard/pkg-plist =================================================================== --- head/www/squidguard/pkg-plist (revision 220467) +++ head/www/squidguard/pkg-plist (revision 220468) @@ -1,19 +1,80 @@ bin/squidGuard -share/doc/squidGuard/LDAPFlow.txt -share/doc/squidGuard/README -share/doc/squidGuard/configuration.html -share/doc/squidGuard/configuration.txt -share/doc/squidGuard/configure.html -share/doc/squidGuard/configure.txt -share/doc/squidGuard/extended.html -share/doc/squidGuard/extended.txt -share/doc/squidGuard/faq.html -share/doc/squidGuard/faq.txt -share/doc/squidGuard/index.html -share/doc/squidGuard/install.html -share/doc/squidGuard/install.txt -share/doc/squidGuard/installation.html -share/doc/squidGuard/installation.txt -share/doc/squidGuard/squidGuard.gif etc/squid/squidGuard.conf.sample -@dirrm share/doc/squidGuard +@dirrm squidGuard +%%PORTDOCS%%%%DOCSDIR%%/LDAPFlow.txt +%%PORTDOCS%%%%DOCSDIR%%/README +%%PORTDOCS%%%%DOCSDIR%%/configuration.html +%%PORTDOCS%%%%DOCSDIR%%/configuration.txt +%%PORTDOCS%%%%DOCSDIR%%/configure.html +%%PORTDOCS%%%%DOCSDIR%%/configure.txt +%%PORTDOCS%%%%DOCSDIR%%/extended.html +%%PORTDOCS%%%%DOCSDIR%%/extended.txt +%%PORTDOCS%%%%DOCSDIR%%/faq.html +%%PORTDOCS%%%%DOCSDIR%%/faq.txt +%%PORTDOCS%%%%DOCSDIR%%/index.html +%%PORTDOCS%%%%DOCSDIR%%/install.html +%%PORTDOCS%%%%DOCSDIR%%/install.txt +%%PORTDOCS%%%%DOCSDIR%%/installation.html +%%PORTDOCS%%%%DOCSDIR%%/installation.txt +%%PORTDOCS%%%%DOCSDIR%%/squidGuard.gif +%%PORTDOCS%%%%DOCSDIR%%/README.blacklists +%%PORTDOCS%%@dirrm %%DOCSDIR%% + +%%BLACKLIST%%@cwd %%DATADIR%% +%%BLACKLIST%%ads/domains +%%BLACKLIST%%ads/domains.db +%%BLACKLIST%%ads/urls +%%BLACKLIST%%ads/urls.db +%%BLACKLIST%%aggressive/domains +%%BLACKLIST%%aggressive/domains.db +%%BLACKLIST%%aggressive/urls +%%BLACKLIST%%aggressive/urls.db +%%BLACKLIST%%audio-video/domains +%%BLACKLIST%%audio-video/domains.db +%%BLACKLIST%%audio-video/urls +%%BLACKLIST%%audio-video/urls.db +%%BLACKLIST%%drugs/domains +%%BLACKLIST%%drugs/domains.db +%%BLACKLIST%%drugs/urls +%%BLACKLIST%%drugs/urls.db +%%BLACKLIST%%gambling/domains +%%BLACKLIST%%gambling/domains.db +%%BLACKLIST%%gambling/urls +%%BLACKLIST%%gambling/urls.db +%%BLACKLIST%%hacking/domains +%%BLACKLIST%%hacking/domains.db +%%BLACKLIST%%hacking/urls +%%BLACKLIST%%hacking/urls.db +%%BLACKLIST%%mail/domains +%%BLACKLIST%%mail/domains.db +%%BLACKLIST%%porn/domains +%%BLACKLIST%%porn/domains.db +%%BLACKLIST%%porn/urls +%%BLACKLIST%%porn/urls.db +%%BLACKLIST%%porn/expressions +%%BLACKLIST%%proxy/domains +%%BLACKLIST%%proxy/domains.db +%%BLACKLIST%%proxy/urls +%%BLACKLIST%%proxy/urls.db +%%BLACKLIST%%violence/domains +%%BLACKLIST%%violence/domains.db +%%BLACKLIST%%violence/urls +%%BLACKLIST%%violence/urls.db +%%BLACKLIST%%violence/expressions +%%BLACKLIST%%warez/domains +%%BLACKLIST%%warez/domains.db +%%BLACKLIST%%warez/urls +%%BLACKLIST%%warez/urls.db +%%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 %%DATADIR%% Property changes on: head/www/squidguard/pkg-plist ___________________________________________________________________ Modified: cvs2svn:cvs-rev ## -1 +1 ## -1.3 \ No newline at end of property +1.4 \ No newline at end of property