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/dansguardian
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/dansguardian')
-rw-r--r--net-proxy/dansguardian/Manifest1
-rw-r--r--net-proxy/dansguardian/dansguardian-2.12.0.3-r2.ebuild111
-rw-r--r--net-proxy/dansguardian/files/dansguardian.init32
-rw-r--r--net-proxy/dansguardian/files/dansguardian.logrotate14
-rw-r--r--net-proxy/dansguardian/metadata.xml26
5 files changed, 184 insertions, 0 deletions
diff --git a/net-proxy/dansguardian/Manifest b/net-proxy/dansguardian/Manifest
new file mode 100644
index 000000000000..e68dc7113ef4
--- /dev/null
+++ b/net-proxy/dansguardian/Manifest
@@ -0,0 +1 @@
+DIST dansguardian-2.12.0.3.tar.bz2 577701 SHA256 c74e9a32b97f9a9a056fced3da23fe48fca2bc6aa9af670afe9a53dc819414f5 SHA512 37155ef4f1a6dd6bdd87f79c7199b77de49746e4bff0631c239a569c21bf26240cbc9eae5a2436653bfc3d170a664710af9d80c4cfac3082a0620caeaac6740b WHIRLPOOL 64f64161a3dbf48c122fbf341ac8a7b4892be2049d1ac05948e9aa8c4cb927efa6ce929404b60c43f67457268f3c432b0ff109fb333ffe8ab84bba0b528b52eb
diff --git a/net-proxy/dansguardian/dansguardian-2.12.0.3-r2.ebuild b/net-proxy/dansguardian/dansguardian-2.12.0.3-r2.ebuild
new file mode 100644
index 000000000000..714780bc4f2a
--- /dev/null
+++ b/net-proxy/dansguardian/dansguardian-2.12.0.3-r2.ebuild
@@ -0,0 +1,111 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit eutils user
+
+DESCRIPTION="Web content filtering via proxy"
+HOMEPAGE="http://www.${PN}.org"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc ppc64 ~sparc x86"
+IUSE="avast backtrace clamav commandline debug email +fancydm icap kaspersky +lfs logrotate ntlm orig-ip +pcre static-libs trickledm"
+
+RDEPEND="sys-libs/zlib
+ clamav? ( app-antivirus/clamav )
+ logrotate? ( app-admin/logrotate )
+ ntlm? ( virtual/libiconv )
+ pcre? ( >=dev-libs/libpcre-8.32 )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+WIKI="http://contentfilter.futuragts.com/wiki/doku.php"
+
+pkg_setup() {
+ enewgroup ${PN}
+ enewuser ${PN} -1 -1 /dev/null ${PN}
+}
+
+src_configure() {
+ local debug
+ if use debug ; then
+ debug="$(use_with debug dgdebug)"
+ fi
+
+ econf \
+ $(use_enable avast avastd) \
+ $(use_enable backtrace segv-backtrace) \
+ $(use_enable clamav clamd) \
+ $(use_enable commandline) \
+ ${debug} \
+ $(use_enable email) \
+ $(use_enable fancydm) \
+ $(use_enable icap) \
+ $(use_enable kaspersky kavd) \
+ $(use_enable lfs) \
+ --with-logdir=/var/log/${PN} \
+ $(use_enable ntlm) \
+ $(use_enable orig-ip) \
+ $(use_enable pcre) \
+ --with-piddir=/var/run \
+ --with-proxygroup=${PN} \
+ --with-proxyuser=${PN} \
+ $(use_enable static-libs static-zlib) \
+ $(use_enable trickledm)
+}
+
+src_install() {
+ default
+
+ # Edit config files for virus scanners chosen based on USE flags.
+ if use avast; then
+ sed -r -i -e 's/^#( *contentscanner *=.*avastdscan[.]conf.*)/\1/' "${D}/etc/${PN}/${PN}.conf"
+ fi
+
+ if use clamav; then
+ sed -r -i -e 's/[ \t]+use dns/& clamd/' "${D}/etc/init.d/${PN}"
+ sed -r -i -e 's/^#( *contentscanner *=.*clamdscan[.]conf.*)/\1/' "${D}/etc/${PN}/${PN}.conf"
+ fi
+
+ if use commandline; then
+ sed -r -i -e 's/^#( *contentscanner *=.*commandlinescan[.]conf.*)/\1/' "${D}/etc/${PN}/${PN}.conf"
+ fi
+
+ if use icap; then
+ sed -r -i -e 's/^#( *contentscanner *=.*icapscan[.]conf.*)/\1/' "${D}/etc/${PN}/${PN}.conf"
+ fi
+
+ if use kaspersky; then
+ sed -r -i -e 's/^#( *contentscanner *=.*kavdscan[.]conf.*)/\1/' "${D}/etc/${PN}/${PN}.conf"
+ fi
+
+ # Install Gentoo init script
+ newinitd "${FILESDIR}/${PN}.init" ${PN}
+
+ # Install log rotation file.
+ if use logrotate; then
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}/${PN}.logrotate" ${PN}
+ else
+ exeinto /etc/cron.weekly
+ newexe data/scripts/logrotation ${PN}.cron
+ fi
+
+ keepdir /var/log/${PN}
+ fperms o-rwx /var/log/${PN}
+}
+
+pkg_postinst() {
+ local runas="${PN}:${PN}"
+
+ if [ -d "${ROOT}/var/log/${PN}" ] ; then
+ chown -R ${runas} "${ROOT}/var/log/${PN}"
+ chmod o-rwx "${ROOT}/var/log/${PN}"
+ fi
+
+ einfo "For assistance configuring ${PN}, visit the wiki at ${WIKI}"
+}
diff --git a/net-proxy/dansguardian/files/dansguardian.init b/net-proxy/dansguardian/files/dansguardian.init
new file mode 100644
index 000000000000..1be86f757538
--- /dev/null
+++ b/net-proxy/dansguardian/files/dansguardian.init
@@ -0,0 +1,32 @@
+#!/sbin/runscript
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+extra_started_commands="reload"
+
+depend() {
+ need net
+ use dns \
+ squid apache2 bfilter mman junkbuster oops polipo privoxy tinyproxy wwwoffled
+ #dansguardian could be used in conjuction with any of the above web proxies
+ provide dansguardian
+}
+
+start() {
+ ebegin "Starting DansGuardian"
+ start-stop-daemon --start --background --pidfile /var/run/dansguardian.pid --exec /usr/sbin/dansguardian --progress --quiet
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping DansGuardian"
+ start-stop-daemon --stop --pidfile /var/run/dansguardian.pid --exec /usr/sbin/dansguardian --progress --quiet
+ eend $?
+}
+
+reload() {
+ ebegin "Leaving current connections open. Reloading filter group config files."
+ /usr/sbin/dansguardian -g
+ eend $?
+}
diff --git a/net-proxy/dansguardian/files/dansguardian.logrotate b/net-proxy/dansguardian/files/dansguardian.logrotate
new file mode 100644
index 000000000000..2fe8ad51204b
--- /dev/null
+++ b/net-proxy/dansguardian/files/dansguardian.logrotate
@@ -0,0 +1,14 @@
+/var/log/dansguardian/access.log {
+ rotate 4
+ weekly
+ missingok
+ notifempty
+ nocreate
+ nocopy
+ nocopytruncate
+ nocompress
+
+ postrotate
+ /usr/sbin/dansguardian -r
+ endscript
+}
diff --git a/net-proxy/dansguardian/metadata.xml b/net-proxy/dansguardian/metadata.xml
new file mode 100644
index 000000000000..b8eb20582e58
--- /dev/null
+++ b/net-proxy/dansguardian/metadata.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>maintainer-needed@gentoo.org</email>
+ </maintainer>
+ <longdescription>DansGuardian is an award winning Open Source web content filter which currently runs on Linux, FreeBSD, OpenBSD, NetBSD, Mac OS X, HP-UX, and Solaris. It filters the actual content of pages based on many methods including phrase matching, PICS filtering and URL filtering. It does not purely filter based on a banned list of sites like lesser totally commercial filters.</longdescription>
+ <use>
+ <flag name="avast">Enable support for the AvastD content scanner.</flag>
+ <flag name="backtrace">Enable logging a backtrace when a segmentation fault occurs.</flag>
+ <flag name="clamav">Enable support for the ClamD content scanner.</flag>
+ <flag name="commandline">Enable support for command-line content scanners.</flag>
+ <flag name="email">Enable support for email reporting functionality.</flag>
+ <flag name="fancydm">Enable support for the fancy download manager.</flag>
+ <flag name="icap">Enable support for ICAP AV server content scanner.</flag>
+ <flag name="kaspersky">Enable support for the Kaspersky AV daemon content scanner.</flag>
+ <flag name="lfs">Enable large file support on 32 bit systems.</flag>
+ <flag name="logrotate">Use app-admin/logrotate for rotating logs.</flag>
+ <flag name="ntlm">Enable support for the NTLM auth plugin.</flag>
+ <flag name="orig-ip">Enable support for checking the client's original destination IP address against HTTP request details when deployed as a transparent proxy (US-CERT VU#435052).</flag>
+ <flag name="trickledm">Enable support for the trickle download manager.</flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">dansguardian</remote-id>
+ </upstream>
+</pkgmetadata>