head	1.39;
access;
symbols
	RELEASE_8_3_0:1.33
	RELEASE_9_0_0:1.33
	RELEASE_7_4_0:1.27
	RELEASE_8_2_0:1.27
	RELEASE_6_EOL:1.27
	RELEASE_8_1_0:1.25
	RELEASE_7_3_0:1.25
	RELEASE_8_0_0:1.24
	RELEASE_7_2_0:1.23
	RELEASE_7_1_0:1.18
	RELEASE_6_4_0:1.18
	RELEASE_5_EOL:1.16
	RELEASE_7_0_0:1.15
	RELEASE_6_3_0:1.15
	PRE_XORG_7:1.15
	RELEASE_4_EOL:1.15
	RELEASE_6_2_0:1.14
	RELEASE_6_1_0:1.14
	RELEASE_5_5_0:1.14
	RELEASE_6_0_0:1.12
	RELEASE_5_4_0:1.12
	RELEASE_4_11_0:1.12
	RELEASE_5_3_0:1.12
	RELEASE_4_10_0:1.12
	RELEASE_5_2_1:1.10
	RELEASE_5_2_0:1.10
	RELEASE_4_9_0:1.10
	RELEASE_5_1_0:1.10
	RELEASE_4_8_0:1.10
	RELEASE_5_0_0:1.9
	RELEASE_4_7_0:1.9
	RELEASE_4_6_2:1.8
	RELEASE_4_6_1:1.8
	RELEASE_4_6_0:1.8
	RELEASE_5_0_DP1:1.5
	RELEASE_4_5_0:1.4
	RELEASE_4_4_0:1.3
	RELEASE_4_3_0:1.2
	RELEASE_4_2_0:1.1
	RELEASE_4_1_1:1.1
	RELEASE_4_1_0:1.1;
locks; strict;
comment	@# @;


1.39
date	2012.12.28.19.37.56;	author svnexp;	state Exp;
branches;
next	1.38;

1.38
date	2012.11.17.06.03.06;	author svnexp;	state Exp;
branches;
next	1.37;

1.37
date	2012.10.22.12.05.13;	author madpilot;	state Exp;
branches;
next	1.36;

1.36
date	2012.06.25.13.31.07;	author madpilot;	state Exp;
branches;
next	1.35;

1.35
date	2012.05.31.21.12.14;	author madpilot;	state Exp;
branches;
next	1.34;

1.34
date	2012.04.14.18.45.07;	author madpilot;	state Exp;
branches;
next	1.33;

1.33
date	2011.05.26.12.30.29;	author mandree;	state Exp;
branches;
next	1.32;

1.32
date	2011.05.26.12.22.56;	author mandree;	state Exp;
branches;
next	1.31;

1.31
date	2011.05.26.09.54.09;	author mandree;	state Exp;
branches;
next	1.30;

1.30
date	2011.05.26.09.40.11;	author mandree;	state Exp;
branches;
next	1.29;

1.29
date	2011.05.23.12.09.06;	author mandree;	state Exp;
branches;
next	1.28;

1.28
date	2011.02.10.17.11.15;	author miwi;	state Exp;
branches;
next	1.27;

1.27
date	2010.10.31.14.21.16;	author rene;	state Exp;
branches;
next	1.26;

1.26
date	2010.08.13.14.11.05;	author pav;	state Exp;
branches;
next	1.25;

1.25
date	2009.10.22.23.01.53;	author delphij;	state Exp;
branches;
next	1.24;

1.24
date	2009.07.20.05.31.08;	author pgollucci;	state Exp;
branches;
next	1.23;

1.23
date	2009.01.14.09.12.28;	author miwi;	state Exp;
branches;
next	1.22;

1.22
date	2008.11.29.23.53.48;	author linimon;	state Exp;
branches;
next	1.21;

1.21
date	2008.11.28.23.39.55;	author linimon;	state Exp;
branches;
next	1.20;

1.20
date	2008.09.23.02.08.28;	author edwin;	state Exp;
branches;
next	1.19;

1.19
date	2008.09.23.01.59.14;	author edwin;	state Exp;
branches;
next	1.18;

1.18
date	2008.08.24.20.01.05;	author pav;	state Exp;
branches;
next	1.17;

