summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDiego Elio Pettenò <flameeyes@gentoo.org>2013-05-29 17:48:35 +0000
committerDiego Elio Pettenò <flameeyes@gentoo.org>2013-05-29 17:48:35 +0000
commit9ed32f395b732b0e007dc4a40384680019612d29 (patch)
treebe54f9e2db9efb9e3f65f7d6205287a222132b70 /net-proxy
parentAdditional permissions fix - 471654 (diff)
downloadgentoo-2-9ed32f395b732b0e007dc4a40384680019612d29.tar.gz
gentoo-2-9ed32f395b732b0e007dc4a40384680019612d29.tar.bz2
gentoo-2-9ed32f395b732b0e007dc4a40384680019612d29.zip
Cleanup ebuild, use REQUIRED_USE, always install docs, improve init script so that now it actually works.
(Portage version: 2.2.0_alpha176/cvs/Linux x86_64, signed Manifest commit with key 1CD13C8AD4301342)
Diffstat (limited to 'net-proxy')
-rw-r--r--net-proxy/tinyproxy/ChangeLog9
-rw-r--r--net-proxy/tinyproxy/files/tinyproxy-1.8.3.initd41
-rw-r--r--net-proxy/tinyproxy/tinyproxy-1.8.3-r1.ebuild78
3 files changed, 127 insertions, 1 deletions
diff --git a/net-proxy/tinyproxy/ChangeLog b/net-proxy/tinyproxy/ChangeLog
index ec924237a56b..a51c6f5edb26 100644
--- a/net-proxy/tinyproxy/ChangeLog
+++ b/net-proxy/tinyproxy/ChangeLog
@@ -1,7 +1,14 @@
+*tinyproxy-1.8.3-r1 (29 May 2013)
+
+ 29 May 2013; Diego E. Pettenò <flameeyes@gentoo.org>
+ +files/tinyproxy-1.8.3.initd, +tinyproxy-1.8.3-r1.ebuild:
+ Cleanup ebuild, use REQUIRED_USE, always install docs, improve init script so
+ that now it actually works.
+
# ChangeLog for net-proxy/tinyproxy
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-proxy/tinyproxy/ChangeLog,v 1.40 2013/04/24 17:47:02 jer Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-proxy/tinyproxy/ChangeLog,v 1.41 2013/05/29 17:48:35 flameeyes Exp $
24 Apr 2013; Jeroen Roovers <jer@gentoo.org> tinyproxy-1.8.3.ebuild:
Disable silent make rules. Fix building with automake-1.13.
diff --git a/net-proxy/tinyproxy/files/tinyproxy-1.8.3.initd b/net-proxy/tinyproxy/files/tinyproxy-1.8.3.initd
new file mode 100644
index 000000000000..eed8f54d3d2e
--- /dev/null
+++ b/net-proxy/tinyproxy/files/tinyproxy-1.8.3.initd
@@ -0,0 +1,41 @@
+#!/sbin/runscript
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-proxy/tinyproxy/files/tinyproxy-1.8.3.initd,v 1.1 2013/05/29 17:48:35 flameeyes Exp $
+
+get_config() {
+ res=$(awk '$1 == "'$1'" { s=$2 } END { print s }' "$CONFFILE")
+
+ if [ "x$res" = "x" ]; then
+ echo "$2"
+ else
+ eval echo "$res"
+ fi
+}
+
+: ${CONFFILE:="/etc/${SVCNAME}.conf"}
+
+command=/usr/sbin/tinyproxy
+command_args="-c ${CONFFILE}"
+pidfile=$(get_config PidFile /var/run/tinyproxy/${SVCNAME}.pid)
+
+depend() {
+ config "$CONFFILE"
+
+ use dns
+
+ [ "$(get_config Syslog Off)" = "On" ] && \
+ use logger
+}
+
+start_pre() {
+ piddir=$(dirname ${pidfile})
+
+ if [ "${piddir}" = "/var/run" ]; then
+ eerror "Please change your PidFile settings to be within the"
+ eerror "/var/run/tinyproxy directory"
+ eend 1
+ else
+ checkpath -d -o $(get_config User tinyproxy):$(get_config Group tinyproxy) ${piddir}
+ fi
+}
diff --git a/net-proxy/tinyproxy/tinyproxy-1.8.3-r1.ebuild b/net-proxy/tinyproxy/tinyproxy-1.8.3-r1.ebuild
new file mode 100644
index 000000000000..a42382b3d6ad
--- /dev/null
+++ b/net-proxy/tinyproxy/tinyproxy-1.8.3-r1.ebuild
@@ -0,0 +1,78 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-proxy/tinyproxy/tinyproxy-1.8.3-r1.ebuild,v 1.1 2013/05/29 17:48:35 flameeyes Exp $
+
+EAPI=5
+inherit autotools eutils user
+
+DESCRIPTION="A lightweight HTTP/SSL proxy"
+HOMEPAGE="http://www.banu.com/tinyproxy/"
+SRC_URI="http://www.banu.com/pub/${PN}/1.8/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~ia64 ~ppc ~sparc ~x86"
+IUSE="test debug +filter-proxy minimal reverse-proxy
+ transparent-proxy +upstream-proxy +xtinyproxy-header"
+
+REQUIRED_USE="test? ( xtinyproxy-header )"
+
+DEPEND="
+ !minimal? ( app-text/asciidoc )
+"
+RDEPEND=""
+
+pkg_setup() {
+ enewgroup ${PN}
+ enewuser ${PN} "" "" "" ${PN}
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-1.8.1-ldflags.patch
+ use minimal && epatch "${FILESDIR}/${PN}-1.8.1-minimal.patch"
+ sed -i \
+ -e "s|nobody|${PN}|g" \
+ -e 's|/var/run/|/run/|g' \
+ etc/${PN}.conf.in || die "sed failed"
+ sed -i \
+ -e 's|AM_CONFIG_HEADER|AC_CONFIG_HEADERS|g' \
+ configure.ac || die
+ eautoreconf
+}
+
+src_configure() {
+ if use minimal; then
+ ln -s /bin/true "${T}"/a2x
+ export PATH="${T}:${PATH}"
+ fi
+ econf \
+ $(use_enable debug) \
+ $(use_enable filter-proxy filter) \
+ $(use_enable reverse-proxy reverse) \
+ $(use_enable transparent-proxy transparent) \
+ $(use_enable upstream-proxy upstream) \
+ $(use_enable xtinyproxy-header xtinyproxy) \
+ --disable-silent-rules \
+ --localstatedir=/var
+}
+
+src_test() {
+ # The make check target does not run the test suite
+ emake test
+}
+
+src_install() {
+ default
+
+ dodoc AUTHORS ChangeLog NEWS README TODO
+
+ diropts -m0775 -o ${PN} -g ${PN}
+ keepdir /var/log/${PN}
+
+ newinitd "${FILESDIR}"/${PN}-1.8.3.initd tinyproxy
+}
+
+pkg_postinst() {
+ elog "For filtering domains and URLs, enable filter option in the configuration"
+ elog "file and add them to the filter file (one domain or URL per line)."
+}