diff options
Diffstat (limited to 'net-proxy/c-icap')
-rw-r--r-- | net-proxy/c-icap/Manifest | 9 | ||||
-rw-r--r-- | net-proxy/c-icap/c-icap-0.2.6.ebuild | 112 | ||||
-rw-r--r-- | net-proxy/c-icap/files/c-icap-0.2.6-fix-icap-parsing.patch | 11 | ||||
-rw-r--r-- | net-proxy/c-icap/files/c-icap.conf | 11 | ||||
-rw-r--r-- | net-proxy/c-icap/files/c-icap.init.3 | 26 | ||||
-rw-r--r-- | net-proxy/c-icap/files/c-icap.logrotate | 13 | ||||
-rw-r--r-- | net-proxy/c-icap/metadata.xml | 7 |
7 files changed, 189 insertions, 0 deletions
diff --git a/net-proxy/c-icap/Manifest b/net-proxy/c-icap/Manifest new file mode 100644 index 000000000000..88da81d9c0fb --- /dev/null +++ b/net-proxy/c-icap/Manifest @@ -0,0 +1,9 @@ +AUX c-icap-0.2.6-fix-icap-parsing.patch 522 SHA256 b856b028085f937b21d2e4eeeb3f0ae05f9b2170c6adf7ce213fcaad29a36818 SHA512 9bc60cba5d5560acad1320595176f0ccd654c4f88e2507da0e80d588999309b4180bc7b86843bf63d5688bcd377432a913ea76525ac5ccdec40155e70ecec9c0 WHIRLPOOL f27315ca51d6526fdef84f03dbcbcd75266e2615ca34ab54bd2604aa0caad52626d9eb0292285c7a78182f4847c4151902666173689b2541ac6e957a273ef59d +AUX c-icap.conf 359 SHA256 b855b93780a6885388f6bfa8d44ee4ad7f5aa75c83d43c5a54d2923848b0c1da SHA512 2ccab04f6ddb1b76b41d9b26dfdcf3e43aa4acdaeeddc215f38e0f7f8b537687733c643d5cc2b0e06b95710a3cd76c8a67e33e8c8240b375d939fea649e86ba3 WHIRLPOOL 7ae5daacae96e252628457b98dc9cf8fbeac962fd16015aeb830a4b3cdfbee83f24f46bd3cdffcff0b106d27871e44596a708ddf5c9ccdc9077344b6d2a1d6f8 +AUX c-icap.init.3 693 SHA256 eff25085309624987362c1427725db3081c2466e305a59a4f064faa49405726d SHA512 9518ebdc57e69716717160fa11d2ade4648212ac4bbc65caeec0d0c7d2427cd0a8a70e1de36b6c81113c821ed9a11808f7d81595f8c1fc185013a1cd4ac93bdb WHIRLPOOL 1d654d4b7f430811b23f399afec4d6b5dc2ced57a1da8a2d3205b9f288a018120833457ffbf4286be2d0e491a6b168ef676371fdace411050ce0116b52c65823 +AUX c-icap.logrotate 188 SHA256 a1ebd01837312c1fbb5b110486656656001c9b70ab0008f5ee73de6222005b54 SHA512 edc8dbbbaa06cf062b307e37ffee1dee9d566cc4b8a6947422125a22d956bcc639c483712ff6b6f6e9eb30852b4b0d5c293f1279463af89e8fc199828792a9e7 WHIRLPOOL f20fa59b07edd5c1b1a86d6d5e59523ba17b011d019af9b521f03f10a9f821c5d31230161abeabbd77a020ca59425e91e48588e85a469a9452ed8ff296390d3d +DIST c_icap-0.2.6.tar.gz 581856 SHA256 e5caf8d53975fbffdd50f99ebf7bf88067c842609ab69e08b4337961ac46482a SHA512 3b1fe1f89581ec4649f74771f4a33a08637428f6cf81a9228f5d08405207c3495e6dadd590254dd6804ccbb7c34af1fc62973563c6156c4249941a599a072a40 WHIRLPOOL 8dd8a999e8863f3873629b0e0dc72e7a4109d37531bf2752d587b4c4df128dba6280b0d9226e3e4edffc615cca6cb6795cc62c9fe2b75ba7adbbcc2f108935ea +EBUILD c-icap-0.2.6.ebuild 2854 SHA256 a7c4c12db7dd08bb053ed42818e46e5b43ef80e092f8f35f59786312b461172f SHA512 abe180bfeab2c1223dfc9fa6deb1880a0f8fbdc9064950130700a50278fa3551af4761e9d03e1e878df6bec489ed91cd628726c6dc1b76ce107dd5d60a2b1615 WHIRLPOOL 78b00e5b42236a890f8bf06fb7c4aba413343e4760a7ced7c5c060f0726bc3ed861f2c95559d0d74d53f9f1060ba53bb032bef51c29b5c5eb959bc3af6b38a84 +MISC ChangeLog 2734 SHA256 f20f3244a18aa53ac3643fb5e11caecf45c423837a395fbfba87978051bb2ba4 SHA512 ae480ccf0764d7fd781e6cba8a0328c77678b69de8f7719e45ff70755a199b5980b46f00e9c372e17bd9ed4bbb19ac5a97fe3b198f971cb94d58978396c8cc15 WHIRLPOOL 702d9853bc00069055c5dc7b65d0da704fd1ec5c0c678b5edc4dfd82f792dc357552f3f6cf1d5980cbbcfb5ba24a956753e83dbd513a7daeab712ec84f8d2896 +MISC ChangeLog-2015 5108 SHA256 a9f29413026ac8cee0c4250214171add686d292e4d3b0dbe398a5e54bd1b670c SHA512 3237f64eaa1d5c1b1e80b77968a8a1b05788eef5ba65ccc29f870ec3a742e1782d699a7ce6207d10eaba98dfbc79932fbfaf70387ed49e573f726d0bf658b517 WHIRLPOOL c55feba16e9e94a44e897f8a9052638102b489c8f056a1c4748c60588c9522af4a8c80c51dd26412e42a44e77d420d31b03883365de0e8c2d573512242fab51d +MISC metadata.xml 219 SHA256 0a93248fcf60015edfbc867d76cb5bc6cf131ed4145d2566cd8634103513d58a SHA512 1b367aedae4a1b2484e88740adb95edb652befa869fb44b25f98a9634dc8819f461913304e74ac254cff88841b254b256d33062b65cee579f8cbf9f72526e2aa WHIRLPOOL 61d39236a2478eeadc28260d0f897173efccc2a37aeb79ad8cc87f52f028900801e066df0c92a22d315673e040b08042c2047ed88931fc4bcfa52ad03c694d11 diff --git a/net-proxy/c-icap/c-icap-0.2.6.ebuild b/net-proxy/c-icap/c-icap-0.2.6.ebuild new file mode 100644 index 000000000000..cd9886df7296 --- /dev/null +++ b/net-proxy/c-icap/c-icap-0.2.6.ebuild @@ -0,0 +1,112 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI="5" + +inherit eutils multilib flag-o-matic + +MY_PN="${PN/-/_}" +MY_P="${MY_PN}-${PV}" + +DESCRIPTION="C Implementation of an ICAP server" +HOMEPAGE="http://c-icap.sourceforge.net/" +SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.gz" + +LICENSE="LGPL-2.1" +SLOT="0" +KEYWORDS="amd64 ~arm x86" +IUSE="berkdb ipv6 ldap" + +RDEPEND="berkdb? ( sys-libs/db ) + ldap? ( net-nds/openldap ) + sys-libs/zlib" + +DEPEND="${RDEPEND}" +RDEPEND="${RDEPEND}" + +S="${WORKDIR}/${MY_P}" + +src_prepare() { + epatch "${FILESDIR}"/c-icap-0.2.6-fix-icap-parsing.patch +} + +src_configure() { + # some void *** pointers get casted around and can be troublesome to + # fix properly. + append-flags -fno-strict-aliasing + + econf \ + --sysconfdir=/etc/${PN} \ + --disable-dependency-tracking \ + --disable-maintainer-mode \ + --disable-static \ + --enable-large-files \ + $(use_enable ipv6) \ + $(use_with berkdb bdb) \ + $(use_with ldap) +} + +src_compile() { + emake LOGDIR="/var/log" +} + +src_install() { + emake \ + LOGDIR="/var/log" \ + DESTDIR="${D}" install + + find "${D}" -name '*.la' -delete || die + + # Move the daemon out of the way + dodir /usr/libexec + mv "${D}"/usr/bin/c-icap "${D}"/usr/libexec || die + + # Remove the default configuration files since we have etc-update to + # take care of it for us. + rm "${D}"/etc/${PN}/c-icap.*.default || die + + # Fix the configuration file; for some reason it's a bit messy + # around. + sed -i \ + -e 's:/usr/var/:/var/:g' \ + -e 's:/var/log/:/var/log/c-icap/:g' \ + -e 's:/usr/etc/:/etc/c-icap/:g' \ + -e 's:/usr/local/c-icap/etc/:/etc/c-icap/:g' \ + -e 's:/usr/lib/:/usr/'$(get_libdir)'/:g' \ + "${D}"/etc/${PN}/c-icap.conf \ + || die + + dodoc AUTHORS README TODO ChangeLog + + newinitd "${FILESDIR}/${PN}.init.3" ${PN} + newconfd "${FILESDIR}/${PN}.conf" ${PN} + keepdir /var/log/c-icap + + insopts -m0644 + insinto /etc/logrotate.d + newins "${FILESDIR}"/${PN}.logrotate ${PN} + + # avoid triggering portage's symlink protection; this is handled by + # the init script anyway. + rm -rf "${D}"/var/run +} + +pkg_postinst() { + elog "To enable Squid to call the ICAP modules from a local server you should set" + elog "the following in your squid.conf:" + elog "" + elog " icap_enable on" + elog "" + elog " # not strictly needed, but some modules might make use of these" + elog " icap_send_client_ip on" + elog " icap_send_client_username on" + elog "" + elog " icap_service service_req reqmod_precache bypass=1 icap://localhost:1344/service" + elog " adaptation_access service_req allow all" + elog "" + elog " icap_service service_resp respmod_precache bypass=0 icap://localhost:1344/service" + elog " adaptation_access service_resp allow all" + elog "" + elog "You obviously will have to replace \"service\" with the actual ICAP service to" + elog "use." +} diff --git a/net-proxy/c-icap/files/c-icap-0.2.6-fix-icap-parsing.patch b/net-proxy/c-icap/files/c-icap-0.2.6-fix-icap-parsing.patch new file mode 100644 index 000000000000..b0275edefee5 --- /dev/null +++ b/net-proxy/c-icap/files/c-icap-0.2.6-fix-icap-parsing.patch @@ -0,0 +1,11 @@ +--- c-icap-0.2.2.orig/request.c 2013-02-03 16:37:43.000000000 +0000 ++++ c-icap-02.2/request.c 2012-06-19 12:55:51.000000000 +0000 +@@ -267,7 +267,7 @@ + req->req_server[servnamelen] = '\0'; + if (*end == '/') { /*service */ + start = ++end; +- while (*end != ' ' && *end != '?') ++ while (*end && *end != ' ' && *end != '?') + end++; + len = end - start; + if (len > 0) { diff --git a/net-proxy/c-icap/files/c-icap.conf b/net-proxy/c-icap/files/c-icap.conf new file mode 100644 index 000000000000..d3f2420b2dce --- /dev/null +++ b/net-proxy/c-icap/files/c-icap.conf @@ -0,0 +1,11 @@ +# Use this to change the configuration file to use for c-icap. +configfile=/etc/c-icap/c-icap.conf + +# Use this to set any extra option for the daemon. Do not use the -f +# option here. +EXTRA_OPTS="" + +# If you enabled LDAP support, and you'd like to access tables stored +# in the local LDAP instance, you want to uncomment the following +# line. +#rc_need="slapd" diff --git a/net-proxy/c-icap/files/c-icap.init.3 b/net-proxy/c-icap/files/c-icap.init.3 new file mode 100644 index 000000000000..c11ae50b9f79 --- /dev/null +++ b/net-proxy/c-icap/files/c-icap.init.3 @@ -0,0 +1,26 @@ +#!/sbin/openrc-run +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +: ${configfile:=/etc/c-icap/c-icap.conf} + +get_config() { + local value=$(awk '$1 == "'$1'" { print $2 }' ${configfile}) + echo ${value:-$2} +} + +command="/usr/libexec/c-icap" +command_arguments="${EXTRA_OPTS} -f ${configfile}" +pidfile=$(get_config PidFile /var/run/c-icap/c-icap.pid) + +depend() { + need localmount + config ${configfile} + [ "$(get_config Logger file_logger)" = "sys_logger" ] && use logger +} + +start_pre() { + local cmdsocket=$(get_config CommandsSocket /var/run/c-icap/c-icap.ctl) + + checkpath -d "$(dirname "${cmdsocket}")" "$(dirname "${pidfile}")" +} diff --git a/net-proxy/c-icap/files/c-icap.logrotate b/net-proxy/c-icap/files/c-icap.logrotate new file mode 100644 index 000000000000..c4c0a5d34f6e --- /dev/null +++ b/net-proxy/c-icap/files/c-icap.logrotate @@ -0,0 +1,13 @@ +/var/log/c-icap/access.log { + missingok + postrotate + /etc/init.d/c-icap restart + endscript +} + +/var/log/cicap-server.log { + missingok + postrotate + /etc/init.d/c-icap restart + endscript +} diff --git a/net-proxy/c-icap/metadata.xml b/net-proxy/c-icap/metadata.xml new file mode 100644 index 000000000000..af696825f7a7 --- /dev/null +++ b/net-proxy/c-icap/metadata.xml @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <upstream> + <remote-id type="sourceforge">c-icap</remote-id> + </upstream> +</pkgmetadata> |