1.17
date	2008.08.18.06.58.12;	author edwin;	state Exp;
branches;
next	1.16;

1.16
date	2008.03.29.05.32.13;	author beech;	state Exp;
branches;
next	1.15;

1.15
date	2006.12.19.01.27.09;	author leeym;	state Exp;
branches;
next	1.14;

1.14
date	2005.11.17.20.05.34;	author mnag;	state Exp;
branches;
next	1.13;

1.13
date	2005.10.17.18.10.17;	author garga;	state Exp;
branches;
next	1.12;

1.12
date	2004.01.31.23.34.35;	author sergei;	state Exp;
branches;
next	1.11;

1.11
date	2004.01.14.10.12.16;	author sergei;	state Exp;
branches;
next	1.10;

1.10
date	2003.02.21.14.01.32;	author knu;	state Exp;
branches;
next	1.9;

1.9
date	2002.08.22.19.13.46;	author ade;	state Exp;
branches;
next	1.8;

1.8
date	2002.05.21.14.09.16;	author cy;	state Exp;
branches;
next	1.7;

1.7
date	2002.05.21.13.21.37;	author cy;	state Exp;
branches;
next	1.6;

1.6
date	2002.05.18.03.11.52;	author kris;	state Exp;
branches;
next	1.5;

1.5
date	2002.02.09.16.39.40;	author cy;	state Exp;
branches;
next	1.4;

1.4
date	2001.10.05.14.40.22;	author adrian;	state Exp;
branches;
next	1.3;

1.3
date	2001.06.01.06.05.17;	author obrien;	state Exp;
branches;
next	1.2;

1.2
date	2001.01.16.17.33.05;	author sobomax;	state Exp;
branches;
next	1.1;

1.1
date	2000.07.10.03.58.34;	author steve;	state Exp;
branches;
next	;


desc
@@


1.39
log
@## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/309578
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ## r309578 | madpilot | 2012-12-28 19:07:34 +0000 (Fri, 28 Dec 2012) | 5 lines
## SVN ##
## SVN ## - Add option to depend on www/squid32
## SVN ##
## SVN ## PR:		ports/174761
## SVN ## Submitted by:	Dewayne <dewayne@@amdg.etowns.org>
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ##
@
text
@# $FreeBSD: head/www/squidguard/Makefile 309578 2012-12-28 19:07:34Z madpilot $

PORTNAME=	squidGuard
PORTVERSION=	1.4
PORTREVISION=	4
CATEGORIES=	www
MASTER_SITES=	http://www.squidguard.org/Downloads/:a \
		http://www.squidguard.org/Downloads/Contrib/:b
DISTFILES=	${DISTNAME}${EXTRACT_SUFX}:a \
		squidGuard-1.4-quoted_string_support.diff:b \
		squidGuard-1.4-dnsbl.patch:b
EXTRACT_ONLY=	${DISTNAME}${EXTRACT_SUFX}

MAINTAINER=	madpilot@@FreeBSD.org
COMMENT=	A fast redirector for squid

LICENSE=	GPLv2
LICENSE_FILE=	${WRKSRC}/COPYING

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-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

DATADIR?=	/var/db/${PORTNAME}
SAMPLE_BL_DIR=	${DATADIR}.sample
PLIST_SUB+=	SAMPLE_BL_DIR=${SAMPLE_BL_DIR}
_DATADIR=	${WRKDIR}/data
LOGDIR?=	/var/log

SUB_FILES=	pkg-message pkg-deinstall
SUB_LIST=	PORTNAME=${PORTNAME} \
		SAMPLE_BL_DIR=${SAMPLE_BL_DIR}
PKGMESSAGE=	${WRKDIR}/pkg-message

OPTIONS_DEFINE=	DNS_BL DOCS LDAP QUOTE_STRING SAMPLE_BL
OPTIONS_SINGLE=		SV
OPTIONS_SINGLE_SV=	SQUID27 SQUID31 SQUID32
OPTIONS_DEFAULT=	SAMPLE_BL SQUID27

SAMPLE_BL_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
SQUID31_DESC=	Depend on Squid 3.1.x
SQUID32_DESC=	Depend on Squid 3.2.x

.include <bsd.port.options.mk>

