1 |
commit: a1a50581a871d592ee32588fa0be9963ff450b9f |
2 |
Author: Bertrand Jacquin <bertrand <AT> jacquin <DOT> bzh> |
3 |
AuthorDate: Sun Jan 7 17:47:37 2018 +0000 |
4 |
Commit: Christian Ruppert <idl0r <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Jan 8 09:02:25 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a1a50581 |
7 |
|
8 |
net-proxy/haproxy: Version bump |
9 |
|
10 |
Package-Manager: Portage-2.3.13, Repoman-2.3.3 |
11 |
Closes: https://github.com/gentoo/gentoo/pull/6785 |
12 |
|
13 |
net-proxy/haproxy/Manifest | 3 + |
14 |
net-proxy/haproxy/haproxy-1.6.14.ebuild | 158 ++++++++++++++++++++++++++++ |
15 |
net-proxy/haproxy/haproxy-1.7.10.ebuild | 159 ++++++++++++++++++++++++++++ |
16 |
net-proxy/haproxy/haproxy-1.8.3.ebuild | 169 ++++++++++++++++++++++++++++++ |
17 |
net-proxy/haproxy/haproxy-1.8.9999.ebuild | 169 ++++++++++++++++++++++++++++++ |
18 |
5 files changed, 658 insertions(+) |
19 |
|
20 |
diff --git a/net-proxy/haproxy/Manifest b/net-proxy/haproxy/Manifest |
21 |
index 1410afe88dc..cab1712ff76 100644 |
22 |
--- a/net-proxy/haproxy/Manifest |
23 |
+++ b/net-proxy/haproxy/Manifest |
24 |
@@ -2,5 +2,8 @@ DIST haproxy-1.5.14.tar.gz 1345345 BLAKE2B b2971826c81716f126e3f9cef9861c425a443 |
25 |
DIST haproxy-1.5.19.tar.gz 1362834 BLAKE2B 72543acf3e78b804e778746ae0dbd1a386e31c9f3f956d91da49e5c4c5f2ace8e46e99372148e7cb97f52a1812501c21319c06eb0230928522d674825b3b1e17 SHA512 3462458350d76fe5634428f7b443f21e2d8d4a171ab6254736db2d64587707d11d0df1d851d629c5a2cdfb2858e98cc9345d592859c6d6d8a352b57542dc465a |
26 |
DIST haproxy-1.6.11.tar.gz 1574029 BLAKE2B 553f74c2c24a1b07cef2acc6fbc4def1bbe81e41a7b01ba44937c6ff2e14c1f1a4f1472dde229ecef1ed3170f4e89d356324cb2ce1e7d7064837f37fbd4c3b46 SHA512 73ff1c7301197b3bd75a3b1355787419676854d132ce2dcdacb2a296e297dcdfc52b0c571a4fb715e369f1126e1a58196fabb21f828c880f15904032da78e434 |
27 |
DIST haproxy-1.6.13.tar.gz 1580214 BLAKE2B 099ac0a13c899e247616845a32e8ae91c8ac4814ef971c332156ee46b2002774051953ddc6a8e36d38dcdbd3cac1d86be83f38b189b728e0f7089cc2bdcada37 SHA512 ffed3b347e0cd9cefdc379c91890a3c104d6848b976a9f28984878a9c2d05ca7ddea678f7a93f75cb9d29ae2be921e5a5bd295b1a8771765b099d1c619ded7a3 |
28 |
+DIST haproxy-1.6.14.tar.gz 1583859 BLAKE2B 91695f0b3d901ba70b6bce6572c2f549479c28010ed391b20faae7cd1fd84cdb181e560353337eb9230e38ac2570673725884c131501820c3ef4559ef12f95f2 SHA512 389be3935d901af1fb3a748b5bf73a454578a3ca3e4cc0b881980c2f1e875c47feb2681b42f8d9244d70777261a965c8e47cf5175b7790ff995bff8333902a11 |
29 |
+DIST haproxy-1.7.10.tar.gz 1750937 BLAKE2B 26d970862e415b079d4130fd00564677584a7aad74d6812cabed36de9a629321330434b7d4fdf7c2e8b2945b7f394ca33e444158e7fa9b49937db501ea33e78a SHA512 ca6c50848c559ee2ffb9af2d281c3931473dd90d1686d95d962cf604cd92d2feb2b63e006e217cf9078cf08fdd73dc523318c97e13400bc0ef325de47111394e |
30 |
DIST haproxy-1.7.9.tar.gz 1748159 BLAKE2B 6826ad3519ff300fb1c91992014834543f971fade8a8b89956d4cd1fc0000b1b3e259586a21ee9fa8ca0ee1f4520517dfc328d83d7a858f469f0366df6e3da43 SHA512 d1ed791bc9607dbeabcfc6a1853cf258e28b3a079923b63d3bf97504dd59e64a5f5f44f9da968c23c12b4279e8d45ff3bd39418942ca6f00d9d548c9a0ccfd73 |
31 |
DIST haproxy-1.8.1.tar.gz 2038215 BLAKE2B 85365fd581a665ec08eaf799a22cecdb95c59485f4846544aafdce38fce3819778d5adb3a652e9b5560973fef4acd348d13f1d545ccd7abf7c9bc67ce1c82049 SHA512 c59bbd144afae01a3802065bf507dc1ca70f09e7112a9f502474ec6758d3ccab084550372562d2906f1e0b9509464e316ca6f95e3575d7273aba49f350791caa |
32 |
+DIST haproxy-1.8.3.tar.gz 2043861 BLAKE2B 7da143e783cf443f148389947361f0116428c694d68451b6a9c684547d7dbdc89b25b43bad72f94337d143a2c1c185776a12008d969f985605e2601eb58ccd11 SHA512 6118ccbcfe07d96c2cce1a78c30db9c428f8b64e64fc3f5660392a501ecbaefdc5b10bea2f65c6bb3d8e7763b3e17db4ee34e13f689474f8243b52250e212600 |
33 |
|
34 |
diff --git a/net-proxy/haproxy/haproxy-1.6.14.ebuild b/net-proxy/haproxy/haproxy-1.6.14.ebuild |
35 |
new file mode 100644 |
36 |
index 00000000000..236fc4ec8bd |
37 |
--- /dev/null |
38 |
+++ b/net-proxy/haproxy/haproxy-1.6.14.ebuild |
39 |
@@ -0,0 +1,158 @@ |
40 |
+# Copyright 1999-2018 Gentoo Foundation |
41 |
+# Distributed under the terms of the GNU General Public License v2 |
42 |
+ |
43 |
+EAPI="6" |
44 |
+ |
45 |
+[[ ${PV} == *9999 ]] && SCM="git-r3" |
46 |
+inherit user versionator toolchain-funcs flag-o-matic systemd linux-info $SCM |
47 |
+ |
48 |
+MY_P="${PN}-${PV/_beta/-dev}" |
49 |
+ |
50 |
+DESCRIPTION="A TCP/HTTP reverse proxy for high availability environments" |
51 |
+HOMEPAGE="http://haproxy.1wt.eu" |
52 |
+if [[ ${PV} != *9999 ]]; then |
53 |
+ SRC_URI="http://haproxy.1wt.eu/download/$(get_version_component_range 1-2)/src/${MY_P}.tar.gz" |
54 |
+ KEYWORDS="~amd64 ~arm ~ppc ~x86" |
55 |
+else |
56 |
+ EGIT_REPO_URI="http://git.haproxy.org/git/haproxy-$(get_version_component_range 1-2).git/" |
57 |
+ EGIT_BRANCH=master |
58 |
+fi |
59 |
+ |
60 |
+LICENSE="GPL-2 LGPL-2.1" |
61 |
+SLOT="0" |
62 |
+IUSE="+crypt doc examples libressl slz net_ns +pcre pcre-jit ssl tools vim-syntax +zlib lua device-atlas 51degrees wurfl" |
63 |
+REQUIRED_USE="pcre-jit? ( pcre ) |
64 |
+ ?? ( slz zlib )" |
65 |
+ |
66 |
+DEPEND=" |
67 |
+ pcre? ( |
68 |
+ dev-libs/libpcre |
69 |
+ pcre-jit? ( dev-libs/libpcre[jit] ) |
70 |
+ ) |
71 |
+ ssl? ( |
72 |
+ !libressl? ( dev-libs/openssl:0=[zlib?] ) |
73 |
+ libressl? ( dev-libs/libressl:0= ) |
74 |
+ ) |
75 |
+ slz? ( dev-libs/libslz:= ) |
76 |
+ zlib? ( sys-libs/zlib ) |
77 |
+ lua? ( dev-lang/lua:5.3 ) |
78 |
+ device-atlas? ( dev-libs/device-atlas-api-c )" |
79 |
+RDEPEND="${DEPEND}" |
80 |
+ |
81 |
+S="${WORKDIR}/${MY_P}" |
82 |
+ |
83 |
+DOCS=( CHANGELOG CONTRIBUTING MAINTAINERS README ) |
84 |
+version_is_at_least 1.7.0 $PV && PATCHES=( "${FILESDIR}"/haproxy-1.7-contrib.patch ) |
85 |
+CONTRIBS=( halog iprange ) |
86 |
+# ip6range is present in 1.6, but broken. |
87 |
+version_is_at_least 1.7.0 $PV && CONTRIBS+=( ip6range spoa_example tcploop ) |
88 |
+ |
89 |
+haproxy_use() { |
90 |
+ (( $# != 2 )) && die "${FUNCNAME} <USE flag> <make option>" |
91 |
+ |
92 |
+ usex "${1}" "USE_${2}=1" "USE_${2}=" |
93 |
+} |
94 |
+ |
95 |
+pkg_setup() { |
96 |
+ enewgroup haproxy |
97 |
+ enewuser haproxy -1 -1 -1 haproxy |
98 |
+ |
99 |
+ if use net_ns; then |
100 |
+ CONFIG_CHECK="~NET_NS" |
101 |
+ linux-info_pkg_setup |
102 |
+ fi |
103 |
+} |
104 |
+ |
105 |
+src_compile() { |
106 |
+ local -a args=( |
107 |
+ TARGET=linux2628 |
108 |
+ USE_GETADDRINFO=1 |
109 |
+ USE_TFO=1 |
110 |
+ ) |
111 |
+ |
112 |
+ args+=( $(haproxy_use crypt LIBCRYPT) ) |
113 |
+ args+=( $(haproxy_use net_ns NS) ) |
114 |
+ args+=( $(haproxy_use pcre PCRE) ) |
115 |
+ args+=( $(haproxy_use pcre-jit PCRE_JIT) ) |
116 |
+ args+=( $(haproxy_use ssl OPENSSL) ) |
117 |
+ args+=( $(haproxy_use slz SLZ) ) |
118 |
+ args+=( $(haproxy_use zlib ZLIB) ) |
119 |
+ args+=( $(haproxy_use lua LUA) ) |
120 |
+ args+=( $(haproxy_use 51degrees 51DEGREES) ) |
121 |
+ args+=( $(haproxy_use device-atlas DEVICEATLAS) ) |
122 |
+ args+=( $(haproxy_use wurfl WURFL) ) |
123 |
+ |
124 |
+ # For now, until the strict-aliasing breakage will be fixed |
125 |
+ append-cflags -fno-strict-aliasing |
126 |
+ |
127 |
+ emake CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" CC=$(tc-getCC) ${args[@]} |
128 |
+ emake -C contrib/systemd SBINDIR=/usr/sbin |
129 |
+ |
130 |
+ if use tools ; then |
131 |
+ for contrib in ${CONTRIBS[@]} ; do |
132 |
+ emake -C contrib/${contrib} \ |
133 |
+ CFLAGS="${CFLAGS}" OPTIMIZE="${CFLAGS}" LDFLAGS="${LDFLAGS}" CC=$(tc-getCC) ${args[@]} |
134 |
+ done |
135 |
+ fi |
136 |
+} |
137 |
+ |
138 |
+src_install() { |
139 |
+ dosbin haproxy |
140 |
+ dosym /usr/sbin/haproxy /usr/bin/haproxy |
141 |
+ |
142 |
+ newconfd "${FILESDIR}/${PN}.confd" $PN |
143 |
+ newinitd "${FILESDIR}/${PN}.initd-r6" $PN |
144 |
+ |
145 |
+ doman doc/haproxy.1 |
146 |
+ |
147 |
+ dosbin haproxy-systemd-wrapper |
148 |
+ dosym /usr/sbin/haproxy-systemd-wrapper /usr/bin/haproxy-systemd-wrapper |
149 |
+ systemd_dounit contrib/systemd/haproxy.service |
150 |
+ |
151 |
+ einstalldocs |
152 |
+ |
153 |
+ # The errorfiles are used by upstream defaults. |
154 |
+ insinto /etc/haproxy/errors/ |
155 |
+ doins examples/errorfiles/* |
156 |
+ |
157 |
+ if use doc; then |
158 |
+ dodoc ROADMAP doc/*.txt |
159 |
+ #if use lua; then |
160 |
+ # TODO: doc/lua-api/ |
161 |
+ #fi |
162 |
+ fi |
163 |
+ |
164 |
+ if use tools ; then |
165 |
+ has halog "${CONTRIBS[@]}" && dobin contrib/halog/halog |
166 |
+ has "iprange" "${CONTRIBS[@]}" && newbin contrib/iprange/iprange haproxy_iprange |
167 |
+ has "ip6range" "${CONTRIBS[@]}" && newbin contrib/ip6range/ip6range haproxy_ip6range |
168 |
+ has "spoa_example" "${CONTRIBS[@]}" && newbin contrib/spoa_example/spoa haproxy_spoa_example |
169 |
+ has "spoa_example" "${CONTRIBS[@]}" && newdoc contrib/spoa_example/README README.spoa_example |
170 |
+ has "tcploop" "${CONTRIBS[@]}" && newbin contrib/tcploop/tcploop haproxy_tcploop |
171 |
+ fi |
172 |
+ |
173 |
+ if use examples ; then |
174 |
+ docinto examples |
175 |
+ dodoc examples/*.cfg |
176 |
+ dodoc examples/seamless_reload.txt |
177 |
+ fi |
178 |
+ |
179 |
+ if use vim-syntax ; then |
180 |
+ insinto /usr/share/vim/vimfiles/syntax |
181 |
+ doins examples/haproxy.vim |
182 |
+ fi |
183 |
+} |
184 |
+ |
185 |
+pkg_postinst() { |
186 |
+ if [[ ! -f "${EROOT}/etc/haproxy/haproxy.cfg" ]] ; then |
187 |
+ ewarn "You need to create /etc/haproxy/haproxy.cfg before you start the haproxy service." |
188 |
+ ewarn "It's best practice to not run haproxy as root, user and group haproxy was therefore created." |
189 |
+ ewarn "Make use of them with the \"user\" and \"group\" directives." |
190 |
+ |
191 |
+ if [[ -d "${EROOT}/usr/share/doc/${PF}" ]]; then |
192 |
+ einfo "Please consult the installed documentation for learning the configuration file's syntax." |
193 |
+ einfo "The documentation and sample configuration files are installed here:" |
194 |
+ einfo " ${EROOT}usr/share/doc/${PF}" |
195 |
+ fi |
196 |
+ fi |
197 |
+} |
198 |
|
199 |
diff --git a/net-proxy/haproxy/haproxy-1.7.10.ebuild b/net-proxy/haproxy/haproxy-1.7.10.ebuild |
200 |
new file mode 100644 |
201 |
index 00000000000..38e5fbe7304 |
202 |
--- /dev/null |
203 |
+++ b/net-proxy/haproxy/haproxy-1.7.10.ebuild |
204 |
@@ -0,0 +1,159 @@ |
205 |
+# Copyright 1999-2018 Gentoo Foundation |
206 |
+# Distributed under the terms of the GNU General Public License v2 |
207 |
+ |
208 |
+EAPI="6" |
209 |
+ |
210 |
+[[ ${PV} == *9999 ]] && SCM="git-r3" |
211 |
+inherit user versionator toolchain-funcs flag-o-matic systemd linux-info $SCM |
212 |
+ |
213 |
+MY_P="${PN}-${PV/_beta/-dev}" |
214 |
+ |
215 |
+DESCRIPTION="A TCP/HTTP reverse proxy for high availability environments" |
216 |
+HOMEPAGE="http://haproxy.1wt.eu" |
217 |
+if [[ ${PV} != *9999 ]]; then |
218 |
+ SRC_URI="http://haproxy.1wt.eu/download/$(get_version_component_range 1-2)/src/${MY_P}.tar.gz" |
219 |
+ KEYWORDS="~amd64 ~arm ~ppc ~x86" |
220 |
+else |
221 |
+ EGIT_REPO_URI="http://git.haproxy.org/git/haproxy-$(get_version_component_range 1-2).git/" |
222 |
+ EGIT_BRANCH=master |
223 |
+fi |
224 |
+ |
225 |
+LICENSE="GPL-2 LGPL-2.1" |
226 |
+SLOT="0" |
227 |
+IUSE="+crypt doc examples libressl slz net_ns +pcre pcre-jit ssl tools vim-syntax +zlib lua device-atlas 51degrees wurfl" |
228 |
+REQUIRED_USE="pcre-jit? ( pcre ) |
229 |
+ device-atlas? ( pcre ) |
230 |
+ ?? ( slz zlib )" |
231 |
+ |
232 |
+DEPEND=" |
233 |
+ pcre? ( |
234 |
+ dev-libs/libpcre |
235 |
+ pcre-jit? ( dev-libs/libpcre[jit] ) |
236 |
+ ) |
237 |
+ ssl? ( |
238 |
+ !libressl? ( dev-libs/openssl:0=[zlib?] ) |
239 |
+ libressl? ( dev-libs/libressl:0= ) |
240 |
+ ) |
241 |
+ slz? ( dev-libs/libslz:= ) |
242 |
+ zlib? ( sys-libs/zlib ) |
243 |
+ lua? ( dev-lang/lua:5.3 ) |
244 |
+ device-atlas? ( dev-libs/device-atlas-api-c )" |
245 |
+RDEPEND="${DEPEND}" |
246 |
+ |
247 |
+S="${WORKDIR}/${MY_P}" |
248 |
+ |
249 |
+DOCS=( CHANGELOG CONTRIBUTING MAINTAINERS README ) |
250 |
+version_is_at_least 1.7.0 $PV && PATCHES=( "${FILESDIR}"/haproxy-1.7-contrib.patch ) |
251 |
+CONTRIBS=( halog iprange ) |
252 |
+# ip6range is present in 1.6, but broken. |
253 |
+version_is_at_least 1.7.0 $PV && CONTRIBS+=( ip6range spoa_example tcploop ) |
254 |
+ |
255 |
+haproxy_use() { |
256 |
+ (( $# != 2 )) && die "${FUNCNAME} <USE flag> <make option>" |
257 |
+ |
258 |
+ usex "${1}" "USE_${2}=1" "USE_${2}=" |
259 |
+} |
260 |
+ |
261 |
+pkg_setup() { |
262 |
+ enewgroup haproxy |
263 |
+ enewuser haproxy -1 -1 -1 haproxy |
264 |
+ |
265 |
+ if use net_ns; then |
266 |
+ CONFIG_CHECK="~NET_NS" |
267 |
+ linux-info_pkg_setup |
268 |
+ fi |
269 |
+} |
270 |
+ |
271 |
+src_compile() { |
272 |
+ local -a args=( |
273 |
+ TARGET=linux2628 |
274 |
+ USE_GETADDRINFO=1 |
275 |
+ USE_TFO=1 |
276 |
+ ) |
277 |
+ |
278 |
+ args+=( $(haproxy_use crypt LIBCRYPT) ) |
279 |
+ args+=( $(haproxy_use net_ns NS) ) |
280 |
+ args+=( $(haproxy_use pcre PCRE) ) |
281 |
+ args+=( $(haproxy_use pcre-jit PCRE_JIT) ) |
282 |
+ args+=( $(haproxy_use ssl OPENSSL) ) |
283 |
+ args+=( $(haproxy_use slz SLZ) ) |
284 |
+ args+=( $(haproxy_use zlib ZLIB) ) |
285 |
+ args+=( $(haproxy_use lua LUA) ) |
286 |
+ args+=( $(haproxy_use 51degrees 51DEGREES) ) |
287 |
+ args+=( $(haproxy_use device-atlas DEVICEATLAS) ) |
288 |
+ args+=( $(haproxy_use wurfl WURFL) ) |
289 |
+ |
290 |
+ # For now, until the strict-aliasing breakage will be fixed |
291 |
+ append-cflags -fno-strict-aliasing |
292 |
+ |
293 |
+ emake CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" CC=$(tc-getCC) ${args[@]} |
294 |
+ emake -C contrib/systemd SBINDIR=/usr/sbin |
295 |
+ |
296 |
+ if use tools ; then |
297 |
+ for contrib in ${CONTRIBS[@]} ; do |
298 |
+ emake -C contrib/${contrib} \ |
299 |
+ CFLAGS="${CFLAGS}" OPTIMIZE="${CFLAGS}" LDFLAGS="${LDFLAGS}" CC=$(tc-getCC) ${args[@]} |
300 |
+ done |
301 |
+ fi |
302 |
+} |
303 |
+ |
304 |
+src_install() { |
305 |
+ dosbin haproxy |
306 |
+ dosym /usr/sbin/haproxy /usr/bin/haproxy |
307 |
+ |
308 |
+ newconfd "${FILESDIR}/${PN}.confd" $PN |
309 |
+ newinitd "${FILESDIR}/${PN}.initd-r6" $PN |
310 |
+ |
311 |
+ doman doc/haproxy.1 |
312 |
+ |
313 |
+ dosbin haproxy-systemd-wrapper |
314 |
+ dosym /usr/sbin/haproxy-systemd-wrapper /usr/bin/haproxy-systemd-wrapper |
315 |
+ systemd_dounit contrib/systemd/haproxy.service |
316 |
+ |
317 |
+ einstalldocs |
318 |
+ |
319 |
+ # The errorfiles are used by upstream defaults. |
320 |
+ insinto /etc/haproxy/errors/ |
321 |
+ doins examples/errorfiles/* |
322 |
+ |
323 |
+ if use doc; then |
324 |
+ dodoc ROADMAP doc/*.txt |
325 |
+ #if use lua; then |
326 |
+ # TODO: doc/lua-api/ |
327 |
+ #fi |
328 |
+ fi |
329 |
+ |
330 |
+ if use tools ; then |
331 |
+ has halog "${CONTRIBS[@]}" && dobin contrib/halog/halog |
332 |
+ has "iprange" "${CONTRIBS[@]}" && newbin contrib/iprange/iprange haproxy_iprange |
333 |
+ has "ip6range" "${CONTRIBS[@]}" && newbin contrib/ip6range/ip6range haproxy_ip6range |
334 |
+ has "spoa_example" "${CONTRIBS[@]}" && newbin contrib/spoa_example/spoa haproxy_spoa_example |
335 |
+ has "spoa_example" "${CONTRIBS[@]}" && newdoc contrib/spoa_example/README README.spoa_example |
336 |
+ has "tcploop" "${CONTRIBS[@]}" && newbin contrib/tcploop/tcploop haproxy_tcploop |
337 |
+ fi |
338 |
+ |
339 |
+ if use examples ; then |
340 |
+ docinto examples |
341 |
+ dodoc examples/*.cfg |
342 |
+ dodoc examples/seamless_reload.txt |
343 |
+ fi |
344 |
+ |
345 |
+ if use vim-syntax ; then |
346 |
+ insinto /usr/share/vim/vimfiles/syntax |
347 |
+ doins examples/haproxy.vim |
348 |
+ fi |
349 |
+} |
350 |
+ |
351 |
+pkg_postinst() { |
352 |
+ if [[ ! -f "${EROOT}/etc/haproxy/haproxy.cfg" ]] ; then |
353 |
+ ewarn "You need to create /etc/haproxy/haproxy.cfg before you start the haproxy service." |
354 |
+ ewarn "It's best practice to not run haproxy as root, user and group haproxy was therefore created." |
355 |
+ ewarn "Make use of them with the \"user\" and \"group\" directives." |
356 |
+ |
357 |
+ if [[ -d "${EROOT}/usr/share/doc/${PF}" ]]; then |
358 |
+ einfo "Please consult the installed documentation for learning the configuration file's syntax." |
359 |
+ einfo "The documentation and sample configuration files are installed here:" |
360 |
+ einfo " ${EROOT}usr/share/doc/${PF}" |
361 |
+ fi |
362 |
+ fi |
363 |
+} |
364 |
|
365 |
diff --git a/net-proxy/haproxy/haproxy-1.8.3.ebuild b/net-proxy/haproxy/haproxy-1.8.3.ebuild |
366 |
new file mode 100644 |
367 |
index 00000000000..7827f2e5bdd |
368 |
--- /dev/null |
369 |
+++ b/net-proxy/haproxy/haproxy-1.8.3.ebuild |
370 |
@@ -0,0 +1,169 @@ |
371 |
+# Copyright 1999-2018 Gentoo Foundation |
372 |
+# Distributed under the terms of the GNU General Public License v2 |
373 |
+ |
374 |
+EAPI="6" |
375 |
+ |
376 |
+[[ ${PV} == *9999 ]] && SCM="git-r3" |
377 |
+inherit user versionator toolchain-funcs flag-o-matic systemd linux-info $SCM |
378 |
+ |
379 |
+MY_P="${PN}-${PV/_beta/-dev}" |
380 |
+ |
381 |
+DESCRIPTION="A TCP/HTTP reverse proxy for high availability environments" |
382 |
+HOMEPAGE="http://haproxy.1wt.eu" |
383 |
+if [[ ${PV} != *9999 ]]; then |
384 |
+ SRC_URI="http://haproxy.1wt.eu/download/$(get_version_component_range 1-2)/src/${MY_P}.tar.gz" |
385 |
+ KEYWORDS="~amd64 ~arm ~ppc ~x86" |
386 |
+else |
387 |
+ EGIT_REPO_URI="http://git.haproxy.org/git/haproxy-$(get_version_component_range 1-2).git/" |
388 |
+ EGIT_BRANCH=master |
389 |
+fi |
390 |
+ |
391 |
+LICENSE="GPL-2 LGPL-2.1" |
392 |
+SLOT="0" |
393 |
+IUSE="+crypt doc examples libressl slz net_ns +pcre pcre-jit pcre2 pcre2-jit ssl |
394 |
+systemd +threads tools vim-syntax +zlib lua device-atlas 51degrees wurfl" |
395 |
+REQUIRED_USE="pcre-jit? ( pcre ) |
396 |
+ pcre2-jit? ( pcre2 ) |
397 |
+ pcre? ( !pcre2 ) |
398 |
+ device-atlas? ( pcre ) |
399 |
+ ?? ( slz zlib )" |
400 |
+ |
401 |
+DEPEND=" |
402 |
+ pcre? ( |
403 |
+ dev-libs/libpcre |
404 |
+ pcre-jit? ( dev-libs/libpcre[jit] ) |
405 |
+ ) |
406 |
+ pcre2? ( |
407 |
+ dev-libs/libpcre |
408 |
+ pcre2-jit? ( dev-libs/libpcre2[jit] ) |
409 |
+ ) |
410 |
+ ssl? ( |
411 |
+ !libressl? ( dev-libs/openssl:0=[zlib?] ) |
412 |
+ libressl? ( dev-libs/libressl:0= ) |
413 |
+ ) |
414 |
+ slz? ( dev-libs/libslz:= ) |
415 |
+ zlib? ( sys-libs/zlib ) |
416 |
+ lua? ( dev-lang/lua:5.3 ) |
417 |
+ device-atlas? ( dev-libs/device-atlas-api-c )" |
418 |
+RDEPEND="${DEPEND}" |
419 |
+ |
420 |
+S="${WORKDIR}/${MY_P}" |
421 |
+ |
422 |
+DOCS=( CHANGELOG CONTRIBUTING MAINTAINERS README ) |
423 |
+CONTRIBS=( halog iprange ) |
424 |
+# ip6range is present in 1.6, but broken. |
425 |
+version_is_at_least 1.7.0 $PV && CONTRIBS+=( ip6range spoa_example tcploop ) |
426 |
+# TODO: mod_defender - requires apache / APR, modsecurity - the same |
427 |
+version_is_at_least 1.8.0 $PV && CONTRIBS+=( hpack ) |
428 |
+ |
429 |
+haproxy_use() { |
430 |
+ (( $# != 2 )) && die "${FUNCNAME} <USE flag> <make option>" |
431 |
+ |
432 |
+ usex "${1}" "USE_${2}=1" "USE_${2}=" |
433 |
+} |
434 |
+ |
435 |
+pkg_setup() { |
436 |
+ enewgroup haproxy |
437 |
+ enewuser haproxy -1 -1 -1 haproxy |
438 |
+ |
439 |
+ if use net_ns; then |
440 |
+ CONFIG_CHECK="~NET_NS" |
441 |
+ linux-info_pkg_setup |
442 |
+ fi |
443 |
+} |
444 |
+ |
445 |
+src_compile() { |
446 |
+ local -a args=( |
447 |
+ TARGET=linux2628 |
448 |
+ USE_GETADDRINFO=1 |
449 |
+ USE_TFO=1 |
450 |
+ ) |
451 |
+ |
452 |
+ # TODO: PCRE2_WIDTH? |
453 |
+ args+=( $(haproxy_use threads THREAD) ) |
454 |
+ args+=( $(haproxy_use crypt LIBCRYPT) ) |
455 |
+ args+=( $(haproxy_use net_ns NS) ) |
456 |
+ args+=( $(haproxy_use pcre PCRE) ) |
457 |
+ args+=( $(haproxy_use pcre-jit PCRE_JIT) ) |
458 |
+ args+=( $(haproxy_use ssl OPENSSL) ) |
459 |
+ args+=( $(haproxy_use slz SLZ) ) |
460 |
+ args+=( $(haproxy_use zlib ZLIB) ) |
461 |
+ args+=( $(haproxy_use lua LUA) ) |
462 |
+ args+=( $(haproxy_use 51degrees 51DEGREES) ) |
463 |
+ args+=( $(haproxy_use device-atlas DEVICEATLAS) ) |
464 |
+ args+=( $(haproxy_use wurfl WURFL) ) |
465 |
+ args+=( $(haproxy_use systemd SYSTEMD) ) |
466 |
+ |
467 |
+ # For now, until the strict-aliasing breakage will be fixed |
468 |
+ append-cflags -fno-strict-aliasing |
469 |
+ |
470 |
+ emake CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" CC=$(tc-getCC) ${args[@]} |
471 |
+ emake -C contrib/systemd SBINDIR=/usr/sbin |
472 |
+ |
473 |
+ if use tools ; then |
474 |
+ for contrib in ${CONTRIBS[@]} ; do |
475 |
+ emake -C contrib/${contrib} \ |
476 |
+ CFLAGS="${CFLAGS}" OPTIMIZE="${CFLAGS}" LDFLAGS="${LDFLAGS}" CC=$(tc-getCC) ${args[@]} |
477 |
+ done |
478 |
+ fi |
479 |
+} |
480 |
+ |
481 |
+src_install() { |
482 |
+ dosbin haproxy |
483 |
+ dosym /usr/sbin/haproxy /usr/bin/haproxy |
484 |
+ |
485 |
+ newconfd "${FILESDIR}/${PN}.confd" $PN |
486 |
+ newinitd "${FILESDIR}/${PN}.initd-r6" $PN |
487 |
+ |
488 |
+ doman doc/haproxy.1 |
489 |
+ |
490 |
+ systemd_dounit contrib/systemd/haproxy.service |
491 |
+ |
492 |
+ einstalldocs |
493 |
+ |
494 |
+ # The errorfiles are used by upstream defaults. |
495 |
+ insinto /etc/haproxy/errors/ |
496 |
+ doins examples/errorfiles/* |
497 |
+ |
498 |
+ if use doc; then |
499 |
+ dodoc ROADMAP doc/*.txt |
500 |
+ #if use lua; then |
501 |
+ # TODO: doc/lua-api/ |
502 |
+ #fi |
503 |
+ fi |
504 |
+ |
505 |
+ if use tools ; then |
506 |
+ has halog "${CONTRIBS[@]}" && dobin contrib/halog/halog |
507 |
+ has "iprange" "${CONTRIBS[@]}" && newbin contrib/iprange/iprange haproxy_iprange |
508 |
+ has "ip6range" "${CONTRIBS[@]}" && newbin contrib/ip6range/ip6range haproxy_ip6range |
509 |
+ has "spoa_example" "${CONTRIBS[@]}" && newbin contrib/spoa_example/spoa haproxy_spoa_example |
510 |
+ has "spoa_example" "${CONTRIBS[@]}" && newdoc contrib/spoa_example/README README.spoa_example |
511 |
+ has "tcploop" "${CONTRIBS[@]}" && newbin contrib/tcploop/tcploop haproxy_tcploop |
512 |
+ has "hpack" "${CONTRIBS[@]}" && newbin contrib/hpack/gen-rht haproxy_hpack |
513 |
+ fi |
514 |
+ |
515 |
+ if use examples ; then |
516 |
+ docinto examples |
517 |
+ dodoc examples/*.cfg |
518 |
+ dodoc examples/seamless_reload.txt |
519 |
+ fi |
520 |
+ |
521 |
+ if use vim-syntax ; then |
522 |
+ insinto /usr/share/vim/vimfiles/syntax |
523 |
+ doins examples/haproxy.vim |
524 |
+ fi |
525 |
+} |
526 |
+ |
527 |
+pkg_postinst() { |
528 |
+ if [[ ! -f "${EROOT}/etc/haproxy/haproxy.cfg" ]] ; then |
529 |
+ ewarn "You need to create /etc/haproxy/haproxy.cfg before you start the haproxy service." |
530 |
+ ewarn "It's best practice to not run haproxy as root, user and group haproxy was therefore created." |
531 |
+ ewarn "Make use of them with the \"user\" and \"group\" directives." |
532 |
+ |
533 |
+ if [[ -d "${EROOT}/usr/share/doc/${PF}" ]]; then |
534 |
+ einfo "Please consult the installed documentation for learning the configuration file's syntax." |
535 |
+ einfo "The documentation and sample configuration files are installed here:" |
536 |
+ einfo " ${EROOT}usr/share/doc/${PF}" |
537 |
+ fi |
538 |
+ fi |
539 |
+} |
540 |
|
541 |
diff --git a/net-proxy/haproxy/haproxy-1.8.9999.ebuild b/net-proxy/haproxy/haproxy-1.8.9999.ebuild |
542 |
new file mode 100644 |
543 |
index 00000000000..7827f2e5bdd |
544 |
--- /dev/null |
545 |
+++ b/net-proxy/haproxy/haproxy-1.8.9999.ebuild |
546 |
@@ -0,0 +1,169 @@ |
547 |
+# Copyright 1999-2018 Gentoo Foundation |
548 |
+# Distributed under the terms of the GNU General Public License v2 |
549 |
+ |
550 |
+EAPI="6" |
551 |
+ |
552 |
+[[ ${PV} == *9999 ]] && SCM="git-r3" |
553 |
+inherit user versionator toolchain-funcs flag-o-matic systemd linux-info $SCM |
554 |
+ |
555 |
+MY_P="${PN}-${PV/_beta/-dev}" |
556 |
+ |
557 |
+DESCRIPTION="A TCP/HTTP reverse proxy for high availability environments" |
558 |
+HOMEPAGE="http://haproxy.1wt.eu" |
559 |
+if [[ ${PV} != *9999 ]]; then |
560 |
+ SRC_URI="http://haproxy.1wt.eu/download/$(get_version_component_range 1-2)/src/${MY_P}.tar.gz" |
561 |
+ KEYWORDS="~amd64 ~arm ~ppc ~x86" |
562 |
+else |
563 |
+ EGIT_REPO_URI="http://git.haproxy.org/git/haproxy-$(get_version_component_range 1-2).git/" |
564 |
+ EGIT_BRANCH=master |
565 |
+fi |
566 |
+ |
567 |
+LICENSE="GPL-2 LGPL-2.1" |
568 |
+SLOT="0" |
569 |
+IUSE="+crypt doc examples libressl slz net_ns +pcre pcre-jit pcre2 pcre2-jit ssl |
570 |
+systemd +threads tools vim-syntax +zlib lua device-atlas 51degrees wurfl" |
571 |
+REQUIRED_USE="pcre-jit? ( pcre ) |
572 |
+ pcre2-jit? ( pcre2 ) |
573 |
+ pcre? ( !pcre2 ) |
574 |
+ device-atlas? ( pcre ) |
575 |
+ ?? ( slz zlib )" |
576 |
+ |
577 |
+DEPEND=" |
578 |
+ pcre? ( |
579 |
+ dev-libs/libpcre |
580 |
+ pcre-jit? ( dev-libs/libpcre[jit] ) |
581 |
+ ) |
582 |
+ pcre2? ( |
583 |
+ dev-libs/libpcre |
584 |
+ pcre2-jit? ( dev-libs/libpcre2[jit] ) |
585 |
+ ) |
586 |
+ ssl? ( |
587 |
+ !libressl? ( dev-libs/openssl:0=[zlib?] ) |
588 |
+ libressl? ( dev-libs/libressl:0= ) |
589 |
+ ) |
590 |
+ slz? ( dev-libs/libslz:= ) |
591 |
+ zlib? ( sys-libs/zlib ) |
592 |
+ lua? ( dev-lang/lua:5.3 ) |
593 |
+ device-atlas? ( dev-libs/device-atlas-api-c )" |
594 |
+RDEPEND="${DEPEND}" |
595 |
+ |
596 |
+S="${WORKDIR}/${MY_P}" |
597 |
+ |
598 |
+DOCS=( CHANGELOG CONTRIBUTING MAINTAINERS README ) |
599 |
+CONTRIBS=( halog iprange ) |
600 |
+# ip6range is present in 1.6, but broken. |
601 |
+version_is_at_least 1.7.0 $PV && CONTRIBS+=( ip6range spoa_example tcploop ) |
602 |
+# TODO: mod_defender - requires apache / APR, modsecurity - the same |
603 |
+version_is_at_least 1.8.0 $PV && CONTRIBS+=( hpack ) |
604 |
+ |
605 |
+haproxy_use() { |
606 |
+ (( $# != 2 )) && die "${FUNCNAME} <USE flag> <make option>" |
607 |
+ |
608 |
+ usex "${1}" "USE_${2}=1" "USE_${2}=" |
609 |
+} |
610 |
+ |
611 |
+pkg_setup() { |
612 |
+ enewgroup haproxy |
613 |
+ enewuser haproxy -1 -1 -1 haproxy |
614 |
+ |
615 |
+ if use net_ns; then |
616 |
+ CONFIG_CHECK="~NET_NS" |
617 |
+ linux-info_pkg_setup |
618 |
+ fi |
619 |
+} |
620 |
+ |
621 |
+src_compile() { |
622 |
+ local -a args=( |
623 |
+ TARGET=linux2628 |
624 |
+ USE_GETADDRINFO=1 |
625 |
+ USE_TFO=1 |
626 |
+ ) |
627 |
+ |
628 |
+ # TODO: PCRE2_WIDTH? |
629 |
+ args+=( $(haproxy_use threads THREAD) ) |
630 |
+ args+=( $(haproxy_use crypt LIBCRYPT) ) |
631 |
+ args+=( $(haproxy_use net_ns NS) ) |
632 |
+ args+=( $(haproxy_use pcre PCRE) ) |
633 |
+ args+=( $(haproxy_use pcre-jit PCRE_JIT) ) |
634 |
+ args+=( $(haproxy_use ssl OPENSSL) ) |
635 |
+ args+=( $(haproxy_use slz SLZ) ) |
636 |
+ args+=( $(haproxy_use zlib ZLIB) ) |
637 |
+ args+=( $(haproxy_use lua LUA) ) |
638 |
+ args+=( $(haproxy_use 51degrees 51DEGREES) ) |
639 |
+ args+=( $(haproxy_use device-atlas DEVICEATLAS) ) |
640 |
+ args+=( $(haproxy_use wurfl WURFL) ) |
641 |
+ args+=( $(haproxy_use systemd SYSTEMD) ) |
642 |
+ |
643 |
+ # For now, until the strict-aliasing breakage will be fixed |
644 |
+ append-cflags -fno-strict-aliasing |
645 |
+ |
646 |
+ emake CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" CC=$(tc-getCC) ${args[@]} |
647 |
+ emake -C contrib/systemd SBINDIR=/usr/sbin |
648 |
+ |
649 |
+ if use tools ; then |
650 |
+ for contrib in ${CONTRIBS[@]} ; do |
651 |
+ emake -C contrib/${contrib} \ |
652 |
+ CFLAGS="${CFLAGS}" OPTIMIZE="${CFLAGS}" LDFLAGS="${LDFLAGS}" CC=$(tc-getCC) ${args[@]} |
653 |
+ done |
654 |
+ fi |
655 |
+} |
656 |
+ |
657 |
+src_install() { |
658 |
+ dosbin haproxy |
659 |
+ dosym /usr/sbin/haproxy /usr/bin/haproxy |
660 |
+ |
661 |
+ newconfd "${FILESDIR}/${PN}.confd" $PN |
662 |
+ newinitd "${FILESDIR}/${PN}.initd-r6" $PN |
663 |
+ |
664 |
+ doman doc/haproxy.1 |
665 |
+ |
666 |
+ systemd_dounit contrib/systemd/haproxy.service |
667 |
+ |
668 |
+ einstalldocs |
669 |
+ |
670 |
+ # The errorfiles are used by upstream defaults. |
671 |
+ insinto /etc/haproxy/errors/ |
672 |
+ doins examples/errorfiles/* |
673 |
+ |
674 |
+ if use doc; then |
675 |
+ dodoc ROADMAP doc/*.txt |
676 |
+ #if use lua; then |
677 |
+ # TODO: doc/lua-api/ |
678 |
+ #fi |
679 |
+ fi |
680 |
+ |
681 |
+ if use tools ; then |
682 |
+ has halog "${CONTRIBS[@]}" && dobin contrib/halog/halog |
683 |
+ has "iprange" "${CONTRIBS[@]}" && newbin contrib/iprange/iprange haproxy_iprange |
684 |
+ has "ip6range" "${CONTRIBS[@]}" && newbin contrib/ip6range/ip6range haproxy_ip6range |
685 |
+ has "spoa_example" "${CONTRIBS[@]}" && newbin contrib/spoa_example/spoa haproxy_spoa_example |
686 |
+ has "spoa_example" "${CONTRIBS[@]}" && newdoc contrib/spoa_example/README README.spoa_example |
687 |
+ has "tcploop" "${CONTRIBS[@]}" && newbin contrib/tcploop/tcploop haproxy_tcploop |
688 |
+ has "hpack" "${CONTRIBS[@]}" && newbin contrib/hpack/gen-rht haproxy_hpack |
689 |
+ fi |
690 |
+ |
691 |
+ if use examples ; then |
692 |
+ docinto examples |
693 |
+ dodoc examples/*.cfg |
694 |
+ dodoc examples/seamless_reload.txt |
695 |
+ fi |
696 |
+ |
697 |
+ if use vim-syntax ; then |
698 |
+ insinto /usr/share/vim/vimfiles/syntax |
699 |
+ doins examples/haproxy.vim |
700 |
+ fi |
701 |
+} |
702 |
+ |
703 |
+pkg_postinst() { |
704 |
+ if [[ ! -f "${EROOT}/etc/haproxy/haproxy.cfg" ]] ; then |
705 |
+ ewarn "You need to create /etc/haproxy/haproxy.cfg before you start the haproxy service." |
706 |
+ ewarn "It's best practice to not run haproxy as root, user and group haproxy was therefore created." |
707 |
+ ewarn "Make use of them with the \"user\" and \"group\" directives." |
708 |
+ |
709 |
+ if [[ -d "${EROOT}/usr/share/doc/${PF}" ]]; then |
710 |
+ einfo "Please consult the installed documentation for learning the configuration file's syntax." |
711 |
+ einfo "The documentation and sample configuration files are installed here:" |
712 |
+ einfo " ${EROOT}usr/share/doc/${PF}" |
713 |
+ fi |
714 |
+ fi |
715 |
+} |