diff options
Diffstat (limited to 'net-proxy/ziproxy')
-rw-r--r-- | net-proxy/ziproxy/Manifest | 1 | ||||
-rw-r--r-- | net-proxy/ziproxy/files/ziproxy-3.1.3-libpng15.patch | 20 | ||||
-rw-r--r-- | net-proxy/ziproxy/files/ziproxy.confd | 18 | ||||
-rw-r--r-- | net-proxy/ziproxy/files/ziproxy.initd | 26 | ||||
-rw-r--r-- | net-proxy/ziproxy/files/ziproxy.initd-r1 | 26 | ||||
-rw-r--r-- | net-proxy/ziproxy/metadata.xml | 15 | ||||
-rw-r--r-- | net-proxy/ziproxy/ziproxy-3.3.1.ebuild | 84 |
7 files changed, 190 insertions, 0 deletions
diff --git a/net-proxy/ziproxy/Manifest b/net-proxy/ziproxy/Manifest new file mode 100644 index 000000000000..51d1a3bf0b72 --- /dev/null +++ b/net-proxy/ziproxy/Manifest @@ -0,0 +1 @@ +DIST ziproxy-3.3.1.tar.xz 205972 SHA256 358396f5b5c469be15b0c43cae9d40a183072d0b9a35621ed8ff22a0bedb2206 SHA512 bff87a63320e721091ccdcdbe409f59db7f7f681ee8b7f093f18f3c0391579a25b9a8daf6ccfea4d94384142247ce36cfaec68d294b2a23caa56ede436da2d87 WHIRLPOOL b57da63dd76fb39461c1ed9959fe022c662c2309a1735ac0e0bb517420c93682fcb7a72a7c1507c1cf689d051a2fd89748c776ae45a476b25dfa93c5e755c93e diff --git a/net-proxy/ziproxy/files/ziproxy-3.1.3-libpng15.patch b/net-proxy/ziproxy/files/ziproxy-3.1.3-libpng15.patch new file mode 100644 index 000000000000..148a513e6f7d --- /dev/null +++ b/net-proxy/ziproxy/files/ziproxy-3.1.3-libpng15.patch @@ -0,0 +1,20 @@ +--- src/image.c ++++ src/image.c +@@ -17,6 +17,8 @@ + #include <stdlib.h> + #include <assert.h> + ++#include <zlib.h> ++ + #include <gif_lib.h> + + #include <jpeglib.h> +@@ -515,7 +517,7 @@ + bmp = new_raw_bitmap(); + *out = bmp; + +- png_set_read_fn (png_ptr, (voidp) &desc, mem_to_png); ++ png_set_read_fn (png_ptr, (png_voidp) &desc, mem_to_png); + + png_read_info (png_ptr,info_ptr); + png_get_IHDR (png_ptr, info_ptr, &width_png_uint_32, &height_png_uint_32, diff --git a/net-proxy/ziproxy/files/ziproxy.confd b/net-proxy/ziproxy/files/ziproxy.confd new file mode 100644 index 000000000000..9a4a12137c6a --- /dev/null +++ b/net-proxy/ziproxy/files/ziproxy.confd @@ -0,0 +1,18 @@ +# configuraton file for /etc/init.d/ziproxy +# +# you can symlink /etc/init.d/ziproxy to a different name +# and then copy this config to a new file with the same name +# as the symlinked init-script to run multiple instances of +# ziproxy. You have to change the location for CONFIG then +# of course... ;-) + +# Full path to ziproxy.conf file (instead of default one). +# +#CONFIG="/etc/ziproxy/ziproxy.conf" + +# Limit incoming connections only from the specified address(es). +# This option has the same meaning, but higher precedence as +# "OnlyFrom=" option in configuration file. Uncomment it +# if you want to set it. +# +#ONLYFROM="<IP.address or hostname>" diff --git a/net-proxy/ziproxy/files/ziproxy.initd b/net-proxy/ziproxy/files/ziproxy.initd new file mode 100644 index 000000000000..6b0cb89bce32 --- /dev/null +++ b/net-proxy/ziproxy/files/ziproxy.initd @@ -0,0 +1,26 @@ +#!/sbin/runscript +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +depend() { + need net +} + +start() { + local OPT="-d" + ebegin "Starting ${SVCNAME}" + + [ -n "${CONFIG}" ] && OPT="${OPT} -c ${CONFIG}" + [ -n "${ONLYFROM}" ] && OPT="${OPT} -f ${ONLYFROM}" + + start-stop-daemon --start --pidfile /var/run/${SVCNAME}.pid \ + --chuid ziproxy:ziproxy --exec /usr/sbin/ziproxy -- ${OPT} > /var/run/${SVCNAME}.pid + eend $? +} + +stop() { + ebegin "Stopping ${SVCNAME}" + start-stop-daemon --stop --quiet --pidfile /var/run/${SVCNAME}.pid + eend $? +} diff --git a/net-proxy/ziproxy/files/ziproxy.initd-r1 b/net-proxy/ziproxy/files/ziproxy.initd-r1 new file mode 100644 index 000000000000..dae95513ea70 --- /dev/null +++ b/net-proxy/ziproxy/files/ziproxy.initd-r1 @@ -0,0 +1,26 @@ +#!/sbin/runscript +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +depend() { + need net +} + +start() { + local OPT="-d" + ebegin "Starting ${SVCNAME}" + + [ -n "${CONFIG}" ] && OPT="${OPT} -c ${CONFIG}" + [ -n "${ONLYFROM}" ] && OPT="${OPT} -f ${ONLYFROM}" + + start-stop-daemon --start \ + --exec /usr/sbin/ziproxy -- ${OPT} -u ziproxy -g ziproxy -p /var/run/${SVCNAME}.pid + eend $? +} + +stop() { + ebegin "Stopping ${SVCNAME}" + start-stop-daemon --stop --quiet --pidfile /var/run/${SVCNAME}.pid + eend $? +} diff --git a/net-proxy/ziproxy/metadata.xml b/net-proxy/ziproxy/metadata.xml new file mode 100644 index 000000000000..5f2f1284808a --- /dev/null +++ b/net-proxy/ziproxy/metadata.xml @@ -0,0 +1,15 @@ +<?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 lang="en"> + Ziproxy is a http compression and optimizer, non-caching, fully configurable + proxy. Ziproxy features JPEG, GIF, PNG, JPEG2k and GZIP recompression for + lower HTTP traffic through low speed links, among other features. + </longdescription> + <upstream> + <remote-id type="sourceforge">ziproxy</remote-id> + </upstream> +</pkgmetadata> diff --git a/net-proxy/ziproxy/ziproxy-3.3.1.ebuild b/net-proxy/ziproxy/ziproxy-3.3.1.ebuild new file mode 100644 index 000000000000..56c5c78c93a3 --- /dev/null +++ b/net-proxy/ziproxy/ziproxy-3.3.1.ebuild @@ -0,0 +1,84 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 +inherit user + +DESCRIPTION="A forwarding, non-caching, compressing web proxy server" +HOMEPAGE="http://ziproxy.sourceforge.net/" +SRC_URI="mirror://sourceforge/${PN}/${P}.tar.xz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~sparc ~x86" +IUSE="jpeg2k sasl xinetd" + +RDEPEND=" + media-libs/giflib + media-libs/libpng:0= + virtual/jpeg + sys-libs/zlib + jpeg2k? ( media-libs/jasper ) + sasl? ( dev-libs/cyrus-sasl ) + xinetd? ( virtual/inetd ) +" +DEPEND="${RDEPEND} + app-arch/xz-utils +" + +pkg_setup() { + enewgroup ziproxy + enewuser ziproxy -1 -1 -1 ziproxy +} + +src_prepare() { + # fix sample config file + sed -i \ + -e "s:/var/ziproxy/:/var/lib/ziproxy/:g" \ + -e "s:%j-%Y.log:/var/log/ziproxy/%j-%Y.log:g" \ + etc/ziproxy/ziproxy.conf || die + + # fix sample xinetd config + sed -i \ + -e "s:/usr/bin/:/usr/sbin/:g" \ + -e "s:\(.*port.*\):\1\n\ttype\t\t\t= UNLISTED:g" \ + -e "s:root:ziproxy:g" \ + etc/xinetd.d/ziproxy || die +} + +src_configure() { + econf \ + $(use_with jpeg2k jasper) \ + $(use_with sasl sasl2) \ + --with-cfgfile=/etc/ziproxy/ziproxy.conf +} + +src_install() { + emake DESTDIR="${D}" install + + dodir /usr/sbin + mv -vf "${D}"usr/{,s}bin/ziproxy || die + + dobin src/tools/ziproxy_genhtml_stats.sh + + newinitd "${FILESDIR}"/${PN}.initd-r1 ${PN} + newconfd "${FILESDIR}"/${PN}.confd ${PN} + + dodoc ChangeLog CREDITS README README.tools + use jpeg2k && dodoc JPEG2000.txt + + insinto /etc + doins -r etc/ziproxy + + insinto /var/lib/ziproxy/error + doins var/ziproxy/error/*.html + + if use xinetd; then + insinto /etc/xinetd.d + doins etc/xinetd.d/ziproxy + fi + + diropts -m0750 -o ziproxy -g ziproxy + keepdir /var/log/ziproxy +} |