Gentoo Archives: gentoo-commits

From: Andrew Savchenko <bircoph@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-proxy/privoxy/files/, net-proxy/privoxy/
Date: Tue, 26 Apr 2016 04:28:43
Message-Id: 1461644883.e24cfec67aac1a94a06d29ab6c68eb73ca73850a.bircoph@gentoo
1 commit: e24cfec67aac1a94a06d29ab6c68eb73ca73850a
2 Author: Andrew Savchenko <bircoph <AT> gentoo <DOT> org>
3 AuthorDate: Tue Apr 26 04:28:03 2016 +0000
4 Commit: Andrew Savchenko <bircoph <AT> gentoo <DOT> org>
5 CommitDate: Tue Apr 26 04:28:03 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e24cfec6
7
8 net-proxy/privoxy: unloosing net dependency
9
10 use net is sufficient and required in some use cases
11
12 Package-Manager: portage-2.2.28
13 Signed-off-by: Andrew Savchenko <bircoph <AT> gentoo.org>
14
15 net-proxy/privoxy/files/privoxy.initd-3 | 29 ++++++++++
16 net-proxy/privoxy/privoxy-3.0.24-r2.ebuild | 89 ++++++++++++++++++++++++++++++
17 2 files changed, 118 insertions(+)
18
19 diff --git a/net-proxy/privoxy/files/privoxy.initd-3 b/net-proxy/privoxy/files/privoxy.initd-3
20 new file mode 100644
21 index 0000000..b71b69d
22 --- /dev/null
23 +++ b/net-proxy/privoxy/files/privoxy.initd-3
24 @@ -0,0 +1,29 @@
25 +#!/sbin/runscript
26 +# Copyright 1999-2004 Gentoo Foundation
27 +# Distributed under the terms of the GNU General Public License v2
28 +# $Id$
29 +
30 +CONFFILE=/etc/${SVCNAME}/config
31 +PIDFILE=/var/run/${SVCNAME}.pid
32 +
33 +depend() {
34 + use net
35 +}
36 +
37 +start() {
38 + if [ ! -f "${CONFFILE}" ]; then
39 + eerror "Configuration file ${CONFFILE} not found!"
40 + return 1
41 + fi
42 +
43 + ebegin "Starting ${SVCNAME}"
44 + start-stop-daemon --start --quiet --exec /usr/sbin/privoxy --pidfile "${PIDFILE}" \
45 + -- --pidfile "${PIDFILE}" --user privoxy.privoxy "${CONFFILE}" #2>/dev/null
46 + eend $?
47 +}
48 +
49 +stop() {
50 + ebegin "Stopping ${SVCNAME}"
51 + start-stop-daemon --stop --quiet --pidfile "${PIDFILE}"
52 + eend $?
53 +}
54
55 diff --git a/net-proxy/privoxy/privoxy-3.0.24-r2.ebuild b/net-proxy/privoxy/privoxy-3.0.24-r2.ebuild
56 new file mode 100644
57 index 0000000..fbe8912
58 --- /dev/null
59 +++ b/net-proxy/privoxy/privoxy-3.0.24-r2.ebuild
60 @@ -0,0 +1,89 @@
61 +# Copyright 1999-2016 Gentoo Foundation
62 +# Distributed under the terms of the GNU General Public License v2
63 +# $Id$
64 +
65 +EAPI="5"
66 +
67 +inherit eutils toolchain-funcs autotools systemd user
68 +
69 +[ "${PV##*_}" = "beta" ] &&
70 + PRIVOXY_STATUS="beta" ||
71 + PRIVOXY_STATUS="stable"
72 +
73 +HOMEPAGE="http://www.privoxy.org http://sourceforge.net/projects/ijbswa/"
74 +DESCRIPTION="A web proxy with advanced filtering capabilities for enhancing privacy"
75 +SRC_URI="mirror://sourceforge/ijbswa/${P%_*}-${PRIVOXY_STATUS}-src.tar.gz"
76 +
77 +IUSE="+acl editor external-filters +fast-redirects +force graceful-termination
78 ++image-blocking ipv6 lfs png-images selinux +stats +threads toggle
79 +whitelists +zlib"
80 +SLOT="0"
81 +KEYWORDS="~alpha ~amd64 ~arm ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
82 +LICENSE="GPL-2"
83 +
84 +DEPEND="dev-libs/libpcre
85 + zlib? ( sys-libs/zlib )"
86 +RDEPEND="${DEPEND}
87 + selinux? ( sec-policy/selinux-privoxy )"
88 +
89 +REQUIRED_USE="toggle? ( editor )"
90 +
91 +S="${WORKDIR}/${P%_*}-${PRIVOXY_STATUS}"
92 +
93 +pkg_pretend() {
94 + if ! use threads; then
95 + ewarn
96 + ewarn "Privoxy may be very slow without threads support, consider to enable them."
97 + ewarn "See also http://www.privoxy.org/faq/trouble.html#GENTOO-RICERS"
98 + ewarn
99 + fi
100 +}
101 +
102 +pkg_setup() {
103 + enewgroup privoxy
104 + enewuser privoxy -1 -1 /etc/privoxy privoxy
105 +}
106 +
107 +src_prepare() {
108 + epatch "${FILESDIR}"/${PN}-3.0.19-gentoo.patch
109 + # autoreconf needs to be called even if we don't modify any autotools source files
110 + # See main makefile
111 + eautoreconf
112 +}
113 +
114 +src_configure() {
115 + econf \
116 + $(use_enable acl acl-support) \
117 + $(use_enable editor) \
118 + $(use_enable fast-redirects) \
119 + $(use_enable force) \
120 + $(use_enable graceful-termination) \
121 + $(use_enable image-blocking) \
122 + $(use_enable ipv6 ipv6-support) \
123 + $(use_enable lfs large-file-support) \
124 + $(use_enable png-images no-gifs) \
125 + $(use_enable stats) \
126 + $(use_enable threads pthread) \
127 + $(use_enable toggle) \
128 + $(use_enable whitelists trust-files) \
129 + $(use_enable zlib) \
130 + $(usex zlib --enable-compression "") \
131 + --enable-dynamic-pcre \
132 + --with-user=privoxy \
133 + --with-group=privoxy \
134 + --sysconfdir=/etc/privoxy \
135 + --docdir=/usr/share/doc/${PF}
136 +}
137 +
138 +src_install () {
139 + default
140 +
141 + newinitd "${FILESDIR}/privoxy.initd-3" privoxy
142 + systemd_dounit "${FILESDIR}"/${PN}.service
143 +
144 + insinto /etc/logrotate.d
145 + newins "${FILESDIR}/privoxy.logrotate" privoxy
146 +
147 + diropts -m 0750 -g privoxy -o privoxy
148 + keepdir /var/log/privoxy
149 +}