summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /net-proxy/ufdbguard
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'net-proxy/ufdbguard')
-rw-r--r--net-proxy/ufdbguard/Manifest4
-rw-r--r--net-proxy/ufdbguard/files/ufdb.confd21
-rw-r--r--net-proxy/ufdbguard/files/ufdb.initd83
-rw-r--r--net-proxy/ufdbguard/files/ufdb.initd.268
-rw-r--r--net-proxy/ufdbguard/files/ufdbUpdate.cron14
-rw-r--r--net-proxy/ufdbguard/files/ufdbguard-1.23-parallel-make.patch133
-rw-r--r--net-proxy/ufdbguard/files/ufdbguard-1.24-gentoo.patch13
-rw-r--r--net-proxy/ufdbguard/files/ufdbguard-1.29-parallel-make.patch132
-rw-r--r--net-proxy/ufdbguard/metadata.xml25
-rw-r--r--net-proxy/ufdbguard/ufdbguard-1.24-r1.ebuild132
-rw-r--r--net-proxy/ufdbguard/ufdbguard-1.29.ebuild136
11 files changed, 761 insertions, 0 deletions
diff --git a/net-proxy/ufdbguard/Manifest b/net-proxy/ufdbguard/Manifest
new file mode 100644
index 000000000000..45c80c87e20d
--- /dev/null
+++ b/net-proxy/ufdbguard/Manifest
@@ -0,0 +1,4 @@
+DIST ufdbGuard-1.24.tar.gz 747635 SHA256 6e5df4ef7f5d13d1ad2a0902449c9909cc013242f3783925800df5011bd3446c
+DIST ufdbGuard-1.29.tar.gz 948006 SHA256 f97a683fba5e1867b9bde16d0ec118651b93ae419037d3fad0144c95add8bed6 SHA512 06e286508eba8081aecaa31021f18385f163f87edae90a4b399e0f3ca0d06165f5ac11baa5b615bdaaf9bbc03c107c69103f05761904fc06a0715c8f44abdc58 WHIRLPOOL 84d43ba2b5108acb9fc4ac0013d27c7f47dbb9ad6b7b6277853278b32a9040e0865e897b8bf5a3963216d3303506f90fe0844d9f5b49614154087eb0339f300d
+DIST ufdbguard-1.24-manual.pdf 491034 SHA256 7185161d912202510ec1767fc0239f48c2a98f948afb3a207ea55c341e03e459
+DIST ufdbguard-1.29-manual.pdf 513184 SHA256 00b75668ca82037c9be6eab3a83755189890b2a3bb239409db765195f26c2f8b SHA512 9b321202a60428e7962087b19b7e0b72241fdb99d5068e68dceadf3087b85d56e11c80e3a410b101aae35f9f5f179ee0e13053024c29ff0868c39ed645edcbb2 WHIRLPOOL cd1573102abe6b4d359520930491b6a2fbef0601bcdccaaf78adf79bbf570c48bbfa1f0bb5e5e0b9ab9360cc9ca41643e2cbed2140414603bdca7bca32bbecf9
diff --git a/net-proxy/ufdbguard/files/ufdb.confd b/net-proxy/ufdbguard/files/ufdb.confd
new file mode 100644
index 000000000000..76f4648948b5
--- /dev/null
+++ b/net-proxy/ufdbguard/files/ufdb.confd
@@ -0,0 +1,21 @@
+# -*- sh -*-
+# $Id$
+
+# Tables to re-generate when starting or reloading ufdbguard
+UFDB_GT="alwaysallow alwaysdeny"
+
+# Options passed to ufdbGenTable when generating the tables listed in
+# UFDB_GT
+GENTABLE_OPTIONS="-W"
+
+# User under which to run ufdbguard; it should be the same as the
+# proxy server you're using, so by default it is squid.
+UFDB_USER="squid"
+
+# Options to pass to ufdbguardd; see /usr/libexec/ufdbguard/ufdbguardd
+# -h for a brief list.
+UFDB_OPTS=""
+
+# Options used by the modified ufdbUpdate script in Gentoo
+DOWNLOAD_USER=""
+DOWNLOAD_PASSWORD=""
diff --git a/net-proxy/ufdbguard/files/ufdb.initd b/net-proxy/ufdbguard/files/ufdb.initd
new file mode 100644
index 000000000000..88da66136aab
--- /dev/null
+++ b/net-proxy/ufdbguard/files/ufdb.initd
@@ -0,0 +1,83 @@
+#!/sbin/runscript
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+# reconfig is what the upstream documentation suggests, so let's
+# provide it for compatibility.
+extra_started_commands="reload reconfig"
+
+depend() {
+ need net
+ before squid
+ use logger
+}
+
+get_config() {
+ awk '$1 == "'$1'" { print $2 }' "/etc/ufdbGuard.conf"
+}
+
+gentables() {
+ local dbhome=$(get_config dbhome)
+
+ for gt in ${UFDB_GT} ; do
+ [ -f "${dbhome}/${gt}/domains" ] || continue
+
+ urls=
+ [ -f "${dbhome}/${gt}/urls" ] && urls="${dbhome}/${gt}/urls"
+
+ ebegin "Generating domainlist ${gt}"
+ ufdbGenTable ${GENTABLE_OPTIONS} -t "${gt}" -d "${dbhome}/${gt}/domains" ${urls:+-u "${urls}"}
+ eend $?
+ done
+}
+
+start() {
+ gentables
+
+ local logdir=$(get_config logdir)
+
+ if [ ! -d "${logdir}" ] ; then
+ mkdir -p ${logdir}
+ chown -R ${UFDB_USER} ${logdir}
+ fi
+
+ if [ ! -d /var/run/ufdbguardd ] ; then
+ mkdir -p /var/run/ufdbguard
+ chown -R ${UFDB_USER} /var/run/ufdbguard
+ fi
+
+ ebegin "Starting ufdbGuard"
+ start-stop-daemon --start \
+ --user ${UFDB_USER} \
+ --wait 1500 \
+ --exec /usr/libexec/ufdbguard/ufdbguardd \
+ --pidfile /var/run/ufdbguard/ufdbguardd.pid -- \
+ -c /etc/ufdbGuard.conf ${UFDB_OPTS}
+ eend $? "Failed to start ufdbGuard"
+}
+
+stop() {
+ ebegin "Stopping ufdbGuard"
+ start-stop-daemon --stop \
+ --exec /usr/libexec/ufdbguard/ufdbguardd \
+ --pidfile /var/run/ufdbguard/ufdbguardd.pid
+ eend $? "Failed to stop ufdbGuard"
+}
+
+reload() {
+ if ! [ -f /var/run/ufdbguard/ufdbguardd.pid ]; then
+ eerror "Unable to find PID file for ufdbguardd, was it just started?"
+ return 1
+ fi
+
+ gentables
+
+ ebegin "Reloading ufdbGuard"
+ kill -HUP "$(cat /var/run/ufdbguard/ufdbguardd.pid)"
+ eend $? "Failed to reload ufdbGuard"
+}
+
+reconfig() {
+ reload
+}
diff --git a/net-proxy/ufdbguard/files/ufdb.initd.2 b/net-proxy/ufdbguard/files/ufdb.initd.2
new file mode 100644
index 000000000000..35bb8cd3d52f
--- /dev/null
+++ b/net-proxy/ufdbguard/files/ufdb.initd.2
@@ -0,0 +1,68 @@
+#!/sbin/runscript
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+# reconfig is what the upstream documentation suggests, so let's
+# provide it for compatibility.
+extra_started_commands="reload reconfig"
+
+: ${configfile:=/etc/ufdbGuard.conf}
+
+pidfile=/var/run/ufdbguard/ufdbguardd.pid
+command=/usr/libexec/ufdbguard/ufdbguardd
+command_arguments="-c ${configfile} ${FUDB_OPTS}"
+
+start_stop_daemon_args="--user ${UFDB_USER} --wait 1500"
+
+name="ufdbGuard Daemon"
+
+depend() {
+ need localmount
+ before squid
+ use logger
+}
+
+get_config() {
+ # Okay this sounds silly, but it is important because the settings
+ # in ufdbGuard are quoted, so this unquotes them.
+ eval echo $(awk '$1 == "'$1'" { print $2 }' "${configfile}")
+}
+
+gentables() {
+ local dbhome=$(get_config dbhome)
+
+ for gt in ${UFDB_GT} ; do
+ [ -f "${dbhome}/${gt}/domains" ] || continue
+
+ urls=
+ [ -f "${dbhome}/${gt}/urls" ] && urls="${dbhome}/${gt}/urls"
+
+ ebegin "Generating domainlist ${gt}"
+ ufdbGenTable ${GENTABLE_OPTIONS} -t "${gt}" -d "${dbhome}/${gt}/domains" ${urls:+-u "${urls}"}
+ eend $?
+ done
+}
+
+start_pre() {
+ gentables
+
+ checkpath -d -m 0755 -o ${UFDB_USER} $(get_config logdir) "$(dirname "${pidfile}")"
+}
+
+reload() {
+ if ! [ -f ${pidfile} ]; then
+ eerror "Unable to find PID file for ufdbguardd, was it just started?"
+ return 1
+ fi
+
+ gentables
+
+ ebegin "Reloading ufdbGuard"
+ kill -HUP "$(cat ${pidfile})"
+ eend $? "Failed to reload ufdbGuard"
+}
+
+reconfig() {
+ reload
+}
diff --git a/net-proxy/ufdbguard/files/ufdbUpdate.cron b/net-proxy/ufdbguard/files/ufdbUpdate.cron
new file mode 100644
index 000000000000..3f12de4ef667
--- /dev/null
+++ b/net-proxy/ufdbguard/files/ufdbUpdate.cron
@@ -0,0 +1,14 @@
+#!/bin/sh
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+# cron.daily file to update the ufdb database
+
+# Avoid doing anything if no download user is set in the configuration
+# file
+( . /etc/conf.d/ufdb ; [ -z "${DOWNLOAD_USER}" ]; ) && exit
+
+/usr/sbin/ufdbUpdate
+
+/etc/init.d/squid rotate
diff --git a/net-proxy/ufdbguard/files/ufdbguard-1.23-parallel-make.patch b/net-proxy/ufdbguard/files/ufdbguard-1.23-parallel-make.patch
new file mode 100644
index 000000000000..3f95f2cbb3fa
--- /dev/null
+++ b/net-proxy/ufdbguard/files/ufdbguard-1.23-parallel-make.patch
@@ -0,0 +1,133 @@
+--- a/src/Makefile.in 2010-04-12 04:39:43.000000000 +0200
+--- b/src/Makefile.in 2010-05-07 05:26:03.000000000 +0200
+@@ -135,8 +135,8 @@
+ # Dependencies for installing
+ #
+
+-daemon:
+- cd mtserver; make
++daemon: $(UFDBOBJS)
++ cd mtserver; $(MAKE)
+
+ ufdbhttpd: ufdbhttpd.o httpserver.o ufdbbase.o ufdblib.o sgLog.o crypt.o
+ $(LINK) ufdbhttpd.o httpserver.o ufdbbase.o ufdblib.o sgLog.o crypt.o $(LIBS)
+@@ -235,7 +235,7 @@
+ $(RM) $(bindir)/ufdbhttpd
+
+ install.mt::
+- cd mtserver ; make
++ cd mtserver ; $(MAKE)
+ $(INSTALL_PROGRAM) mtserver/ufdbguardd $(bindir)/ufdbguardd
+ $(INSTALL_PROGRAM) mtserver/ufdbgclient $(bindir)/ufdbgclient
+
+@@ -272,8 +272,8 @@
+ $(RM) *~ *.bak core core.* *.log *.log.[0-9] *.error
+ $(RM) *.o y.tab.c y.tab.h ufdbGuard ufdbGenTable ufdbAnalyse ufdbPrintTable ufdbhttpd
+ $(RM) ipv6 iptst rwtest lex.yy.c
+- -@cd mtserver && make clean
+- -@cd api 2>/dev/null && make clean
++ -@cd mtserver && $(MAKE) clean
++ -@cd api 2>/dev/null && $(MAKE) clean
+
+ realclean:: clean
+ @echo making $@ in `basename \`pwd\``
+@@ -286,11 +286,11 @@
+ distclean:: realclean
+ @echo making $@ in `basename \`pwd\``
+ $(RM) Makefile sg.h config.h ufdbUpdate ufdbConvertDB ufdbGuard.conf
+- -cd mtserver ; make distclean
++ -cd mtserver ; $(MAKE) distclean
+
+ apidistclean: distclean
+ @echo making $@ in `basename \`pwd\``
+- -cd api ; make distclean
++ -cd api ; $(MAKE) distclean
+
+ grab: ufdbGrab
+ ./ufdbGrab $(cfgdir) $(logdir)
+@@ -532,25 +532,25 @@
+ $(CC) --version
+
+ g2953:
+- make clean
+- CC=/usr/local/gcc/2.95.3/bin/gcc make -e $(MAKEFLAGS) ccversion all ufdbPrintTable
++ $(MAKE) clean
++ CC=/usr/local/gcc/2.95.3/bin/gcc $(MAKE) -e $(MAKEFLAGS) ccversion all ufdbPrintTable
+
+ g344:
+- make clean
+- CC=/usr/local/gcc/3.4.4/bin/gcc make -e $(MAKEFLAGS) ccversion all ufdbPrintTable
++ $(MAKE) clean
++ CC=/usr/local/gcc/3.4.4/bin/gcc $(MAKE) -e $(MAKEFLAGS) ccversion all ufdbPrintTable
+
+ g401:
+- make clean
+- CC=/usr/local/gcc/4.0.1/bin/gcc make -e $(MAKEFLAGS) ccversion all ufdbPrintTable
++ $(MAKE) clean
++ CC=/usr/local/gcc/4.0.1/bin/gcc $(MAKE) -e $(MAKEFLAGS) ccversion all ufdbPrintTable
+
+ g411:
+- make clean
+- CC=/usr/local/gcc/4.1.1/bin/gcc make -e $(MAKEFLAGS) ccversion all ufdbPrintTable
++ $(MAKE) clean
++ CC=/usr/local/gcc/4.1.1/bin/gcc $(MAKE) -e $(MAKEFLAGS) ccversion all ufdbPrintTable
+
+ qinst:
+ /etc/init.d/squid stop
+ /etc/init.d/ufdb stop
+- make install
++ $(MAKE) install
+ /etc/init.d/ufdb start
+ /etc/init.d/squid start
+
+--- a/src/mtserver/Makefile.in 2010-04-12 02:56:20.000000000 +0200
+--- b/src/mtserver/Makefile.in 2010-05-07 05:26:03.000000000 +0200
+@@ -48,10 +48,10 @@
+ $(LINK) ufdbgclient.o -L. -lufdbd $(SOLARIS_LIBS)
+
+ ../lex.yy.o:
+- cd .. ; make lex.yy.o
++ cd .. ; $(MAKE) lex.yy.o
+
+ ../y.tab.o:
+- cd .. ; make y.tab.o
++ cd .. ; $(MAKE) y.tab.o
+
+ $(MYLIB): ../crypt.o ../lex.yy.o ../sgDiv.o ../sgLog.o ../ufdbLookup.o \
+ ../ufdblib.o ../y.tab.o ../ufdbbase.o
+@@ -60,7 +60,7 @@
+ ../ufdblib.o ../y.tab.o ../ufdbbase.o
+
+ ptmalloc3/libptmalloc3.a:
+- cd ptmalloc3 ; make linux-pthread
++ cd ptmalloc3 ; $(MAKE) linux-pthread
+
+ $(MYLIBSSL): ../ufdbchkport.o ../httpsQueue.o ../ufdbHashtable.o
+ -@rm -f $(MYLIBSSL)
+@@ -102,7 +102,7 @@
+ ./ufdbgclient -p $(PORT) -l . -d "www.sex.com" 10.1.1.1 kees
+
+ ../../test/blacklist/domains.ufdb: ../../test/blacklist/domains
+- cd ../../test ; make blacklist/domains.ufdb
++ cd ../../test ; $(MAKE) blacklist/domains.ufdb
+
+ LEAKOPTS= --leak-check=full --show-reachable=yes
+ LEAKOPTS=
+@@ -382,7 +382,7 @@
+ time ./ufdbgclient -p $(PORT) -l . < ../100000 > /dev/null 2>&1
+
+ tt:
+- make tp3
++ $(MAKE) tp3
+ sleep 3
+ kill -HUP `ps -ef | grep ufdbguardd | grep -v grep | head -1 | awk '{ print $$2 }'`
+
+@@ -455,6 +455,6 @@
+
+
+ g411:
+- make clean
+- CC=/usr/local/gcc/4.1.1/bin/gcc make -e $(MAKEFLAGS) all
++ $(MAKE) clean
++ CC=/usr/local/gcc/4.1.1/bin/gcc $(MAKE) -e $(MAKEFLAGS) all
+
diff --git a/net-proxy/ufdbguard/files/ufdbguard-1.24-gentoo.patch b/net-proxy/ufdbguard/files/ufdbguard-1.24-gentoo.patch
new file mode 100644
index 000000000000..63da98175a0e
--- /dev/null
+++ b/net-proxy/ufdbguard/files/ufdbguard-1.24-gentoo.patch
@@ -0,0 +1,13 @@
+Index: ufdbGuard-1.24/src/ufdbUpdate.in
+===================================================================
+--- ufdbGuard-1.24.orig/src/ufdbUpdate.in
++++ ufdbGuard-1.24/src/ufdbUpdate.in
+@@ -39,6 +39,8 @@ WGET_COMMAND="@WGET@"
+ NOTIFY_UFDBGUARDD="yes" # send HUP signal to ufdbguardd
+ SYSLOG_FACILITY="local6" # errors/warnings in system log have this facility name
+
++source /etc/conf.d/ufdb
++
+ # end of user settings.
+ # DO NOT EDIT ANYTHING BELOW THIS LINE. ########################################
+
diff --git a/net-proxy/ufdbguard/files/ufdbguard-1.29-parallel-make.patch b/net-proxy/ufdbguard/files/ufdbguard-1.29-parallel-make.patch
new file mode 100644
index 000000000000..61ef58030dab
--- /dev/null
+++ b/net-proxy/ufdbguard/files/ufdbguard-1.29-parallel-make.patch
@@ -0,0 +1,132 @@
+--- a/src/Makefile.in 2010-04-12 04:39:43.000000000 +0200
+--- b/src/Makefile.in 2010-05-07 05:26:03.000000000 +0200
+@@ -135,8 +135,8 @@
+ # Dependencies for installing
+ #
+
+-daemon:
+- cd mtserver; make
++daemon: $(UFDBOBJS)
++ cd mtserver; $(MAKE)
+
+ ufdbhttpd: ufdbhttpd.o httpserver.o ufdbbase.o ufdblib.o sgLog.o crypt.o
+ $(LINK) ufdbhttpd.o httpserver.o ufdbbase.o ufdblib.o sgLog.o crypt.o $(LIBS)
+@@ -235,6 +235,6 @@
+ $(RM) $(bindir)/ufdbhttpd
+
+ install.mt::
+- cd mtserver ; make
++ cd mtserver ; $(MAKE)
+ $(INSTALL_PROGRAM) mtserver/ufdbguardd $(bindir)/ufdbguardd
+ $(INSTALL_PROGRAM) mtserver/ufdbgclient $(bindir)/ufdbgclient
+@@ -272,8 +272,8 @@
+ $(RM) *~ *.bak core core.* *.log *.log.[0-9] *.error
+ $(RM) *.o y.tab.c y.tab.h ufdbGuard ufdbGenTable ufdbAnalyse ufdbPrintTable ufdbhttpd
+ $(RM) ipv6 iptst rwtest lex.yy.c
+- -@cd mtserver && make clean
+- -@cd api 2>/dev/null && make clean
++ -@cd mtserver && $(MAKE) clean
++ -@cd api 2>/dev/null && $(MAKE) clean
+
+ realclean:: clean
+ @echo making $@ in `basename \`pwd\``
+@@ -286,11 +286,11 @@
+ distclean:: realclean
+ @echo making $@ in `basename \`pwd\``
+ $(RM) Makefile sg.h config.h ufdbUpdate ufdbConvertDB ufdbGuard.conf
+- -cd mtserver ; make distclean
++ -cd mtserver ; $(MAKE) distclean
+
+ apidistclean: distclean
+ @echo making $@ in `basename \`pwd\``
+- -cd api ; make distclean
++ -cd api ; $(MAKE) distclean
+
+ grab: ufdbGrab
+ ./ufdbGrab $(cfgdir) $(logdir)
+@@ -532,25 +532,25 @@
+ $(CC) --version
+
+ g2953:
+- make clean
+- CC=/usr/local/gcc/2.95.3/bin/gcc make -e $(MAKEFLAGS) ccversion all ufdbPrintTable
++ $(MAKE) clean
++ CC=/usr/local/gcc/2.95.3/bin/gcc $(MAKE) -e $(MAKEFLAGS) ccversion all ufdbPrintTable
+
+ g344:
+- make clean
+- CC=/usr/local/gcc/3.4.4/bin/gcc make -e $(MAKEFLAGS) ccversion all ufdbPrintTable
++ $(MAKE) clean
++ CC=/usr/local/gcc/3.4.4/bin/gcc $(MAKE) -e $(MAKEFLAGS) ccversion all ufdbPrintTable
+
+ g401:
+- make clean
+- CC=/usr/local/gcc/4.0.1/bin/gcc make -e $(MAKEFLAGS) ccversion all ufdbPrintTable
++ $(MAKE) clean
++ CC=/usr/local/gcc/4.0.1/bin/gcc $(MAKE) -e $(MAKEFLAGS) ccversion all ufdbPrintTable
+
+ g411:
+- make clean
+- CC=/usr/local/gcc/4.1.1/bin/gcc make -e $(MAKEFLAGS) ccversion all ufdbPrintTable
++ $(MAKE) clean
++ CC=/usr/local/gcc/4.1.1/bin/gcc $(MAKE) -e $(MAKEFLAGS) ccversion all ufdbPrintTable
+
+ qinst:
+ /etc/init.d/squid stop
+ /etc/init.d/ufdb stop
+- make install
++ $(MAKE) install
+ /etc/init.d/ufdb start
+ /etc/init.d/squid start
+
+--- a/src/mtserver/Makefile.in 2010-04-12 02:56:20.000000000 +0200
+--- b/src/mtserver/Makefile.in 2010-05-07 05:26:03.000000000 +0200
+@@ -48,10 +48,10 @@
+ $(LINK) ufdbgclient.o -L. -lufdbd $(SOLARIS_LIBS)
+
+ ../lex.yy.o:
+- cd .. ; make lex.yy.o
++ cd .. ; $(MAKE) lex.yy.o
+
+ ../y.tab.o:
+- cd .. ; make y.tab.o
++ cd .. ; $(MAKE) y.tab.o
+
+ $(MYLIB): ../crypt.o ../lex.yy.o ../sgDiv.o ../sgLog.o ../ufdbLookup.o \
+ ../ufdblib.o ../y.tab.o ../ufdbbase.o
+@@ -60,7 +60,7 @@
+ ../ufdblib.o ../y.tab.o ../ufdbbase.o
+
+ ptmalloc3/libptmalloc3.a:
+- cd ptmalloc3 ; make linux-pthread
++ cd ptmalloc3 ; $(MAKE) linux-pthread
+
+ $(MYLIBSSL): ../ufdbchkport.o ../httpsQueue.o ../ufdbHashtable.o
+ -@rm -f $(MYLIBSSL)
+@@ -102,7 +102,7 @@
+ ./ufdbgclient -p $(PORT) -l . -d "www.sex.com" 10.1.1.1 kees
+
+ ../../test/blacklist/domains.ufdb: ../../test/blacklist/domains
+- cd ../../test ; make blacklist/domains.ufdb
++ cd ../../test ; $(MAKE) blacklist/domains.ufdb
+
+ LEAKOPTS= --leak-check=full --show-reachable=yes
+ LEAKOPTS=
+@@ -382,7 +382,7 @@
+ time ./ufdbgclient -p $(PORT) -l . < ../100000 > /dev/null 2>&1
+
+ tt:
+- make tp3
++ $(MAKE) tp3
+ sleep 3
+ kill -HUP `ps -ef | grep ufdbguardd | grep -v grep | head -1 | awk '{ print $$2 }'`
+
+@@ -455,6 +455,6 @@
+
+
+ g411:
+- make clean
+- CC=/usr/local/gcc/4.1.1/bin/gcc make -e $(MAKEFLAGS) all
++ $(MAKE) clean
++ CC=/usr/local/gcc/4.1.1/bin/gcc $(MAKE) -e $(MAKEFLAGS) all
+
diff --git a/net-proxy/ufdbguard/metadata.xml b/net-proxy/ufdbguard/metadata.xml
new file mode 100644
index 000000000000..b560f890b75d
--- /dev/null
+++ b/net-proxy/ufdbguard/metadata.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>flameeyes@gentoo.org</email>
+ </maintainer>
+ <longdescription>
+ The fastest URL filter with 25,000 URL verifications/sec to filter
+ unwanted web content. ufdbGuard is a redirector for the Squid
+ internet proxy.
+ </longdescription>
+ <use>
+ <flag name="httpd">
+ Build, install and start the provided mini-http daemon with the
+ redirect CGI integrated. Since there is no way to tell ufdbguard
+ to not start it, this is a build-time option.
+ </flag>
+ <flag name="doc">
+ Download and install the ufdbguard reference manual in PDF.
+ </flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">ufdbguard</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-proxy/ufdbguard/ufdbguard-1.24-r1.ebuild b/net-proxy/ufdbguard/ufdbguard-1.24-r1.ebuild
new file mode 100644
index 000000000000..483d900f449b
--- /dev/null
+++ b/net-proxy/ufdbguard/ufdbguard-1.24-r1.ebuild
@@ -0,0 +1,132 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="2"
+
+inherit eutils user
+
+MY_P="ufdbGuard-${PV}"
+
+DESCRIPTION="ufdbGuard is a redirector for the Squid internet proxy"
+HOMEPAGE="http://www.urlfilterdb.com/en/products/ufdbguard.html"
+SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.gz
+ doc? ( mirror://sourceforge/${PN}/ReferenceManual_v${PV/\./_}.pdf -> ${P}-manual.pdf )"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 x86"
+IUSE="+httpd doc"
+
+RDEPEND="dev-libs/openssl
+ app-arch/bzip2
+ net-misc/wget"
+
+DEPEND="${RDEPEND}
+ sys-devel/bison
+ sys-devel/flex"
+
+RDEPEND="${RDEPEND}
+ sys-apps/openrc"
+
+S="${WORKDIR}/${MY_P}"
+
+pkg_setup() {
+ enewgroup squid
+ enewuser squid -1 -1 /var/cache/squid squid
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-1.23-parallel-make.patch
+ epatch "${FILESDIR}"/${P}-gentoo.patch
+
+ egrep -r -e '/var/tmp/ufdb(guard|http)d.pid' "${S}" -lZ | xargs -0 \
+ sed -i -e 's:/var/tmp/ufdb\(guard\|http\)d.pid:/var/run/ufdbguard/ufdb\1d.pid:' \
+ || die
+
+ # directory where ufdbhttpd is to be found
+ sed -i -e 's:DEFAULT_BINDIR.*:DEFAULT_BINDIR "/usr/libexec/ufdbguard":' \
+ src/ufdb.h.in || die
+}
+
+src_configure() {
+ econf \
+ --with-ufdb-user=squid \
+ --with-ufdb-config=/etc \
+ --with-ufdb-logdir=/var/log/ufdbguard \
+ --with-ufdb-dbhome=/usr/share/ufdbguard/blacklists \
+ --with-ufdb-images_dir=/usr/share/ufdbguard/images
+}
+
+src_install() {
+ dodoc CHANGELOG INSTALL README src/sampleufdbGuard.conf || die
+ doman doc/*.1 || die
+
+ dobin src/ufdbAnalyse src/ufdbGenTable src/ufdbGrab \
+ src/ufdbConvertDB || die
+ dosbin src/ufdbUpdate || die
+
+ exeinto /usr/libexec/ufdbguard
+ doexe src/mtserver/ufdbguardd src/mtserver/ufdbgclient || die
+
+ if use httpd; then
+ exeinto /usr/libexec/ufdbguard
+ doexe src/ufdbhttpd || die
+ fi
+
+ keepdir /usr/share/ufdbguard/blacklists
+
+ insinto /etc
+ doins src/ufdbGuard.conf || die
+
+ insinto /usr/share/ufdbguard/images
+ doins src/images/* || die
+
+ newconfd "${FILESDIR}"/ufdb.confd ufdb || die
+ newinitd "${FILESDIR}"/ufdb.initd ufdb || die
+
+ exeinto /etc/cron.daily
+ newexe "${FILESDIR}"/ufdbUpdate.cron ufdbUpdate || die
+
+ if use doc; then
+ insinto /usr/share/doc/${PF}
+ newins "${DISTDIR}"/${P}-manual.pdf ReferenceManual.pdf || die
+ fi
+}
+
+pkg_postinst() {
+ elog "The default location for the blacklist database has been"
+ elog "moved to /usr/share/ufdbguard/blacklists."
+ elog ""
+ elog "The configuration file is no longer configurable in the"
+ elog "service file, and now resides at /etc/ufdbGuard.conf ."
+ elog ""
+ elog "The service script has been renamed from ufdbguad to simply"
+ elog "/etc/init.d/ufdb, to follow the official documentation, and"
+ elog "it gained a reload option with a reconfig alias."
+ elog ""
+ elog "You can configure the username and password parameters for"
+ elog "ufdbUpdate, to fetch the blacklist database provided by"
+ elog "URLfilterDB, directly in /etc/conf.d/ufdb without touching"
+ elog "the script itself."
+ elog ""
+ elog "To enable ufdbguard in squid, you should add this to your"
+ elog "squid.conf:"
+ elog ""
+ elog " url_rewrite_program /usr/libexec/ufdbguard/ufdbgclient -l /var/log/ufdbguard"
+ elog " url_rewrite_children 64"
+ elog ""
+ if ! use httpd; then
+ elog "You chose to not install the lightweight http daemon that"
+ elog "comes with ufdbguard."
+ else
+ elog "The ufdb service will start both the ufdbguardd daemon and"
+ elog "the ufdbhttpd http daemon to provide a local redirect CGI."
+ elog "If you don't want this to happen, disable the httpd USE flag."
+ fi
+ if use doc; then
+ elog ""
+ elog "The reference manual has been installed as"
+ elog " /usr/share/doc/${PF}/ReferenceManual.pdf"
+ fi
+}
diff --git a/net-proxy/ufdbguard/ufdbguard-1.29.ebuild b/net-proxy/ufdbguard/ufdbguard-1.29.ebuild
new file mode 100644
index 000000000000..4b553452454d
--- /dev/null
+++ b/net-proxy/ufdbguard/ufdbguard-1.29.ebuild
@@ -0,0 +1,136 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit eutils flag-o-matic user
+
+MY_P="ufdbGuard-${PV}"
+
+DESCRIPTION="ufdbGuard is a redirector for the Squid internet proxy"
+HOMEPAGE="http://www.urlfilterdb.com/en/products/ufdbguard.html"
+SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.gz
+ doc? ( mirror://sourceforge/${PN}/ReferenceManual_v${PV/\./_}.pdf -> ${P}-manual.pdf )"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="+httpd doc"
+
+RDEPEND="dev-libs/openssl
+ app-arch/bzip2
+ net-misc/wget"
+
+DEPEND="${RDEPEND}
+ sys-devel/bison
+ sys-devel/flex"
+
+RDEPEND="${RDEPEND}
+ sys-apps/openrc"
+
+S="${WORKDIR}/${MY_P}"
+
+pkg_setup() {
+ enewgroup squid
+ enewuser squid -1 -1 /var/cache/squid squid
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-1.29-parallel-make.patch
+ epatch "${FILESDIR}"/${PN}-1.24-gentoo.patch
+
+ egrep -r -e '/var/tmp/ufdb(guard|http)d.pid' "${S}" -lZ | xargs -0 \
+ sed -i -e 's:/var/tmp/ufdb\(guard\|http\)d.pid:/var/run/ufdbguard/ufdb\1d.pid:' \
+ || die
+
+ # directory where ufdbhttpd is to be found
+ sed -i -e 's:DEFAULT_BINDIR.*:DEFAULT_BINDIR "/usr/libexec/ufdbguard":' \
+ src/ufdb.h.in || die
+}
+
+src_configure() {
+ # better safe than sorry, the code has a number of possible
+ # breakage, and at least one certain breakage.
+ append-flags -fno-strict-aliasing
+
+ econf \
+ --with-ufdb-user=squid \
+ --with-ufdb-config=/etc \
+ --with-ufdb-logdir=/var/log/ufdbguard \
+ --with-ufdb-dbhome=/usr/share/ufdbguard/blacklists \
+ --with-ufdb-images_dir=/usr/share/ufdbguard/images
+}
+
+src_install() {
+ dodoc CHANGELOG INSTALL README src/sampleufdbGuard.conf
+ doman doc/*.1
+
+ dobin src/ufdbAnalyse src/ufdbGenTable src/ufdbGrab \
+ src/ufdbConvertDB
+ dosbin src/ufdbUpdate
+
+ exeinto /usr/libexec/ufdbguard
+ doexe src/mtserver/ufdbguardd src/mtserver/ufdbgclient
+
+ if use httpd; then
+ exeinto /usr/libexec/ufdbguard
+ doexe src/ufdbhttpd
+ fi
+
+ keepdir /usr/share/ufdbguard/blacklists
+
+ insinto /etc
+ doins src/ufdbGuard.conf
+
+ insinto /usr/share/ufdbguard/images
+ doins src/images/*
+
+ newconfd "${FILESDIR}"/ufdb.confd ufdb
+ newinitd "${FILESDIR}"/ufdb.initd.2 ufdb
+
+ exeinto /etc/cron.daily
+ newexe "${FILESDIR}"/ufdbUpdate.cron ufdbUpdate
+
+ if use doc; then
+ insinto /usr/share/doc/${PF}
+ newins "${DISTDIR}"/${P}-manual.pdf ReferenceManual.pdf
+ fi
+}
+
+pkg_postinst() {
+ elog "The default location for the blacklist database has been"
+ elog "moved to /usr/share/ufdbguard/blacklists."
+ elog ""
+ elog "The configuration file is no longer configurable in the"
+ elog "service file, and now resides at /etc/ufdbGuard.conf ."
+ elog ""
+ elog "The service script has been renamed from ufdbguad to simply"
+ elog "/etc/init.d/ufdb, to follow the official documentation, and"
+ elog "it gained a reload option with a reconfig alias."
+ elog ""
+ elog "You can configure the username and password parameters for"
+ elog "ufdbUpdate, to fetch the blacklist database provided by"
+ elog "URLfilterDB, directly in /etc/conf.d/ufdb without touching"
+ elog "the script itself."
+ elog ""
+ elog "To enable ufdbguard in squid, you should add this to your"
+ elog "squid.conf:"
+ elog ""
+ elog " url_rewrite_program /usr/libexec/ufdbguard/ufdbgclient -l /var/log/ufdbguard"
+ elog " url_rewrite_children 64"
+ elog ""
+ if ! use httpd; then
+ elog "You chose to not install the lightweight http daemon that"
+ elog "comes with ufdbguard."
+ else
+ elog "The ufdb service will start both the ufdbguardd daemon and"
+ elog "the ufdbhttpd http daemon to provide a local redirect CGI."
+ elog "If you don't want this to happen, disable the httpd USE flag."
+ fi
+ if use doc; then
+ elog ""
+ elog "The reference manual has been installed as"
+ elog " /usr/share/doc/${PF}/ReferenceManual.pdf"
+ fi
+}