1 |
commit: 20317feb5adc8f6710bbf3798c35874e2b6cacad |
2 |
Author: Austin English <wizardedit <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue May 3 19:14:58 2016 +0000 |
4 |
Commit: Austin English <wizardedit <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue May 3 19:17:01 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=20317feb |
7 |
|
8 |
net-proxy/ziproxy: use #!/sbin/openrc-run instead of #!/sbin/runscript |
9 |
|
10 |
Gentoo-Bug: https://bugs.gentoo.org/573846 |
11 |
|
12 |
Package-Manager: portage-2.2.26 |
13 |
|
14 |
net-proxy/ziproxy/files/ziproxy.initd | 26 ---------- |
15 |
net-proxy/ziproxy/files/ziproxy.initd-r1 | 4 +- |
16 |
net-proxy/ziproxy/ziproxy-3.3.1-r1.ebuild | 86 +++++++++++++++++++++++++++++++ |
17 |
3 files changed, 88 insertions(+), 28 deletions(-) |
18 |
|
19 |
diff --git a/net-proxy/ziproxy/files/ziproxy.initd b/net-proxy/ziproxy/files/ziproxy.initd |
20 |
deleted file mode 100644 |
21 |
index 6b0cb89..0000000 |
22 |
--- a/net-proxy/ziproxy/files/ziproxy.initd |
23 |
+++ /dev/null |
24 |
@@ -1,26 +0,0 @@ |
25 |
-#!/sbin/runscript |
26 |
-# Copyright 1999-2008 Gentoo Foundation |
27 |
-# Distributed under the terms of the GNU General Public License v2 |
28 |
-# $Id$ |
29 |
- |
30 |
-depend() { |
31 |
- need net |
32 |
-} |
33 |
- |
34 |
-start() { |
35 |
- local OPT="-d" |
36 |
- ebegin "Starting ${SVCNAME}" |
37 |
- |
38 |
- [ -n "${CONFIG}" ] && OPT="${OPT} -c ${CONFIG}" |
39 |
- [ -n "${ONLYFROM}" ] && OPT="${OPT} -f ${ONLYFROM}" |
40 |
- |
41 |
- start-stop-daemon --start --pidfile /var/run/${SVCNAME}.pid \ |
42 |
- --chuid ziproxy:ziproxy --exec /usr/sbin/ziproxy -- ${OPT} > /var/run/${SVCNAME}.pid |
43 |
- eend $? |
44 |
-} |
45 |
- |
46 |
-stop() { |
47 |
- ebegin "Stopping ${SVCNAME}" |
48 |
- start-stop-daemon --stop --quiet --pidfile /var/run/${SVCNAME}.pid |
49 |
- eend $? |
50 |
-} |
51 |
|
52 |
diff --git a/net-proxy/ziproxy/files/ziproxy.initd-r1 b/net-proxy/ziproxy/files/ziproxy.initd-r1 |
53 |
index dae9551..f552307 100644 |
54 |
--- a/net-proxy/ziproxy/files/ziproxy.initd-r1 |
55 |
+++ b/net-proxy/ziproxy/files/ziproxy.initd-r1 |
56 |
@@ -1,5 +1,5 @@ |
57 |
-#!/sbin/runscript |
58 |
-# Copyright 1999-2015 Gentoo Foundation |
59 |
+#!/sbin/openrc-run |
60 |
+# Copyright 1999-2016 Gentoo Foundation |
61 |
# Distributed under the terms of the GNU General Public License v2 |
62 |
# $Id$ |
63 |
|
64 |
|
65 |
diff --git a/net-proxy/ziproxy/ziproxy-3.3.1-r1.ebuild b/net-proxy/ziproxy/ziproxy-3.3.1-r1.ebuild |
66 |
new file mode 100644 |
67 |
index 0000000..6ebbbf4 |
68 |
--- /dev/null |
69 |
+++ b/net-proxy/ziproxy/ziproxy-3.3.1-r1.ebuild |
70 |
@@ -0,0 +1,86 @@ |
71 |
+# Copyright 1999-2016 Gentoo Foundation |
72 |
+# Distributed under the terms of the GNU General Public License v2 |
73 |
+# $Id$ |
74 |
+ |
75 |
+EAPI=6 |
76 |
+inherit user |
77 |
+ |
78 |
+DESCRIPTION="A forwarding, non-caching, compressing web proxy server" |
79 |
+HOMEPAGE="http://ziproxy.sourceforge.net/" |
80 |
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.xz" |
81 |
+ |
82 |
+LICENSE="GPL-2" |
83 |
+SLOT="0" |
84 |
+KEYWORDS="~amd64 ~ppc ~sparc ~x86" |
85 |
+IUSE="jpeg2k sasl xinetd" |
86 |
+ |
87 |
+RDEPEND=" |
88 |
+ media-libs/giflib |
89 |
+ media-libs/libpng:0= |
90 |
+ virtual/jpeg |
91 |
+ sys-libs/zlib |
92 |
+ jpeg2k? ( media-libs/jasper ) |
93 |
+ sasl? ( dev-libs/cyrus-sasl ) |
94 |
+ xinetd? ( virtual/inetd ) |
95 |
+" |
96 |
+DEPEND="${RDEPEND} |
97 |
+ app-arch/xz-utils |
98 |
+" |
99 |
+ |
100 |
+pkg_setup() { |
101 |
+ enewgroup ziproxy |
102 |
+ enewuser ziproxy -1 -1 -1 ziproxy |
103 |
+} |
104 |
+ |
105 |
+src_prepare() { |
106 |
+ default |
107 |
+ |
108 |
+ # fix sample config file |
109 |
+ sed -i \ |
110 |
+ -e "s:/var/ziproxy/:/var/lib/ziproxy/:g" \ |
111 |
+ -e "s:%j-%Y.log:/var/log/ziproxy/%j-%Y.log:g" \ |
112 |
+ etc/ziproxy/ziproxy.conf || die |
113 |
+ |
114 |
+ # fix sample xinetd config |
115 |
+ sed -i \ |
116 |
+ -e "s:/usr/bin/:/usr/sbin/:g" \ |
117 |
+ -e "s:\(.*port.*\):\1\n\ttype\t\t\t= UNLISTED:g" \ |
118 |
+ -e "s:root:ziproxy:g" \ |
119 |
+ etc/xinetd.d/ziproxy || die |
120 |
+} |
121 |
+ |
122 |
+src_configure() { |
123 |
+ econf \ |
124 |
+ $(use_with jpeg2k jasper) \ |
125 |
+ $(use_with sasl sasl2) \ |
126 |
+ --with-cfgfile=/etc/ziproxy/ziproxy.conf |
127 |
+} |
128 |
+ |
129 |
+src_install() { |
130 |
+ emake DESTDIR="${D}" install |
131 |
+ |
132 |
+ dodir /usr/sbin |
133 |
+ mv -vf "${D}"usr/{,s}bin/ziproxy || die |
134 |
+ |
135 |
+ dobin src/tools/ziproxy_genhtml_stats.sh |
136 |
+ |
137 |
+ newinitd "${FILESDIR}"/${PN}.initd-r1 ${PN} |
138 |
+ newconfd "${FILESDIR}"/${PN}.confd ${PN} |
139 |
+ |
140 |
+ dodoc ChangeLog CREDITS README README.tools |
141 |
+ use jpeg2k && dodoc JPEG2000.txt |
142 |
+ |
143 |
+ insinto /etc |
144 |
+ doins -r etc/ziproxy |
145 |
+ |
146 |
+ insinto /var/lib/ziproxy/error |
147 |
+ doins var/ziproxy/error/*.html |
148 |
+ |
149 |
+ if use xinetd; then |
150 |
+ insinto /etc/xinetd.d |
151 |
+ doins etc/xinetd.d/ziproxy |
152 |
+ fi |
153 |
+ |
154 |
+ diropts -m0750 -o ziproxy -g ziproxy |
155 |
+ keepdir /var/log/ziproxy |
156 |
+} |