diff options
author | Bertrand Jacquin <beber@meleeweb.net> | 2009-05-13 20:27:00 +0200 |
---|---|---|
committer | Bertrand Jacquin <beber@meleeweb.net> | 2009-05-13 20:27:00 +0200 |
commit | 6241decc2eea7dee8180699ff1c9e86a2f645c66 (patch) | |
tree | b4d45aa87bda0873d5ca03cc7fbc11884887f6e7 /net-proxy/havp | |
parent | grep: fix pcre-config host use by using PKG_CONFIG in autofoo (diff) | |
download | portage-6241decc2eea7dee8180699ff1c9e86a2f645c66.tar.xz |
havp: Replace clamav-config by pkg-config
Diffstat (limited to 'net-proxy/havp')
-rw-r--r-- | net-proxy/havp/Manifest | 4 | ||||
-rw-r--r-- | net-proxy/havp/files/havp-0.89-BJA-pkg-config-libclamav.diff | 68 | ||||
-rw-r--r-- | net-proxy/havp/files/havp.initd | 65 | ||||
-rw-r--r-- | net-proxy/havp/havp-0.89.ebuild | 75 |
4 files changed, 212 insertions, 0 deletions
diff --git a/net-proxy/havp/Manifest b/net-proxy/havp/Manifest new file mode 100644 index 00000000..dd09509e --- /dev/null +++ b/net-proxy/havp/Manifest @@ -0,0 +1,4 @@ +AUX havp-0.89-BJA-pkg-config-libclamav.diff 1601 RMD160 0e665c86694746e76310572589870bc8de0c96b2 SHA1 40f2feefdf1f98f26938881b77718416e2ae286d SHA256 ef3c25f6d1bb43c1dbda8103aa130645be33b465e1ecccb440649d58d49b94a2 +AUX havp.initd 1610 RMD160 3f16213f905927b47fc51e1570effbaebe024c83 SHA1 8081eb1e98ad6db141c272f254bd522dc384e352 SHA256 80d9b7abd969e18dfcfa46ef2e0cfb4ec5e24c4f14687eebd12c481a4ee72ba9 +DIST havp-0.89.tar.gz 117935 RMD160 8f1482ad63a1c36cf0a0b9363bae0be322d1e632 SHA1 8f3c8596a0bd5ac1baf0cb9486b0d0967e85e717 SHA256 48b8f9b3e653df82446d45903556858e974fc18ba2b5ed8becb36e3960f78d31 +EBUILD havp-0.89.ebuild 1878 RMD160 23a1f190522d746d57c56ed82d6ffbdeb2c75c3c SHA1 57eded6df1346edcd1bff314ab9b4a60bfcbd01c SHA256 c205744d322f6df2d5c4b356410c39b1acd109a5c628d53ecc3b643f464266df diff --git a/net-proxy/havp/files/havp-0.89-BJA-pkg-config-libclamav.diff b/net-proxy/havp/files/havp-0.89-BJA-pkg-config-libclamav.diff new file mode 100644 index 00000000..0f210d0d --- /dev/null +++ b/net-proxy/havp/files/havp-0.89-BJA-pkg-config-libclamav.diff @@ -0,0 +1,68 @@ +--- configure.in.ori 2007-10-04 10:29:24.000000000 +0200 ++++ configure.in 2009-05-13 20:25:35.000000000 +0200 +@@ -5,6 +5,7 @@ + unset CDPATH + + AC_PROG_CXX ++PKG_PROG_PKG_CONFIG + + AC_PREFIX_DEFAULT(/usr/local) + +@@ -83,48 +84,15 @@ + AC_DEFINE(SSLTUNNEL) + fi + +-AC_MSG_CHECKING(for ClamAV scanner library) +- +-if test "$enable_clamav" = "yes" +-then +- clamprefix="`clamav-config --prefix 2>/dev/null`" +- clamversion="`clamav-config --version 2>/dev/null`" +- +- if test "x$clamprefix" = "x" +- then +- AC_MSG_RESULT([clamav-config not found]) +- +- echo "" +- echo " Error finding ClamAV installation!" +- echo " Add ClamAV binaries path to PATH and run configure again." +- echo "" +- echo " To disable ClamAV library support, use --disable-clamav." +- echo "" +- +- exit 1 +- fi +- +- for cl in `clamav-config --cflags 2>/dev/null`; do +- if test "x`echo $cl | perl -ne 'print if (/^-I/)' 2>/dev/null`" != "x" +- then +- CFLAGS="$CFLAGS $cl" +- fi +- done +- +- for cl in `clamav-config --libs 2>/dev/null`; do +- if test "x`echo $cl | perl -ne 'print if (/(^-L|thread|c_r)/)' 2>/dev/null`" != "x" +- then +- LDFLAGS="$LDFLAGS $cl" +- fi +- done +- LDFLAGS="$LDFLAGS -lclamav" +- +- SCANNEROBJECTS="clamlibscanner.o" +- AC_DEFINE(USECLAMLIB) +- +- AC_MSG_RESULT([found $clamversion in $clamprefix]) +-else +- AC_MSG_RESULT([disabled :-(]) ++if test "$enable_clamav" = "yes" ; then ++ PKG_CHECK_MODULES(clamav, libclamav, ++ [ ++ CFLAGS="$CFLAGS $clamav_CFLAGS" ++ LDFLAGS="$LDFLAGS $clamav_LIBS" ++ ++ SCANNEROBJECTS="clamlibscanner.o" ++ AC_DEFINE(USECLAMLIB) ++ ]) + fi + + AC_MSG_CHECKING(for Trend Micro scanner) diff --git a/net-proxy/havp/files/havp.initd b/net-proxy/havp/files/havp.initd new file mode 100644 index 00000000..5cb3be40 --- /dev/null +++ b/net-proxy/havp/files/havp.initd @@ -0,0 +1,65 @@ +#!/sbin/runscript +# Copyright 1999-2005 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +depend() { + need net + use clamd \ + squid apache2 bfilter mman junkbuster oops polipo privoxy tinyproxy wwwoffled + #havp could be used in conjuction with any parent proxies enumerated above +} + +get_havp_opt() { + eval HAVP_$1=`awk '/^[ \t]*'$1'[ \t]+/ { print $2; }' < /etc/havp/havp.config` +} + +checkconfig() { + if [ ! -d /var/run/havp ] && ! mkdir /var/run/havp; then + eeror "Failed to create /var/run/havp" + return 1 + fi + if [ ! -d /var/tmp/havp ] && ! mkdir /var/tmp/havp; then + eeror "Failed to create /var/tmp/havp" + return 1 + fi + + if [ ! -f /etc/havp/havp.config ] ; then + eerror "No /etc/havp/havp.config file exists!" + return 1 + fi + + local HAVP_USER + get_havp_opt USER + if [ -n "${HAVP_USER}" ] && ! getent passwd ${HAVP_USER} > /dev/null ; then + eerror "${HAVP_USER} user is missing!" + return 1 + fi + local HAVP_GROUP + get_havp_opt GROUP + if [ -n "${HAVP_GROUP}" ] && ! getent group ${HAVP_GROUP} > /dev/null ; then + eerror "${HAVP_GROUP} group is missing!" + return 1 + fi + + chown -R "${HAVP_USER:-havp}:${HAVP_GROUP:-havp}" /var/run/havp /var/tmp/havp /var/log/havp && \ + chmod -R 0755 /var/run/havp && + chmod -R 0750 /var/tmp/havp +} + + +start() { + checkconfig || return 1 + + ebegin "Starting HTTP AntiVirus proxy" + start-stop-daemon --start --exec /usr/sbin/havp > /dev/null + eend $? +} + +stop() { + local HAVP_PIDFILE + get_havp_opt PIDFILE + + ebegin "Stopping HTTP AntiVirus proxy" + start-stop-daemon --stop --pidfile=${HAVD_PIDFILE:-/var/run/havp/havp.pid} + eend $? +} diff --git a/net-proxy/havp/havp-0.89.ebuild b/net-proxy/havp/havp-0.89.ebuild new file mode 100644 index 00000000..9f4301a0 --- /dev/null +++ b/net-proxy/havp/havp-0.89.ebuild @@ -0,0 +1,75 @@ +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-proxy/havp/havp-0.89.ebuild,v 1.2 2008/08/15 18:16:56 maekke Exp $ + +inherit eutils autotools + +DESCRIPTION="HTTP AntiVirus Proxy" +HOMEPAGE="http://www.server-side.de/" +SRC_URI="http://www.server-side.de/download/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 x86" +IUSE="clamav ssl" + +DEPEND="clamav? ( app-antivirus/clamav )" +RDEPEND="${DEPEND}" + +pkg_setup() { + enewgroup havp + enewuser havp -1 -1 /etc/havp havp +} + +src_unpack() { + unpack ${A} + + cd ${S} + epatch "${FILESDIR}"/${P}-BJA-pkg-config-libclamav.diff + + eautoreconf +} + +src_compile() { + econf --localstatedir=/var \ + $(use_enable clamav) \ + $(use_enable ssl ssl-tunnel) || die "configure failed" + emake || die "make failed" +} + +src_install() { + exeinto /usr/sbin + doexe havp/havp + + newinitd "${FILESDIR}/havp.initd" havp + insinto /etc + doins -r etc/havp + + diropts -m 0700 -o havp -g havp + keepdir /var/log/havp + + diropts -m 0750 + dodir /var/run/havp /var/tmp/havp + + dodoc ChangeLog +} + +pkg_postinst() { + ewarn "/var/tmp/havp must be on a filesystem with mandatory locks!" + ewarn "You should add \"mand\" to the mount options on the relevant line in /etc/fstab." + + if use ssl; then + echo + ewarn "Note: ssl USE flag only enable SSL pass-through, which means that" + ewarn " HTTPS pages will not be scanned for viruses!" + ewarn " It is impossible to decrypt data sent through SSL connections without knowing" + ewarn " the private key of the used certificate." + fi + + if use clamav; then + echo + ewarn "If you plan to use clamav daemon, you should make sure clamav user can read" + ewarn "/var/tmp/havp content. This can be accomplished by enabling AllowSupplementaryGroups" + ewarn "in /etc/clamd.conf and adding clamav user to the havp group." + fi +} |