aboutsummaryrefslogtreecommitdiffstats
path: root/www
diff options
context:
space:
mode:
authormadpilot <madpilot@FreeBSD.org>2014-08-21 08:25:29 +0800
committermadpilot <madpilot@FreeBSD.org>2014-08-21 08:25:29 +0800
commit318f603209f171a40ae32e90891cf7a358da500d (patch)
treedcecce89b98c1828db7358307ac48302620c849a /www
parent5b2ba42e74492e73af5a324ba43b47e59437c7e0 (diff)
downloadfreebsd-ports-gnome-318f603209f171a40ae32e90891cf7a358da500d.tar.gz
freebsd-ports-gnome-318f603209f171a40ae32e90891cf7a358da500d.tar.zst
freebsd-ports-gnome-318f603209f171a40ae32e90891cf7a358da500d.zip
- Depend on squid33 unconditionally, this is the only squid port
which isn't being deprecated. [1] - Depend on any BDB version in the ports tree [1] - Make packaging as a user possible and fix plist accordingly Reported by: marino@ [1]
Diffstat (limited to 'www')
-rw-r--r--www/squidguard/Makefile17
-rw-r--r--www/squidguard/files/patch-Makefile.in8
-rw-r--r--www/squidguard/pkg-plist24
3 files changed, 21 insertions, 28 deletions
diff --git a/www/squidguard/Makefile b/www/squidguard/Makefile
index 603739155aae..93886007f093 100644
--- a/www/squidguard/Makefile
+++ b/www/squidguard/Makefile
@@ -2,7 +2,7 @@
PORTNAME= squidGuard
PORTVERSION= 1.4
-PORTREVISION= 10
+PORTREVISION= 11
CATEGORIES= www
MASTER_SITES= http://www.squidguard.org/Downloads/:a \
http://www.squidguard.org/Downloads/Contrib/:b
@@ -17,7 +17,9 @@ COMMENT= Fast redirector for squid
LICENSE= GPLv2
LICENSE_FILE= ${WRKSRC}/COPYING
-USE_BDB= 40+
+RUN_DEPENDS= ${LOCALBASE}/sbin/squid:${PORTSDIR}/www/squid33
+
+USE_BDB= yes
GNU_CONFIGURE= yes
CONFIGURE_ARGS= --with-db-inc=${BDB_INCLUDE_DIR} \
--with-db-lib=${BDB_LIB_DIR} \
@@ -42,19 +44,12 @@ SUB_FILES= pkg-deinstall pkg-message
SUB_LIST= PORTNAME=${PORTNAME}
OPTIONS_DEFINE= DNS_BL DOCS EXAMPLES LDAP QUOTE_STRING
-OPTIONS_SINGLE= SV
-OPTIONS_SINGLE_SV= SQUID32 SQUID33
-OPTIONS_DEFAULT= SQUID33
EXAMPLES_DESC= Install sample blacklists
DNS_BL_DESC= Enable DNS based blacklists
QUOTE_STRING_DESC= Add quoted string patch
-SQUID32_DESC= Depend on Squid 3.2.x
-SQUID33_DESC= Depend on Squid 3.3.x
OPTIONS_SUB= yes
-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
@@ -100,8 +95,6 @@ pre-install:
@${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"
@@ -118,7 +111,5 @@ post-install:
@${INSTALL_DATA} ${WRKSRC}$i ${STAGEDIR}${DOCSDIR}
. endfor
@${ECHO_MSG} " -> Documentation installed in: ${DOCSDIR}"
- @${MKDIR} ${STAGEDIR}${LOGDIR}
- @${CHOWN} -R ${SQUID_UID}:${SQUID_GID} ${STAGEDIR}${LOGDIR}
.include <bsd.port.mk>
diff --git a/www/squidguard/files/patch-Makefile.in b/www/squidguard/files/patch-Makefile.in
index ebcb71492ff9..b2ba416cb439 100644
--- a/www/squidguard/files/patch-Makefile.in
+++ b/www/squidguard/files/patch-Makefile.in
@@ -1,6 +1,6 @@
--- Makefile.in.orig 2008-05-17 20:36:44.000000000 +0200
-+++ Makefile.in 2013-09-24 12:55:55.029854067 +0200
-@@ -47,48 +47,33 @@
++++ Makefile.in 2014-08-21 00:04:09.188333006 +0200
+@@ -47,48 +47,31 @@
install-conf:
@echo Installing configuration file ;
@@ -18,7 +18,6 @@
+ @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 \
@@ -28,7 +27,6 @@
- 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 \
@@ -60,7 +58,7 @@
+ $(MKINSTALLDIRS) $(DESTDIR)$(bindir) ; \
fi ; \
- cp src/squidGuard $(bindir) || exit 1 ; \
-+ cp src/squidGuard $(DESTDIR)$(bindir) || exit 1 ; \
++ $(BSD_INSTALL_PROGRAM) src/squidGuard $(DESTDIR)$(bindir) || exit 1 ; \
echo Done. ;
clean::
diff --git a/www/squidguard/pkg-plist b/www/squidguard/pkg-plist
index 94736a84afd5..316fec6482a5 100644
--- a/www/squidguard/pkg-plist
+++ b/www/squidguard/pkg-plist
@@ -1,7 +1,5 @@
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
+@sample etc/squid/squidGuard.conf.sample
%%PORTDOCS%%%%DOCSDIR%%/LDAPFlow.txt
%%PORTDOCS%%%%DOCSDIR%%/README
%%PORTDOCS%%%%DOCSDIR%%/authentication.html
@@ -33,6 +31,9 @@ etc/squid/squidGuard.conf.sample
%%PORTDOCS%%%%DOCSDIR%%/troubleshoot.txt
%%PORTDOCS%%%%DOCSDIR%%/squidGuard.gif
%%PORTDOCS%%@dirrm %%DOCSDIR%%
+@owner %%SQUID_UID%%
+@group %%SQUID_GID%%
+@mode 550
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/blacklists/ads/domains
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/blacklists/ads/urls
%%PORTEXAMPLES%%@dirrm %%EXAMPLESDIR%%/blacklists/ads
@@ -70,10 +71,13 @@ etc/squid/squidGuard.conf.sample
%%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%%
-@unexec rmdir %%DATADIR%% 2>/dev/null || true
-@unexec rmdir %%LOGDIR%% 2>/dev/null || true
+@mode
+@owner
+@group
+@cwd /
+@exec mkdir -p %%LOGDIR%%
+@exec chown -R %%SQUID_UID%%:%%SQUID_GID%% %%LOGDIR%%
+@dirrmtry %%LOGDIR%%
+@exec mkdir -p %%DATADIR%%
+@exec chown -R %%SQUID_UID%%:%%SQUID_GID%% %%DATADIR%%
+@dirrmtry %%DATADIR%%