View | Details | Raw Unified | Return to bug 136628
Collapse All | Expand All

(-)squidguard/Makefile (-5 / +31 lines)
Lines 7-12 Link Here
7
7
8
PORTNAME=	squidGuard
8
PORTNAME=	squidGuard
9
PORTVERSION=	1.4
9
PORTVERSION=	1.4
10
PORTREVISION=	1
10
CATEGORIES=	www
11
CATEGORIES=	www
11
MASTER_SITES=	http://www.squidguard.org/Downloads/
12
MASTER_SITES=	http://www.squidguard.org/Downloads/
12
13
Lines 24-51 Link Here
24
		--with-sg-logdir=${LOGDIR} \
25
		--with-sg-logdir=${LOGDIR} \
25
		--exec-prefix=${PREFIX}
26
		--exec-prefix=${PREFIX}
26
27
28
CONFIGURE_ENV=	CFLAGS="${CFLAGS} -I${PREFIX}/include"
29
27
CFGINPUT=	${.CURDIR}/files/sgcfg.in
30
CFGINPUT=	${.CURDIR}/files/sgcfg.in
28
31
29
SQUID_UID?=	squid
32
SQUID_UID?=	squid
30
SQUID_GID?=	squid
33
SQUID_GID?=	squid
31
34
32
DATADIR?=	/var/db/${PORTNAME}
35
DATADIR?=	/var/db/${PORTNAME}
36
SAMPLE_BL_DIR=	${DATADIR}.sample
37
PLIST_SUB+=	SAMPLE_BL_DIR=${SAMPLE_BL_DIR}
33
_DATADIR=	${WRKDIR}/data
38
_DATADIR=	${WRKDIR}/data
34
LOGDIR?=	/var/log
39
LOGDIR?=	/var/log
35
40
36
SUB_FILES=	pkg-message
41
SUB_FILES=	pkg-message pkg-deinstall
37
SUB_LIST=	PORTNAME=${PORTNAME}
42
SUB_LIST=	PORTNAME=${PORTNAME} \
43
		SAMPLE_BL_DIR=${SAMPLE_BL_DIR}
38
PKGMESSAGE=	${WRKDIR}/pkg-message
44
PKGMESSAGE=	${WRKDIR}/pkg-message
39
45
46
OPTIONS=	SAMPLE_BL	"Install sample blacklists" On \
47
		LDAP		"Enable LDAP support" Off
48
40
.include <bsd.port.pre.mk>
49
.include <bsd.port.pre.mk>
41
50
51
.if defined(WITH_LDAP)
52
CONFIGURE_ARGS+=	--with-ldap
53
USE_OPENLDAP=		yes
54
.else
55
CONFIGURE_ARGS+=	--without-ldap
56
.endif
57
58
.if defined(WITHOUT_SAMPLE_BL)
59
INSTALL_BL=	no
60
PLIST_SUB+=	BLACKLIST="@comment "
61
.else
42
.if !exists(${DATADIR})
62
.if !exists(${DATADIR})
43
PLIST_SUB+=	BLACKLIST=""
44
INSTALL_BL=	yes
63
INSTALL_BL=	yes
45
.else
64
.else
46
PLIST_SUB+=	BLACKLIST="@comment "
47
INSTALL_BL=	no
65
INSTALL_BL=	no
48
.endif
66
.endif
67
PLIST_SUB+=	BLACKLIST=""
68
.endif
49
69
50
pre-fetch:
70
pre-fetch:
51
	@if [ ${SQUID_UID} = "squid" -o ${SQUID_GID} = "squid" ] ; then \
71
	@if [ ${SQUID_UID} = "squid" -o ${SQUID_GID} = "squid" ] ; then \
Lines 63-69 Link Here
63
	fi
83
	fi
64
84
65
post-build:
85
post-build:
66
.if ${INSTALL_BL} == "yes"
86
.if !defined(WITHOUT_SAMPLE_BL)
67
	@${ECHO_MSG} "===>   Building blacklists"
87
	@${ECHO_MSG} "===>   Building blacklists"
68
	${MKDIR} ${_DATADIR}
88
	${MKDIR} ${_DATADIR}
69
	@${TAR} -C ${_DATADIR} --exclude *.diff -pxzf \
89
	@${TAR} -C ${_DATADIR} --exclude *.diff -pxzf \
Lines 77-82 Link Here
77
#
97
#
78
# Install blacklists
98
# Install blacklists
79
#
99
#
100
.if !defined(WITHOUT_SAMPLE_BL)
101
	@${MKDIR} ${SAMPLE_BL_DIR}
