summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAustin English <wizardedit@gentoo.org>2016-05-03 14:14:58 -0500
committerAustin English <wizardedit@gentoo.org>2016-05-03 14:17:01 -0500
commit20317feb5adc8f6710bbf3798c35874e2b6cacad (patch)
treefe27a7b3d0fcb5d6dd20003216e62310d7adda78 /net-proxy
parentnet-proxy/wwwoffle: remove old version (diff)
downloadgentoo-20317feb5adc8f6710bbf3798c35874e2b6cacad.tar.gz
gentoo-20317feb5adc8f6710bbf3798c35874e2b6cacad.tar.bz2
gentoo-20317feb5adc8f6710bbf3798c35874e2b6cacad.zip
net-proxy/ziproxy: use #!/sbin/openrc-run instead of #!/sbin/runscript
Gentoo-Bug: https://bugs.gentoo.org/573846 Package-Manager: portage-2.2.26
Diffstat (limited to 'net-proxy')
-rw-r--r--net-proxy/ziproxy/files/ziproxy.initd26
-rw-r--r--net-proxy/ziproxy/files/ziproxy.initd-r14
-rw-r--r--net-proxy/ziproxy/ziproxy-3.3.1-r1.ebuild86
3 files changed, 88 insertions, 28 deletions
diff --git a/net-proxy/ziproxy/files/ziproxy.initd b/net-proxy/ziproxy/files/ziproxy.initd
deleted file mode 100644
index 6b0cb89bce32..000000000000
--- a/net-proxy/ziproxy/files/ziproxy.initd
+++ /dev/null
@@ -1,26 +0,0 @@
-#!/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
index dae95513ea70..f552307586fa 100644
--- a/net-proxy/ziproxy/files/ziproxy.initd-r1
+++ b/net-proxy/ziproxy/files/ziproxy.initd-r1
@@ -1,5 +1,5 @@
-#!/sbin/runscript
-# Copyright 1999-2015 Gentoo Foundation
+#!/sbin/openrc-run
+# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
diff --git a/net-proxy/ziproxy/ziproxy-3.3.1-r1.ebuild b/net-proxy/ziproxy/ziproxy-3.3.1-r1.ebuild
new file mode 100644
index 000000000000..6ebbbf477c94
--- /dev/null
+++ b/net-proxy/ziproxy/ziproxy-3.3.1-r1.ebuild
@@ -0,0 +1,86 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+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() {
+ default
+
+ # 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
+}