summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'net-proxy')
-rw-r--r--net-proxy/tinyproxy/ChangeLog11
-rw-r--r--net-proxy/tinyproxy/Manifest19
-rw-r--r--net-proxy/tinyproxy/files/tinyproxy-1.8.3-r2-DoS-Prevention.patch183
-rw-r--r--net-proxy/tinyproxy/files/tinyproxy-1.8.3-r2.initd41
-rw-r--r--net-proxy/tinyproxy/tinyproxy-1.8.3-r2.ebuild83
5 files changed, 322 insertions, 15 deletions
diff --git a/net-proxy/tinyproxy/ChangeLog b/net-proxy/tinyproxy/ChangeLog
index a51c6f5edb26..0055f9e3a5e6 100644
--- a/net-proxy/tinyproxy/ChangeLog
+++ b/net-proxy/tinyproxy/ChangeLog
@@ -1,15 +1,12 @@
-
-*tinyproxy-1.8.3-r1 (29 May 2013)
+# 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.42 2013/05/30 16:44:03 tomwij Exp $
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.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.
@@ -26,7 +23,7 @@
27 Aug 2011; Jeroen Roovers <jer@gentoo.org> -tinyproxy-1.6.3-r1.ebuild,
-tinyproxy-1.6.4.ebuild, -tinyproxy-1.6.5.ebuild, -tinyproxy-1.8.2.ebuild,
-files/tinyproxy-no-via.patch:
- ^
+ Removed old.
27 Aug 2011; Raúl Porcel <armin76@gentoo.org> tinyproxy-1.8.3.ebuild:
alpha/ia64/sparc stable wrt #363425
diff --git a/net-proxy/tinyproxy/Manifest b/net-proxy/tinyproxy/Manifest
index 435486c7fea8..289b5b5b9371 100644
--- a/net-proxy/tinyproxy/Manifest
+++ b/net-proxy/tinyproxy/Manifest
@@ -4,20 +4,23 @@ Hash: SHA256
AUX tinyproxy-1.8.1-ldflags.patch 306 SHA256 ab1377eb43902c44c44f29f82968f45852e33cd11345b20a24145e57492c1388 SHA512 d9daf50c1fcd2237ec59e7701adce76ba09347193439a1940c24e942600ab10bfc192e6c30a3fbcc3e1194f52b7aaab2fe5ef69468c01041f1a9d5fc6deacc8b WHIRLPOOL 0c0d9a5da91fc064c9b8a11d45f80bb15a106770939ed1b85ad173a9155319c53c9f01dc459095743d497543ca29fab4f654a9dea8dad30d6568972c2268b12b
AUX tinyproxy-1.8.1-minimal.patch 109 SHA256 c2ee0a0cd073f00b7ea37eff078f84eb790bf7bb478e79fad5b1731aaec8f5dc SHA512 56126f4e315dfade7983a9961ab3a30687e5fb575d9fd0964f081cb1e4be718f54b3999f69f769832717ebae1dd832aaff5e60289b465976b2f95325af48d79d WHIRLPOOL 21d98b7c45c30771917959c2603e8e5690c2e8e28e62286d3eef2b9b2e56dea43d963a2997280a24ddefd647e597c840498792a9cfc2aa2f4b7d741912e792ce
AUX tinyproxy-1.8.2.initd 1061 SHA256 0dfef44ab70710f75ce50d265a145afb3a88ca129776154eab93f17e8e56ca32 SHA512 758eaf0adc2fb787ea8d8aa61627dabf0c6266b583f55b08097b90a7fea250ff6762d8bb298e63ac7ef712f338f6d223a2d0817474ece6000638ff72aea286ae WHIRLPOOL 88f532f18c071e6d00c5821be5e7d57d1f3426df36a80a8a7fcf20893d6e1815f950ab169fd2560d8b95a8315173189b9e4b300566113e50f9281735fe4be754
+AUX tinyproxy-1.8.3-r2-DoS-Prevention.patch 6100 SHA256 34d666fecef0755bc42da2e102186f858f4966c47719ac864062050e1cf4b606 SHA512 ea023535ecf5fc9b0ab63d5e3ab4fe6222a54218de43894699ae742ff89e38ba65ea2a601f17de130e1169f37b0b7189ec55af471074222aecd827104d8f4ce0 WHIRLPOOL acaa8d758f1f616a0ef2a62a3cccf7f333cc77e54169994b5d424744211bdb2a25ed8db563e6106d6274ffc155403ac07d1496c0aaa181e55ffeca09b24c5ebc
+AUX tinyproxy-1.8.3-r2.initd 972 SHA256 a3ca891d28c32d05981f07133eac9011b7527a1c23b5cb74a72b271fe74c0e82 SHA512 8de35f369cd0422bb36787e30a538a5aa05eb9b1212edf05aa7fbd2649c24650903a6c58e6137928ca0fd70d931e72e7846d7c9be3fa03c3c2fb84c46812b7ea WHIRLPOOL e94ebc256ada917395c96932f45016a153b77fbb730e2f046df45827b14bd803eb9515524cca17e6958b3cd029f6480e91bc746b91f3e17f82411372cb7e2adc
AUX tinyproxy-1.8.3.initd 984 SHA256 c52848f594e38ce60695252a66bdb9961b36b1a71f392d99503341d8c45831d6 SHA512 92bc638b1bf688ae1590dc08943740a58554400c55f547d8e4856a932970bb04cb1fec93dfd0b11ffebcec96d37d19456541ed002e625fadb5c877b44ec30cea WHIRLPOOL 28d3676c2042c26942e4e555ced2ea009717931be500486392aa5cc6b1205d77c301c5e3854a97f2507c40a3864bd582c7a20fbb640be79436771424397d270d
DIST tinyproxy-1.8.3.tar.bz2 202430 SHA256 be559b54eb4772a703ad35239d1cb59d32f7cf8a739966742622d57df88b896e SHA512 69f1262b39d37f44a42621a0d25985632cdb790c8d9b49335a49a68c0f5237b97b111252856cba119895ac066770645560d2d7cd2de31f02103fa55fb4b3290c WHIRLPOOL f423b49e7cef6c98f69070e0598f4447cf8333cfc9e253dd6c459541922e5b2ed5c7604dc2e3f3de61a616d6381ff83df1625a8ad40a83d32d44f633ac98447c
EBUILD tinyproxy-1.8.3-r1.ebuild 1930 SHA256 75e882e4330d0c2ae785614bbfb5df697bc5be3b9cffc6d511e93f0554ecefcd SHA512 1d3d6d7be00da03ceb9d8fcb5091881c7e869e4cd9ee2e1a5ab7bebf7614186c8d609c890ad4fe48cd088f00764ad159ddb1b2a3277a25cab28dce5523f715f9 WHIRLPOOL 2831b83b25dadb86d5387a2508d2512bb5c657d2bfc59bdd1d9ad8a7ebfc5e8781f94f0e7602ca449d4d204b33764abaff36cf0499c1ec0a8351e54766fe12ed
+EBUILD tinyproxy-1.8.3-r2.ebuild 1965 SHA256 86584460e75cebd4a0e951ae9b3b8fb7ccb3bbf22b61aab8664d43d58d9af345 SHA512 889e5cbbdcc50c6a771f5ba3b7b9542dfe540be477aa9aed12c44b9c473950f82c11585d28d123000c4c5a7f9ac5cdd873b98b37b010fa2c7d86884fcdf70c20 WHIRLPOOL eaf331f6130d55d91a6c260051a95bb0dce1051c2e7b70452159f2296ffb7d4d67369d462757ec5c524f25bbd61d2bd3f1e6ea67f691efb19536ab6160e6c112
EBUILD tinyproxy-1.8.3.ebuild 2010 SHA256 548134e3ddf78e35a4b9bdb24adce3b7ba99f392a6fe75aca16954f753053175 SHA512 742142381d5739a08e1a38bfda0a9538fff5c735dcea3d277461831759efdeec2ff550af38eaca3bfce3dc83fe3804a0fca1757b07e95077171e3faacbee9157 WHIRLPOOL 21dd38747b955a501789a5b6a106c74aec8a4b321b0cba24dfbb1235cad132a651947945eb8cd4d1df3872c62aa7c116aad695fbbb8f711f4700c93590a251ae
-MISC ChangeLog 7821 SHA256 fda0d93c819710efbec05b1406c932aae918bae86848f9da8bc8711a8ff79c4a SHA512 7274d2591e4df63cb145af87199ec7563fe71ec03c8beaa3612078baf6a006952aaa2b8298f6834ea16aeea03e35993545a6bef6055a829449b26ddfa01ebbdb WHIRLPOOL fe113fc4aaae69fa3bd461ce91e2b81897796406654d1a714ab393e21860a2c3ab0d399bbfce3087958e05648d8149558e127f6d1bc85453d95fce3996df5e1c
+MISC ChangeLog 7793 SHA256 d03764c613c577fe55fbf4c5cae296f9cc9bd816f80d69195cc7855f6fb11932 SHA512 82234adbdf7fbe9cd491561eaaaaef84042572a36426f6828637684cc58f4fa503ba3b23fd88e39d69d86182526e21c2651e887a13abc1391a5c3e27623a21c6 WHIRLPOOL cc014148c0489853ae81be8299d7307a38e787679c9ca7f52c2e3af1d8219aaab0e4aed62f18c668b177793ab87048dc55332527c0429ecb26e57136bf550f7b
MISC metadata.xml 563 SHA256 63b326ce5e3bff142dc7b16631e44c60c4c0cfe8b0abac5a3545d5d2f5903c82 SHA512 17a7d6daa5078839088950ecb108ccae8336df44a94f07166940d63c6502d50177615c2c7227ced7d7ae43c34ff6984aa0d77c4301756ce76d1f1dee2b54ca48 WHIRLPOOL 5c382b5fd504088b464896c72655d5737338e98a3c8bec0450e97a7b95d96c29ad1aec9eaa88ff42d4a5134b1f7168ff6573cd38bab67bc004e34cbecf8c5a33
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.20 (GNU/Linux)
-iQEcBAEBCAAGBQJRpj94AAoJEBzRPIrUMBNCUAIH/RY+qOJg4JJPNThDoI3mygWs
-EwGdgJ7Z/jIKDH1Aw2SbRQGlQK+HnSCl1RIZYGurnJoBQqEybvojgogDPJnxt2Io
-O/f6t3RVgPsMQ+UBfKPra3q66D7eB18MXQehRPSDZp2+rjxmJ7czvhbFyHEMX2uX
-zsTa3G+tF9xtYsiBHBox3EcVHxcbayCYt8Z9Uerp63bhj+g79nWTwgR5p+RpHd42
-vTpEk32RTGE95LvpbNwy4jDUOExuGQW6L/aJWD55vV2/A3Ol6aaAswERVzj91lsv
-QCZR3CLyV0gSA9l+KIV1SnKl8KNaSsaQpoPNppvM7TSQNV4E+z8siu5advNb/50=
-=8ODO
+iQEcBAEBCAAGBQJRp4FbAAoJEJWyH81tNOV9LkQIAJ/h45mTikhtUwYYPk2DU3GT
+sJVRK4hWZA7asiqadk4vsDFUd6hVGiD4y2Ymo4jTzkOKgaa3GBBqYdK9txUak51V
+48xo1DSb+0XCskMX78pZJqD/1xTNluJCiECaCN2ceZwtRASkFBnyox+nwVLsWedF
+QCndcLvNBi9xco/ru94QkFAm5/N2KThPXJlIuE51yu3nPEV9g1ZE5I4ub9O9aB/I
+3geljVANHXpAwKn+oaXMltXy9ePYtxsLPmt4n3fqRZ5CqoaG8PKhORJlGeWsku8r
+phERYBHZRoayifGorEcAHdxYrhm57f/22JKGLCS2kSUKBeqGTHUFMAuquqyYBSg=
+=RiqY
-----END PGP SIGNATURE-----
diff --git a/net-proxy/tinyproxy/files/tinyproxy-1.8.3-r2-DoS-Prevention.patch b/net-proxy/tinyproxy/files/tinyproxy-1.8.3-r2-DoS-Prevention.patch
new file mode 100644
index 000000000000..059f178c1ee2
--- /dev/null
+++ b/net-proxy/tinyproxy/files/tinyproxy-1.8.3-r2-DoS-Prevention.patch
@@ -0,0 +1,183 @@
+https://banu.com/bugzilla/show_bug.cgi?id=110#c4
+
+From 526215dbb4abb1cff9a170343fa50dbda9492eb1 Mon Sep 17 00:00:00 2001
+From: Michael Adam <obnox@samba.org>
+Date: Fri, 15 Mar 2013 12:34:01 +0100
+Subject: [PATCH 1/2] [BB#110] secure the hashmaps by adding a seed
+
+Based on patch provided by gpernot@praksys.org on bugzilla.
+
+Signed-off-by: Michael Adam <obnox@samba.org>
+---
+ configure.ac | 2 ++
+ src/child.c | 1 +
+ src/hashmap.c | 14 ++++++++------
+ 3 files changed, 11 insertions(+), 6 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index ecbcba0..cc40e85 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -205,6 +205,8 @@ AC_CHECK_FUNCS([gethostname inet_ntoa memchr memset select socket strcasecmp \
+ AC_CHECK_FUNCS([isascii memcpy setrlimit ftruncate regcomp regexec])
+ AC_CHECK_FUNCS([strlcpy strlcat])
+
++AC_CHECK_FUNCS([time rand srand])
++
+
+ dnl Enable extra warnings
+ DESIRED_FLAGS="-fdiagnostics-show-option -Wall -Wextra -Wno-unused-parameter -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations -Wfloat-equal -Wundef -Wformat=2 -Wlogical-op -Wmissing-include-dirs -Wformat-nonliteral -Wold-style-definition -Wpointer-arith -Waggregate-return -Winit-self -Wpacked --std=c89 -ansi -pedantic -Wno-overlength-strings -Wc++-compat -Wno-long-long -Wno-overlength-strings -Wdeclaration-after-statement -Wredundant-decls -Wmissing-noreturn -Wshadow -Wendif-labels -Wcast-qual -Wcast-align -Wwrite-strings -Wp,-D_FORTIFY_SOURCE=2 -fno-common"
+diff --git a/src/child.c b/src/child.c
+index 34e20e0..0d778d9 100644
+--- a/src/child.c
++++ b/src/child.c
+@@ -196,6 +196,7 @@ static void child_main (struct child_s *ptr)
+ }
+
+ ptr->connects = 0;
++ srand(time(NULL));
+
+ while (!config.quit) {
+ ptr->status = T_WAITING;
+diff --git a/src/hashmap.c b/src/hashmap.c
+index f46fdcb..8cf7c6b 100644
+--- a/src/hashmap.c
++++ b/src/hashmap.c
+@@ -50,6 +50,7 @@ struct hashbucket_s {
+ };
+
+ struct hashmap_s {
++ uint32_t seed;
+ unsigned int size;
+ hashmap_iter end_iterator;
+
+@@ -65,7 +66,7 @@ struct hashmap_s {
+ *
+ * If any of the arguments are invalid a negative number is returned.
+ */
+-static int hashfunc (const char *key, unsigned int size)
++static int hashfunc (const char *key, unsigned int size, uint32_t seed)
+ {
+ uint32_t hash;
+
+@@ -74,7 +75,7 @@ static int hashfunc (const char *key, unsigned int size)
+ if (size == 0)
+ return -ERANGE;
+
+- for (hash = tolower (*key++); *key != '\0'; key++) {
++ for (hash = seed; *key != '\0'; key++) {
+ uint32_t bit = (hash & 1) ? (1 << (sizeof (uint32_t) - 1)) : 0;
+
+ hash >>= 1;
+@@ -104,6 +105,7 @@ hashmap_t hashmap_create (unsigned int nbuckets)
+ if (!ptr)
+ return NULL;
+
++ ptr->seed = (uint32_t)rand();
+ ptr->size = nbuckets;
+ ptr->buckets = (struct hashbucket_s *) safecalloc (nbuckets,
+ sizeof (struct
+@@ -201,7 +203,7 @@ hashmap_insert (hashmap_t map, const char *key, const void *data, size_t len)
+ if (!data || len < 1)
+ return -ERANGE;
+
+- hash = hashfunc (key, map->size);
++ hash = hashfunc (key, map->size, map->seed);
+ if (hash < 0)
+ return hash;
+
+@@ -382,7 +384,7 @@ ssize_t hashmap_search (hashmap_t map, const char *key)
+ if (map == NULL || key == NULL)
+ return -EINVAL;
+
+- hash = hashfunc (key, map->size);
++ hash = hashfunc (key, map->size, map->seed);
+ if (hash < 0)
+ return hash;
+
+@@ -416,7 +418,7 @@ ssize_t hashmap_entry_by_key (hashmap_t map, const char *key, void **data)
+ if (!map || !key || !data)
+ return -EINVAL;
+
+- hash = hashfunc (key, map->size);
++ hash = hashfunc (key, map->size, map->seed);
+ if (hash < 0)
+ return hash;
+
+@@ -451,7 +453,7 @@ ssize_t hashmap_remove (hashmap_t map, const char *key)
+ if (map == NULL || key == NULL)
+ return -EINVAL;
+
+- hash = hashfunc (key, map->size);
++ hash = hashfunc (key, map->size, map->seed);
+ if (hash < 0)
+ return hash;
+
+--
+1.7.9.5
+
+https://banu.com/bugzilla/show_bug.cgi?id=110#c5
+
+From f1189daec6866efeb44f24073cd19d7ece86e537 Mon Sep 17 00:00:00 2001
+From: Michael Adam <obnox@samba.org>
+Date: Fri, 15 Mar 2013 13:10:01 +0100
+Subject: [PATCH 2/2] [BB#110] limit the number of headers per request to
+ prevent DoS
+
+Based on patch provided by gpernot@praksys.org on bugzilla.
+
+Signed-off-by: Michael Adam <obnox@samba.org>
+---
+ src/reqs.c | 17 ++++++++++++++++-
+ 1 file changed, 16 insertions(+), 1 deletion(-)
+
+diff --git a/src/reqs.c b/src/reqs.c
+index 2de43a8..af014ba 100644
+--- a/src/reqs.c
++++ b/src/reqs.c
+@@ -611,12 +611,19 @@ add_header_to_connection (hashmap_t hashofheaders, char *header, size_t len)
+ }
+
+ /*
++ * define max number of headers.
++ * big enough to handle legitimate cases, but limited to avoid DoS
++ */
++#define MAX_HEADERS 10000
++
++/*
+ * Read all the headers from the stream
+ */
+ static int get_all_headers (int fd, hashmap_t hashofheaders)
+ {
+ char *line = NULL;
+ char *header = NULL;
++ int count;
+ char *tmp;
+ ssize_t linelen;
+ ssize_t len = 0;
+@@ -625,7 +632,7 @@ static int get_all_headers (int fd, hashmap_t hashofheaders)
+ assert (fd >= 0);
+ assert (hashofheaders != NULL);
+
+- for (;;) {
++ for (count = 0; count < MAX_HEADERS; count++) {
+ if ((linelen = readline (fd, &line)) <= 0) {
+ safefree (header);
+ safefree (line);
+@@ -691,6 +698,14 @@ static int get_all_headers (int fd, hashmap_t hashofheaders)
+
+ safefree (line);
+ }
++
++ /*
++ * if we get there, this is we reached MAX_HEADERS count
++ * bail out with error
++ */
++ safefree (header);
++ safefree (line);
++ return -1;
+ }
+
+ /*
+--
+1.7.9.5
diff --git a/net-proxy/tinyproxy/files/tinyproxy-1.8.3-r2.initd b/net-proxy/tinyproxy/files/tinyproxy-1.8.3-r2.initd
new file mode 100644
index 000000000000..6ae617907303
--- /dev/null
+++ b/net-proxy/tinyproxy/files/tinyproxy-1.8.3-r2.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-r2.initd,v 1.1 2013/05/30 16:44:03 tomwij 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 /run/tinyproxy/${SVCNAME}.pid)
+
+depend() {
+ config "$CONFFILE"
+
+ use dns
+
+ [ "$(get_config Syslog Off)" = "On" ] && \
+ use logger
+}
+
+start_pre() {
+ piddir=$(dirname ${pidfile})
+
+ if [ "${piddir}" = "/run" ]; then
+ eerror "Please change your PidFile settings to be within the"
+ eerror "/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-r2.ebuild b/net-proxy/tinyproxy/tinyproxy-1.8.3-r2.ebuild
new file mode 100644
index 000000000000..10f3953d11d4
--- /dev/null
+++ b/net-proxy/tinyproxy/tinyproxy-1.8.3-r2.ebuild
@@ -0,0 +1,83 @@
+# 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-r2.ebuild,v 1.1 2013/05/30 16:44:03 tomwij 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 )"
+
+pkg_setup() {
+ enewgroup ${PN}
+ enewuser ${PN} "" "" "" ${PN}
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-1.8.1-ldflags.patch
+ epatch "${FILESDIR}"/${PF}-DoS-Prevention.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}"/${PF}.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)."
+}