102
	@${CP} -Rpf ${_DATADIR}/* ${SAMPLE_BL_DIR}
103
	@${CHOWN} -R ${SQUID_UID}:${SQUID_GID} ${SAMPLE_BL_DIR}
104
	${CHMOD} -R 550 ${SAMPLE_BL_DIR}
105
.endif
80
.if ${INSTALL_BL} == "yes"
106
.if ${INSTALL_BL} == "yes"
81
	@${ECHO_MSG} "===>   Installing blacklists"
107
	@${ECHO_MSG} "===>   Installing blacklists"
82
	@${MKDIR} ${DATADIR}
108
	@${MKDIR} ${DATADIR}
(-)squidguard/files/pkg-deinstall.in (+11 lines)
Line 0 Link Here
1
#!/bin/sh
2
# $FreeBSD$
3
4
if [ "$2" != "POST-DEINSTALL" ]; then
5
    exit 0
6
fi
7
8
echo "If you are completely removing squidguard you may want to also"
9
echo "manually delete the blacklists in %%DATADIR%%"
10
11
exit 0
(-)squidguard/files/pkg-message.in (+3 lines)
Lines 3-7 Link Here
3
= To the contain "url_rewrite_program %%PREFIX%%/bin/%%PORTNAME%%"
3
= To the contain "url_rewrite_program %%PREFIX%%/bin/%%PORTNAME%%"
4
= and create a configuration file for %%PORTNAME%%.
4
= and create a configuration file for %%PORTNAME%%.
5
=
5
=
6
= On disinstallation if you want to completely remove the blacklists
7
= you will have to manually remove what remains in %%DATADIR%%.
8
= 
6
= To activate the changes do a %%PREFIX%%/sbin/squid -k reconfigure
9
= To activate the changes do a %%PREFIX%%/sbin/squid -k reconfigure
7
===================================================================
10
===================================================================
(-)squidguard/pkg-plist (-23 / +3 lines)
Lines 32-82 Link Here
32
%%PORTDOCS%%%%DOCSDIR%%/squidGuard.gif
32
%%PORTDOCS%%%%DOCSDIR%%/squidGuard.gif
33
%%PORTDOCS%%%%DOCSDIR%%/README.blacklists
33
%%PORTDOCS%%%%DOCSDIR%%/README.blacklists
34
%%PORTDOCS%%@dirrm %%DOCSDIR%%
34
%%PORTDOCS%%@dirrm %%DOCSDIR%%
35
%%BLACKLIST%%@cwd %%DATADIR%%
35
%%BLACKLIST%%@cwd %%SAMPLE_BL_DIR%%
36
%%BLACKLIST%%ads/domains
36
%%BLACKLIST%%ads/domains
37
%%BLACKLIST%%ads/domains.db
38
%%BLACKLIST%%ads/urls
37
%%BLACKLIST%%ads/urls
39
%%BLACKLIST%%ads/urls.db
40
%%BLACKLIST%%aggressive/domains
38
%%BLACKLIST%%aggressive/domains
41
%%BLACKLIST%%aggressive/domains.db
42
%%BLACKLIST%%aggressive/urls
39
%%BLACKLIST%%aggressive/urls
43
%%BLACKLIST%%aggressive/urls.db
44
%%BLACKLIST%%audio-video/domains
40
%%BLACKLIST%%audio-video/domains
45
%%BLACKLIST%%audio-video/domains.db
46
%%BLACKLIST%%audio-video/urls
41
%%BLACKLIST%%audio-video/urls
47
%%BLACKLIST%%audio-video/urls.db
48
%%BLACKLIST%%drugs/domains
42
%%BLACKLIST%%drugs/domains
49
%%BLACKLIST%%drugs/domains.db
50
%%BLACKLIST%%drugs/urls
43
%%BLACKLIST%%drugs/urls
51
%%BLACKLIST%%drugs/urls.db
52
%%BLACKLIST%%gambling/domains
44
%%BLACKLIST%%gambling/domains
53
%%BLACKLIST%%gambling/domains.db
54
%%BLACKLIST%%gambling/urls
45
%%BLACKLIST%%gambling/urls
55
%%BLACKLIST%%gambling/urls.db
56
%%BLACKLIST%%hacking/domains
46
%%BLACKLIST%%hacking/domains
57
%%BLACKLIST%%hacking/domains.db
58
%%BLACKLIST%%hacking/urls
47
%%BLACKLIST%%hacking/urls
59
%%BLACKLIST%%hacking/urls.db
60
%%BLACKLIST%%mail/domains
48
%%BLACKLIST%%mail/domains
61
%%BLACKLIST%%mail/domains.db
62
%%BLACKLIST%%porn/domains
49
%%BLACKLIST%%porn/domains
63
%%BLACKLIST%%porn/domains.db
64
%%BLACKLIST%%porn/urls
50
%%BLACKLIST%%porn/urls
65
%%BLACKLIST%%porn/urls.db
66
%%BLACKLIST%%porn/expressions
51
%%BLACKLIST%%porn/expressions
67
%%BLACKLIST%%proxy/domains
52
%%BLACKLIST%%proxy/domains
68
%%BLACKLIST%%proxy/domains.db
69
%%BLACKLIST%%proxy/urls
53
%%BLACKLIST%%proxy/urls
70
%%BLACKLIST%%proxy/urls.db
71
%%BLACKLIST%%violence/domains
54
%%BLACKLIST%%violence/domains
72
%%BLACKLIST%%violence/domains.db
73
%%BLACKLIST%%violence/urls
55
%%BLACKLIST%%violence/urls
74
%%BLACKLIST%%violence/urls.db
75
%%BLACKLIST%%violence/expressions
56
%%BLACKLIST%%violence/expressions
76
%%BLACKLIST%%warez/domains
57
%%BLACKLIST%%warez/domains
77
%%BLACKLIST%%warez/domains.db
78
%%BLACKLIST%%warez/urls
58
%%BLACKLIST%%warez/urls
79
%%BLACKLIST%%warez/urls.db
80
%%BLACKLIST%%@dirrm ads
59
%%BLACKLIST%%@dirrm ads
81
%%BLACKLIST%%@dirrm aggressive
60
%%BLACKLIST%%@dirrm aggressive
82
%%BLACKLIST%%@dirrm audio-video
61
%%BLACKLIST%%@dirrm audio-video
Lines 89-92 Link Here
89
%%BLACKLIST%%@dirrm violence
68
%%BLACKLIST%%@dirrm violence
90
%%BLACKLIST%%@dirrm warez
69
%%BLACKLIST%%@dirrm warez
91
%%BLACKLIST%%@cwd /
70
%%BLACKLIST%%@cwd /
92
%%BLACKLIST%%@dirrm %%DATADIR%%
71
%%BLACKLIST%%@dirrm %%SAMPLE_BL_DIR%%
72
%%BLACKLIST%%@dirrmtry %%DATADIR%%

Return to bug 136628