.if ${PORT_OPTIONS:MSQUID27}
RUN_DEPENDS=	${LOCALBASE}/sbin/squid:${PORTSDIR}/www/squid
.endif

.if ${PORT_OPTIONS:MSQUID31}
RUN_DEPENDS=	${LOCALBASE}/sbin/squid:${PORTSDIR}/www/squid31
.endif

.if ${PORT_OPTIONS:MSQUID32}
RUN_DEPENDS=	${LOCALBASE}/sbin/squid:${PORTSDIR}/www/squid32
.endif

.if ${PORT_OPTIONS:MLDAP}
CONFIGURE_ARGS+=	--with-ldap
USE_OPENLDAP=		yes
.else
CONFIGURE_ARGS+=	--without-ldap
.endif

.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

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
.if ${PORT_OPTIONS:MQUOTE_STRING}
	${PATCH} -d ${WRKSRC} --forward --quiet -p2 <${DISTDIR}/squidGuard-1.4-quoted_string_support.diff
.endif
.if ${PORT_OPTIONS:MDNS_BL}
	${PATCH} -d ${WRKSRC} --forward --quiet -p1 <${DISTDIR}/squidGuard-1.4-dnsbl.patch
.endif

post-build:
.if ${PORT_OPTIONS:MSAMPLE_BL}
	@@${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
.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

post-install:
#
# Install documentation
#
.if ${PORT_OPTIONS:MDOCS}
	@@${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

	@@${CAT} ${PKGMESSAGE}

.include <bsd.port.mk>
@


1.38
log
@Switch exporter over
@
text
@d1 1
a1 1
# $FreeBSD: head/www/squidguard/Makefile 306271 2012-10-22 12:05:13Z madpilot $
d48 1
a48 1
OPTIONS_SINGLE_SV=	SQUID27 SQUID31
d56 1
d68 4
@


1.37
log
@SVN rev 306271 on 2012-10-22 12:05:13Z by madpilot

- Add OPTION to choose which version of squid to depend on
- Trim Makefile headers [1]

PORTREVISION not bumped since there is no functional change or
dependency change with default options.

Requested by:	Rainer Duffner <rainer@@ultra-secure.de> and many others in the past
Approved by:	Dan Larsson <dl@@tyfon.net> (creator) [1]
Feature safe:	yes
@
text
@d1 1
a1 1
# $FreeBSD$
@


1.36
log
@Fix option description.

Approved by:	crees, tabthorpe (mentors, implicit)
@
text
@a0 4
# New ports collection makefile for:    squidGuard
# Date created:        5 June 2000
# Whom:                dl@@tyfon.net
#
a1 1
#
a19 2
RUN_DEPENDS=	${LOCALBASE}/sbin/squid:${PORTSDIR}/www/squid

d47 3
a49 1
OPTIONS_DEFAULT=	SAMPLE_BL
d54 2
d59 8
@


1.35
log
@- Convert to new options framework
- Remove uneeded double quotes
- While here fix various portlint warnings
- Indent make conditionals and loop

Approved by:	Boris Samorodov <bsam@@FreeBSD.org> (net/unison-nox11 maintainer)
Approved by:	Matthias Andree <mandree@@FreeBSD.org> (implicit, net/unison232 maintainer)
Approved by:	tabthorpe (mentor)
@
text
@d58 1
a58 1
QUOTE_STRING=	Add quoted string patch
@


1.34
log
@Change to my FreeBSD.org email address.

Approved by:	crees (mentor)
@
text
@a21 2
RUN_DEPENDS=	${LOCALBASE}/sbin/squid:${PORTSDIR}/www/squid

d25 2
d53 2
a54 4
OPTIONS=	SAMPLE_BL	"Install sample blacklists" On \
		LDAP		"Enable LDAP support" Off \
		DNS_BL		"Enable DNS based blacklists" Off \
		QUOTE_STRING	"Add quoted string patch" Off
d56 3
a58 1
.include <bsd.port.pre.mk>
d60 3
a62 1
.if defined(WITH_LDAP)
d69 4
a72 1
.if defined(WITHOUT_SAMPLE_BL)
d74 2
a75 4
PLIST_SUB+=	BLACKLIST="@@comment "
.else
.if !exists(${DATADIR})
INSTALL_BL=	yes
d78 1
a78 2
.endif
PLIST_SUB+=	BLACKLIST=""
d95 1
a95 1
.if defined(WITH_QUOTE_STRING)
d98 1
a98 1
.if defined(WITH_DNS_BL)
d103 1
a103 1
.if !defined(WITHOUT_SAMPLE_BL)
d117 1
a117 1
.if !defined(WITHOUT_SAMPLE_BL)
d184 1
a184 1
.if !defined(NOPORTDOCS)
d187 1
a187 1
.for i in ${WRKSRC}/doc/*.txt ${WRKSRC}/doc/*.html ${WRKSRC}/doc/*.gif ${WRKSRC}/doc/README
d189 1
a189 1
.endfor
d203 1
a203 1
.include <bsd.port.post.mk>
@


1.33
log
@HAS_CONFIGURE -> GNU_CONFIGURE + cleanup
@
text
@d19 1
a19 1
MAINTAINER=	mad@@madpilot.net
@


1.32
log
@- Add optional vendor patch which adds support for dnsbl. [1]
- Pick assorted portlints [2], [3]
- Add -I${LOCALBASE}/include to fix WITH_LDAP build [3]
- MKDIR configuration directory to fix install from scratch [3]
- DISTFILE/MASTER_SITE matching [3]
- Bump PORTREVISION [3]

Suggested by: Davide D'Amico <davide.damico@@gmail.com> (with patch) [1]
Submitted by: Guido Falsi (maintainer) [2]
Suggested by: mandree [3]
PR:           ports/157326 [1], [2]
PR:           ports/157338 [3]
PR:           ports/157343 [2]
@
text
@d28 1
a28 1
HAS_CONFIGURE=	yes
d35 1
a35 5

CFLAGS+=	-I${PREFIX}/include -I${LOCALBASE}/include
LDFLAGS+=	-L${LOCALBASE}/lib

CONFIGURE_ENV=	LDFLAGS="${LDFLAGS}"
@


1.31
log
@DB4.1 is alright, bump USE_BDB, remove BROKEN.
@
text
@d10 1
a10 1
PORTREVISION=	3
d12 6
a17 1
MASTER_SITES=	http://www.squidguard.org/Downloads/
d22 2
d27 1
a27 4
RUN_DEPENDS=	${LOCALBASE}/sbin/squid:${PORTSDIR}/www/squid

FORBIDDEN=	Lacks patches from http://www.squidguard.org/Downloads/Patches/1.4/
USE_BDB=	41+
d36 4
a39 1
CONFIGURE_ENV=	CFLAGS="${CFLAGS} -I${PREFIX}/include" LDFLAGS="${LDFLAGS} -L${LOCALBASE}/lib"
d41 1
a41 1
CFGINPUT=	${.CURDIR}/files/sgcfg.in
d59 1
a63 6
.if defined(WITH_QUOTE_STRING)
PATCH_SITES=	http://www.squidguard.org/Downloads/
PATCHFILES=	Contrib/squidGuard-1.4-quoted_string_support.diff
PATCH_DIST_STRIP=-p2
.endif

d97 6
d141 1
@


1.30
log
@Mark broken/forbidden.
@
text
@a21 1
BROKEN=		USE_BDB was misdeclared as 3+, db4 fails
d23 1
a23 1
USE_BDB=	40+
@


1.29
log
@Remove databases/db3. All users were using db3+
and have in fact been using 4.0+ since 2011-04-12 (Mk/bsd.database.mk r1.57).

Chase upgrade in dependent ports and change USE_BDB to 40+.
@
text
@d22 2
@


1.28
log
@- Add an option to activate a vendor patch which allows using quoted
strings in the configuration file.

PR:		154656
Submitted by:	Guido Falsi <mad@@madpilot.net> (maintainer)
@
text
@d22 1
a22 1
USE_BDB=	3+
@


1.27
log
@- Fix ldap support by helping the port's configure script find the ldap
  libraries. [1]
- Prevent an ECHO_MSG from being displayed twice
- Bump PORTREVISION
PR:		ports/151473
Submitted by:	maintainer
Reported by:	cyx on freebsd-ports@@
@
text
@d17 3
d50 2
a51 1
		LDAP		"Enable LDAP support" Off
d55 6
@


1.26
log
@- Fix installation and plist for non-default SAMPLE_BL=off option

PR:		ports/148225
Submitted by:	Guido Falsi <mad@@madpilot.net> (maintainer)
@
text
@d10 1
a10 1
PORTREVISION=	2
d28 1
a28 1
CONFIGURE_ENV=	CFLAGS="${CFLAGS} -I${PREFIX}/include"
d159 1
a159 1
	${ECHO_MSG} "===>   Existing configuration file found - blacklist databases not created"
@


1.25
log
@Apply vendor fixes 20091015 and 20091019 to fix multiple vulnerabilities
of squidGuard 1.4.

Requested by:	maintainer
Security:	692ab645-bf5d-11de-849b-00151797c2d4
@
text
@d106 1
a108 1
	@@${MKDIR} ${DATADIR}
@


1.24
log
@Added options to choose if sample blacklists should be installed
or not and for LDAP support.

Sample blacklists are now installed in a *.sample hierarchy and
copied other to the working one only if not present. This fixes
a problem with user blacklists being removed/overwritten on port
deinstall and update.

Patched the configure to correctly detect ldap library. This was
requested by many.

Many thanks to Gianni Doe <gdoe6545@@yahoo.it> who tested the patch
and reported back ldap support is working properly.

PR:             ports/136628
Submitted by:   Guido Falsi <mad@@madpilot.net> (maintainer)
@
text
@d10 1
a10 1
PORTREVISION=	1
@


1.23
log
@- Update to 1.4

PR:		130051
Submitted by:	Guido Falsi <mad@@madpilot.net>
@
text
@d10 1
d28 2
d36 2
d41 3
a43 2
SUB_FILES=	pkg-message
SUB_LIST=	PORTNAME=${PORTNAME}
d46 3
d51 11
a62 1
PLIST_SUB+=	BLACKLIST=""
a64 1
PLIST_SUB+=	BLACKLIST="@@comment "
d67 2
d86 1
a86 1
.if ${INSTALL_BL} == "yes"
d100 6
@


1.22
log
@Assign to new volunteer who has submitted updates in the past.
@
text
@d9 1
a9 2
PORTVERSION=	1.3
PORTREVISION=	1
@


1.21
log
@Reset ports@@tyfon.net due to maintainer-timeouts and no response to email.

Hat:	portmgr
@
text
@d14 1
a14 1
MAINTAINER=	ports@@FreeBSD.org
@


1.20
log
@Move the CHOWN to the build-phase where the usernames actually exist.
Noticed by: QAT.
@
text
@d14 1
a14 1
MAINTAINER=	ports@@tyfon.net
@


1.19
log
@[patch] www/squidguard - improve Makefile

        Redo Makefile:
        - split pre-install in post-build with regarding to extracting
          of blacklists.
        - Make targets easier to read.
        - Merge pkg-plist and pkg-plist.blacklist and use PLIST_SUB.

        - Add files/pkg-message.in

PR:             ports/126626
Approved by:    maintainer timeout
@
text
@d10 1
a74 1
	@@${CHOWN} -R ${SQUID_UID}:${SQUID_GID} ${_DATADIR}
d85 1
@


1.18
log
@- Mark BROKEN: bad plist

Reported by:	pointyhat
@
text
@a17 2
BROKEN=		bad plist

d33 1
d36 13
a48 2
PLIST:=		${WRKDIR}/PLIST
PLIST_SUB=	DATADIR=${DATADIR}
d65 12
d78 4
a81 5
	@@${CP} ${PKGDIR}/pkg-plist ${PLIST}

### 	Install blacklists

.if !exists(${DATADIR})
d84 1
a84 5
	@@${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}
a85 1
	@@${CAT} ${PKGDIR}/pkg-plist.blacklist >> ${PLIST}
d91 3
a93 2
###     Create sample configuration file

d96 2
a97 1
		BLACKLIST_DIRS=`(cd ${DATADIR} && ${FIND} . -type d | ${SED} '/^\.$$/d; s/^\.\//!/' | ${XARGS} ${ECHO_CMD})`; \
d108 3
a110 1
		${SED} "s|DATADIR|${DATADIR}|;s|LOGDIR|${LOGDIR}|;s|BLACKLIST_DIRS|$${BLACKLIST_DIRS}|;/DEST_CLASSES/r ${WRKDIR}/${PORTNAME}.conf.dests" \
d114 2
a115 1
		${CHOWN} ${SQUID_UID}:${SQUID_GID} ${PREFIX}/etc/squid/${PORTNAME}.conf.sample ; \
d121 14
a134 12
###	Create blacklist databases (assume fresh install if we only have a sample config)

	@@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
d137 3
a139 3

###     Install documentation

d157 1
a157 11
###	View short howto message

	@@${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} " "
d159 1
a159 1
.include <bsd.port.mk>
@


1.17
log
@www/squidguard does not work unless its UID/GID are modified

	www/squigguard installs blacklist files to /var/db/squidGuard
	and the UID:GID of the installed files is set to nobody:nogroup.
	The permission for the files is 0550 or 0660. On the other
	hand, www/squid specifies squid:squid as UID:GID.

	As a result, squidGuard cannot handle blacklist files so
	websites that should not be accessed cannot be filtered.

PR:		ports/120923
Submitted by:	Jiro Kita <ktj@@ktjdragon.com>
Approved by:	maintainer timeout
@
text
@d18 2
@


1.16
log
@- Update to 1.3

PR:		ports/121719
Submitted by:	Guido Falsi <mad@@madpilot.net>
Approved by:	maintainer timeout (two weeks)
@
text
@d29 2
a30 2
SQUID_UID?=	nobody
SQUID_GID?=	nogroup
d39 1
a39 1
	@@if [ ${SQUID_UID} = "nobody" -o ${SQUID_GID} = "nogroup" ] ; then \
d42 1
a42 1
		${ECHO_MSG} "      make SQUID_UID=squid SQUID_GID=squid" ; \
d137 1
a137 1
	@@${ECHO_MSG} "= To the contain \"redirect_program	${PREFIX}/bin/${PORTNAME}\""
@


1.15
log
@- utilize USE_BDB

PR:		89023
@
text
@d9 1
a9 2
PORTVERSION=	1.2.0
PORTREVISION=	1
d11 1
a11 3
MASTER_SITES=	http://ftp.teledanmark.no/pub/www/proxy/squidGuard/ \
		ftp://ftp.teledanmark.no/pub/www/proxy/squidGuard/ \
		http://web01.ux.tyfon.net/ports/distfiles/
@


1.14
log
@Fix install when WRKDIRPREFIX is different

PR:		88871
Submitted by:	Dean Phillips <dmphilli@@gmail.com>
Approved by:	Dan Larsson <dl@@tyfon.net> (maintainer)
@
text
@a18 1
LIB_DEPENDS=	db3.3:${PORTSDIR}/databases/db3
d21 1
d23 2
a24 2
CONFIGURE_ARGS=	--with-db-inc=${LOCALBASE}/include/db3 \
		--with-db-lib=${LOCALBASE}/lib \
d48 8
@


1.13
log
@- Fix port not respecting non-standard LOCALBASE/X11BASE
- Use DOCSDIR

PR:		ports/87570
Submitted by:	maintainer
@
text
@d30 1
a30 1
CFGINPUT=	files/sgcfg.in
@


1.12
log
@- Add USE_SIZE=yes to Makefile
- Add SIZE to distinfo

PR:		ports/62113
Submitted by:	maintainer
@
text
@a21 1
USE_SIZE=	yes
d27 2
a28 1
		--with-sg-logdir=${LOGDIR}
d55 1
a55 1
	@@${MKDIR} -p ${DATADIR}
d112 1
a112 1
	-@@${MKDIR} ${PREFIX}/share/doc/${PORTNAME}
d114 1
a114 1
	@@${INSTALL_DATA} ${WRKSRC}$i ${PREFIX}/share/doc/${PORTNAME}
d117 1
a117 1
		${INSTALL_DATA} ${WRKDIR}/README.blacklists ${PREFIX}/share/doc/${PORTNAME} ; \
d119 1
a119 1
	@@${ECHO_MSG} "       -> Documentation installed in: ${PREFIX}/share/doc/${PORTNAME}"
@


1.11
log
@- ost.eltele.no seems to have moved to teledanmark.no, reflect this in
  MASTER_SITES. The distfile is fetchable from these sites although
  www.squidguard.org is currently not reachable (for me) due to DNS
  or domain registration problems.
- move runtime dependency from www/squid24 to www/squid

PR:		61255
Submitted by:	Thomas-Martin Seck <tmseck@@netcologne.de>
Approved by:	maintainer
@
text
@d22 1
@


1.10
log
@De-pkg-comment.
@
text
@d12 2
a13 2
MASTER_SITES=	http://ftp.ost.eltele.no/pub/www/proxy/squidGuard/ \
		ftp://ftp.ost.eltele.no/pub/www/proxy/squidGuard/ \
d20 1
a20 1
RUN_DEPENDS=	${LOCALBASE}/sbin/squid:${PORTSDIR}/www/squid24
@


1.9
log
@BerkeleyDB cleanup - stage 2

Update databases/db3 to 3.3.11, and fix the few ports that need sorting
after the shlib version update, and a slight API change from 3.2.x->3.3.x
@
text
@d17 1
@


1.8
log
@Forced commit to document that the previous commit was submitted by
the MAINTAINER.
@
text
@d10 1
d18 1
a18 1
BUILD_DEPENDS=	${LOCALBASE}/lib/libdb3.so.2:${PORTSDIR}/databases/db3
d22 2
a23 2
CONFIGURE_ARGS=	--with-db-inc=${PREFIX}/include/db3 \
		--with-db-lib=${PREFIX}/lib \
@


1.7
log
@The port installation fails during brand new installs, e.g not upgrades,
because of a missing file. This patch addresses this and adds an
alternative master site.

PR:		36875
Submitted by:	Dan Larsson  <ports@@tyfon.net>
@
text
@@


1.6
log
@BROKEN: Does not install cleanly
@
text
@d12 2
a13 1
		ftp://ftp.ost.eltele.no/pub/www/proxy/squidGuard/
a16 2
BROKEN=		"Does not install cleanly"

a98 2
		${ECHO_MSG} "       -> Be sure to check \"${LOGDIR}/${PORTNAME}.log\" for any errors" ; \
		${CHOWN} ${SQUID_UID}:${SQUID_GID} ${LOGDIR}/${PORTNAME}.log ; \
@


1.5
log
@Update squidguard 1.1.4 -> 1.2.0.

PR:		ports/33636
Submitted by:	MAINTAINER:  Dan Larsson <dl@@tyfon.net>
Reviewed by:	nectar
Approved by:	MAINTAINER:  Dan Larsson <dl@@tyfon.net>
@
text
@d16 2
@


1.4
log
@Change the ports that relied on squid23 to rely on squid24.
I should have checked this first. :(

PR:		31050
Submitted by:	des
@
text
@d5 1
a5 1
# $FreeBSD: ports/www/squidguard/Makefile,v 1.3 2001/06/01 06:05:17 obrien Exp $
d9 1
a9 1
PORTVERSION=	1.1.4
d16 1
a16 1
BUILD_DEPENDS=	${LOCALBASE}/lib/libdb2.a:${PORTSDIR}/databases/db
d20 1
a20 1
CONFIGURE_ARGS=	--with-db-inc=${PREFIX}/include/db2 \
d22 1
a22 1
		--with-sg-config=${PREFIX}/etc/squid/squidguard.conf \
d26 1
a26 7
###	To change any of the below paths add it to your make arg
.if !defined(DATADIR)
DATADIR=	/var/db/${PORTNAME}
.endif
.if !defined(LOGDIR)
LOGDIR=		/var/log
.endif
d28 2
a29 1
PLIST_SUB=	DATADIR=${DATADIR}
d31 2
a32 1
###	To optimize squidGuard add OPTIMIZE=YES to your make arg
d34 2
a35 4
.if defined(OPTIMIZE) && ${OPTIMIZE} == YES
CC=		gcc
CFLAGS=		-pipe -O6 -Wall -fomit-frame-pointer
.endif
d37 6
a42 1
post-install:
d44 2
a45 10
###	Install documentation

.if !defined(NOPORTDOCS)
	@@${ECHO_MSG} "===>   Installing ${PORTNAME} documentation"
	-@@${MKDIR} ${PREFIX}/share/doc/${PORTNAME}
.for i in ${WRKSRC}/doc/*.txt ${WRKSRC}/doc/*.html ${WRKSRC}/doc/*.gif ${WRKSRC}/doc/README
	@@${INSTALL_DATA} ${WRKSRC}$i ${PREFIX}/share/doc/${PORTNAME}
.endfor
	@@${ECHO_MSG} "       -> Documentation installed in: ${PREFIX}/share/doc/${PORTNAME}"
.endif
d47 1
a47 1
### 	Install blacklist databases
d50 9
a58 24
	@@${ECHO_MSG} "===>   Installing blacklist databases"
	@@${MKDIR} ${DATADIR}
	@@cd ${DATADIR} ; \
	${TAR} fpxz ${WRKSRC}/samples/dest/blacklists.tar.gz ; \
	for f in blacklists/* ; do \
		${MV} $$f ${DATADIR} ; \
	done
	@@if [ -d ${PREFIX}/share/doc/${PORTNAME} ] ; then \
		${MV} -f ${DATADIR}/README \
		${PREFIX}/share/doc/${PORTNAME}/README.blacklists ; \
	else \
		${RM} -f ${DATADIR}/README ; \
	fi
	@@for d in ${DATADIR}/ads ${DATADIR}/agressive ${DATADIR}/drugs \
			${DATADIR}/hacking ${DATADIR}/porn ; do \
		cd $$d ; \
		${RM} -f newdomains.* newurls.* ; \
		${CHOWN} root:nobody * ; \
		${CHMOD} 640 * ; \
		cd ${DATADIR} ; \
	done
	@@${RM} -rf ${DATADIR}/blacklists*
	@@${CHOWN} root:nobody ${DATADIR}/* ${DATADIR}
	@@${CHMOD} 750 ${DATADIR}/* ${DATADIR}
d64 1
a64 1
###	Install sample configuration file
d66 1
a66 1
	@@if [ ! -f ${PREFIX}/etc/squid/squidguard.conf ] ; then \
d68 16
a83 5
		${SED} -e 's!%%DATADIR%%!${DATADIR}!' -e 's!%%LOGDIR%%!${LOGDIR}!' \
			${WRKSRC}/samples/sample.conf > \
			${PREFIX}/etc/squid/squidguard.conf.sample ; \
		${CHOWN} root:nobody ${PREFIX}/etc/squid/squidguard.conf.sample ; \
		${CHMOD} 640 ${PREFIX}/etc/squid/squidguard.conf.sample ; \
d89 31
d122 1
d127 1
@


1.3
log
@Use proper POSIX syntax for `chown'.
@
text
@d5 1
a5 1
# $FreeBSD: ports/www/squidguard/Makefile,v 1.2 2001/01/16 17:33:05 sobomax Exp $
d17 1
a17 1
RUN_DEPENDS=	${LOCALBASE}/sbin/squid:${PORTSDIR}/www/squid23
@


1.2
log
@Massive style enforcement - use ^I instead of spaces for variables identation.
@
text
@d5 1
a5 1
# $FreeBSD: ports/www/squidguard/Makefile,v 1.1 2000/07/10 03:58:34 steve Exp $
d76 1
a76 1
		${CHOWN} root.nobody * ; \
d81 1
a81 1
	@@${CHOWN} root.nobody ${DATADIR}/* ${DATADIR}
d95 1
a95 1
		${CHOWN} root.nobody ${PREFIX}/etc/squid/squidguard.conf.sample ; \
@


1.1
log
@Adding squidguard version 1.1.4.
A fast redirector for squid.

PR:		19210
Submitted by:	Dan Larsson <dl@@tyfon.net>
@
text
@d5 1
a5 1
# $FreeBSD$
d8 4
a11 4
PORTNAME=      	squidGuard
PORTVERSION=   	1.1.4
CATEGORIES=    	www
MASTER_SITES=  	http://ftp.ost.eltele.no/pub/www/proxy/squidGuard/ \
d16 2
a17 2
BUILD_DEPENDS= 	${LOCALBASE}/lib/libdb2.a:${PORTSDIR}/databases/db
RUN_DEPENDS=    ${LOCALBASE}/sbin/squid:${PORTSDIR}/www/squid23
@

