1 |
commit: 3e63846662dbf728f1d89f35530ebc858dd063bc |
2 |
Author: Christian Ruppert <idl0r <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Jan 10 08:34:38 2022 +0000 |
4 |
Commit: Christian Ruppert <idl0r <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Jan 10 08:34:43 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3e638466 |
7 |
|
8 |
net-proxy/haproxy: Bumps |
9 |
|
10 |
Package-Manager: Portage-3.0.28, Repoman-3.0.3 |
11 |
Signed-off-by: Christian Ruppert <idl0r <AT> gentoo.org> |
12 |
|
13 |
net-proxy/haproxy/Manifest | 2 + |
14 |
net-proxy/haproxy/haproxy-2.2.19.ebuild | 186 ++++++++++++++++++++++++++++++++ |
15 |
net-proxy/haproxy/haproxy-2.4.11.ebuild | 182 +++++++++++++++++++++++++++++++ |
16 |
3 files changed, 370 insertions(+) |
17 |
|
18 |
diff --git a/net-proxy/haproxy/Manifest b/net-proxy/haproxy/Manifest |
19 |
index e385baee5558..2341462fb9d8 100644 |
20 |
--- a/net-proxy/haproxy/Manifest |
21 |
+++ b/net-proxy/haproxy/Manifest |
22 |
@@ -2,6 +2,8 @@ DIST haproxy-2.0.25.tar.gz 2707840 BLAKE2B cd85d233623f2791bff8ada00d9ac4ea3743e |
23 |
DIST haproxy-2.0.26.tar.gz 2713209 BLAKE2B 9d33cc57d9b1761844fda05981ccddc4de6823a0c101b6fadf8ce2dbd0b1a76f2b4c2b6d5f9b656eabfc40af2dc750b81b922149583669f3e7001ba60525f488 SHA512 eae97096a66038fe8d5bd86b6a15ae679142593d3cb27ec0fd495fc16b926e58c9a25a6c050a310c450c7c167ac20fad46c60f31fe58dc1a1da11d987e8eed17 |
24 |
DIST haproxy-2.2.17.tar.gz 2933836 BLAKE2B 750d2c5048f994442d13c05ce6624731d296462951ee2e86110467d517a6708b498e98260a3f0770e110dc5c2cb2bdd746fb76f23ba7cebc1642b0b9c8124a67 SHA512 174197e1e0915a6ae6062b9a070f16102ac7f3429f991f36cdb2e2cce587bd26059bd1dc71a368f904bcdecd292ab5926715160400ae96d498d902aac356864f |
25 |
DIST haproxy-2.2.18.tar.gz 2940789 BLAKE2B e932c53b67052a2696a00cc9e0ee79ca2c7bdc5ba51bbb6c5bf3e7d5ef8bcf3c4e0f6524d40bcbc3342f86c3ddec6e27a0a2ad329ee5ad510260dc2f24b3913b SHA512 255b5d5984578a8d018b80e213ff2bca583de30d835aa3de345fabb05c229277d18007251b441dfdbf863e0297a2fa6e08e41b7b57dd76eba7f2e50879ae2cfa |
26 |
+DIST haproxy-2.2.19.tar.gz 2941835 BLAKE2B 9bb7d75b598b075de56c4647d954c1aa8e277de49f9938eb7e759b65ac59b6802561a29a206caaf6076d2d6111b1b0b39b7c60584e4389273d22525be28895e8 SHA512 bd27f6fa3555a8d1c0f9ea91132ea474e54a176847e090f3e2296dbc8e9e98ef3dbcc4440abccf5d65c8b8afae33e8e5e5472002a9abaa63de3eed4056e519f8 |
27 |
DIST haproxy-2.4.10.tar.gz 3605085 BLAKE2B c42bd0241b9bb6d5fd5d566871f9ade943530175cdaa399d1a9583d25efafb0e7fb067143d5bc99d0705b0264691efc57021adecbd5bfe5dbe42d1eebdae60c8 SHA512 116739dbef44164e9e7bf56855bebcb09a7678df688a607539aebde330844d4ae110b9e9e2f75b70ed7147d51154566968972d19ee6d45936bb3d0ed79c7d348 |
28 |
+DIST haproxy-2.4.11.tar.gz 3607391 BLAKE2B 82a0f46630f52dae7fa317ad01a5917f41b52fe4f290ab8f7767245e00ad149364e4138205b7707ee257d0148b47e34e2c3e8f1c54c2472834ad4261610dee19 SHA512 43cb03ac853c6bc8a5cdf50d7013dd3d24b44e72b5f13ee2feed01fe285e7129d254a99b98a9dbdfe16d2fed27749967b2eb7fdebbdd9790022c410f8df32a32 |
29 |
DIST haproxy-2.4.4.tar.gz 3587306 BLAKE2B 983f5919b738419d616b35c1cad6aa2400b0b857160ecfac3bcdfcc14c15280283ae3f33036652a3a9b5bfff0fbb6a54912807ea7c83c828d2b5ba72274fe1a8 SHA512 a8987e8342fdbec7e48de09a4391a67e77e05493260e0e561e8c185b6457b8e1086cc45ce04ebf3365699c008dff81667490e2fe99c33c0ac3c7513df8ae025c |
30 |
DIST haproxy-2.5.0.tar.gz 3803196 BLAKE2B 271661f685f4aa885e3cab75c4a0abeb9751a7cb4ceec3a71f475e75b635f8452857dcaa7b010c8d0621becb3ff7f5d49af8d7d758b30829ae99e153ebc85b56 SHA512 70068962a434e9ba4b2d7595b929aec618ee62d51935c9836f2617e639416e50077495bbf08dabbe7dd49f2d4e3942e55a96a5de33a7846377972fbc3eedc1d0 |
31 |
|
32 |
diff --git a/net-proxy/haproxy/haproxy-2.2.19.ebuild b/net-proxy/haproxy/haproxy-2.2.19.ebuild |
33 |
new file mode 100644 |
34 |
index 000000000000..3f411c90b78f |
35 |
--- /dev/null |
36 |
+++ b/net-proxy/haproxy/haproxy-2.2.19.ebuild |
37 |
@@ -0,0 +1,186 @@ |
38 |
+# Copyright 1999-2022 Gentoo Authors |
39 |
+# Distributed under the terms of the GNU General Public License v2 |
40 |
+ |
41 |
+EAPI="7" |
42 |
+ |
43 |
+LUA_COMPAT=( lua5-3 ) |
44 |
+ |
45 |
+[[ ${PV} == *9999 ]] && SCM="git-r3" |
46 |
+inherit toolchain-funcs flag-o-matic lua-single 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://www.haproxy.org" |
52 |
+if [[ ${PV} != *9999 ]]; then |
53 |
+ SRC_URI="http://haproxy.1wt.eu/download/$(ver_cut 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-$(ver_cut 1-2).git/" |
57 |
+ EGIT_BRANCH=master |
58 |
+fi |
59 |
+ |
60 |
+LICENSE="GPL-2 LGPL-2.1" |
61 |
+SLOT="0/$(ver_cut 1-2)" |
62 |
+IUSE="+crypt doc examples slz +net_ns +pcre pcre-jit pcre2 pcre2-jit prometheus-exporter |
63 |
+ssl systemd +threads tools vim-syntax +zlib lua device-atlas 51degrees wurfl" |
64 |
+REQUIRED_USE="pcre-jit? ( pcre ) |
65 |
+ pcre2-jit? ( pcre2 ) |
66 |
+ pcre? ( !pcre2 ) |
67 |
+ lua? ( ${LUA_REQUIRED_USE} ) |
68 |
+ device-atlas? ( pcre ) |
69 |
+ ?? ( slz zlib )" |
70 |
+ |
71 |
+BDEPEND="virtual/pkgconfig" |
72 |
+DEPEND=" |
73 |
+ crypt? ( virtual/libcrypt:= ) |
74 |
+ pcre? ( |
75 |
+ dev-libs/libpcre |
76 |
+ pcre-jit? ( dev-libs/libpcre[jit] ) |
77 |
+ ) |
78 |
+ pcre2? ( |
79 |
+ dev-libs/libpcre2:= |
80 |
+ pcre2-jit? ( dev-libs/libpcre2:=[jit] ) |
81 |
+ ) |
82 |
+ ssl? ( |
83 |
+ dev-libs/openssl:0= |
84 |
+ ) |
85 |
+ slz? ( dev-libs/libslz:= ) |
86 |
+ systemd? ( sys-apps/systemd ) |
87 |
+ zlib? ( sys-libs/zlib ) |
88 |
+ lua? ( ${LUA_DEPS} ) |
89 |
+ device-atlas? ( dev-libs/device-atlas-api-c )" |
90 |
+RDEPEND="${DEPEND} |
91 |
+ acct-group/haproxy |
92 |
+ acct-user/haproxy" |
93 |
+ |
94 |
+S="${WORKDIR}/${MY_P}" |
95 |
+ |
96 |
+DOCS=( CHANGELOG CONTRIBUTING MAINTAINERS README ) |
97 |
+CONTRIBS=( halog iprange ) |
98 |
+# ip6range is present in 1.6, but broken. |
99 |
+ver_test ${PV} -ge 1.7.0 && CONTRIBS+=( ip6range spoa_example tcploop ) |
100 |
+# TODO: mod_defender - requires apache / APR, modsecurity - the same |
101 |
+ver_test ${PV} -ge 1.8.0 && CONTRIBS+=( hpack ) |
102 |
+ |
103 |
+haproxy_use() { |
104 |
+ (( $# != 2 )) && die "${FUNCNAME} <USE flag> <make option>" |
105 |
+ |
106 |
+ usex "${1}" "USE_${2}=1" "USE_${2}=" |
107 |
+} |
108 |
+ |
109 |
+pkg_setup() { |
110 |
+ use lua && lua-single_pkg_setup |
111 |
+ if use net_ns; then |
112 |
+ CONFIG_CHECK="~NET_NS" |
113 |
+ linux-info_pkg_setup |
114 |
+ fi |
115 |
+} |
116 |
+ |
117 |
+src_compile() { |
118 |
+ local -a args=( |
119 |
+ V=1 |
120 |
+ TARGET=linux-glibc |
121 |
+ ) |
122 |
+ |
123 |
+ # TODO: PCRE2_WIDTH? |
124 |
+ args+=( $(haproxy_use threads THREAD) ) |
125 |
+ args+=( $(haproxy_use crypt LIBCRYPT) ) |
126 |
+ args+=( $(haproxy_use net_ns NS) ) |
127 |
+ args+=( $(haproxy_use pcre PCRE) ) |
128 |
+ args+=( $(haproxy_use pcre-jit PCRE_JIT) ) |
129 |
+ args+=( $(haproxy_use pcre2 PCRE2) ) |
130 |
+ args+=( $(haproxy_use pcre2-jit PCRE2_JIT) ) |
131 |
+ args+=( $(haproxy_use ssl OPENSSL) ) |
132 |
+ args+=( $(haproxy_use slz SLZ) ) |
133 |
+ args+=( $(haproxy_use zlib ZLIB) ) |
134 |
+ args+=( $(haproxy_use lua LUA) ) |
135 |
+ args+=( $(haproxy_use 51degrees 51DEGREES) ) |
136 |
+ args+=( $(haproxy_use device-atlas DEVICEATLAS) ) |
137 |
+ args+=( $(haproxy_use wurfl WURFL) ) |
138 |
+ args+=( $(haproxy_use systemd SYSTEMD) ) |
139 |
+ |
140 |
+ # For now, until the strict-aliasing breakage will be fixed |
141 |
+ append-cflags -fno-strict-aliasing |
142 |
+ |
143 |
+ # Bug #668002 |
144 |
+ if use ppc || use arm || use hppa; then |
145 |
+ TARGET_LDFLAGS=-latomic |
146 |
+ fi |
147 |
+ |
148 |
+ if use prometheus-exporter; then |
149 |
+ EXTRA_OBJS="contrib/prometheus-exporter/service-prometheus.o" |
150 |
+ fi |
151 |
+ |
152 |
+ # HAProxy really needs some of those "SPEC_CFLAGS", like -fno-strict-aliasing |
153 |
+ emake CFLAGS="${CFLAGS} \$(SPEC_CFLAGS)" LDFLAGS="${LDFLAGS}" CC=$(tc-getCC) EXTRA_OBJS="${EXTRA_OBJS}" TARGET_LDFLAGS="${TARGET_LDFLAGS}" ${args[@]} |
154 |
+ emake -C contrib/systemd SBINDIR=/usr/sbin |
155 |
+ |
156 |
+ if use tools ; then |
157 |
+ for contrib in ${CONTRIBS[@]} ; do |
158 |
+ # Those two includes are a workaround for hpack Makefile missing those |
159 |
+ emake -C contrib/${contrib} \ |
160 |
+ CFLAGS="${CFLAGS} -I../../include/ -I../../ebtree/" OPTIMIZE="${CFLAGS}" LDFLAGS="${LDFLAGS}" CC=$(tc-getCC) ${args[@]} |
161 |
+ done |
162 |
+ fi |
163 |
+} |
164 |
+ |
165 |
+src_install() { |
166 |
+ dosbin haproxy |
167 |
+ dosym ../sbin/haproxy /usr/bin/haproxy |
168 |
+ |
169 |
+ newconfd "${FILESDIR}/${PN}.confd" ${PN} |
170 |
+ newinitd "${FILESDIR}/${PN}.initd-r6" ${PN} |
171 |
+ |
172 |
+ doman doc/haproxy.1 |
173 |
+ |
174 |
+ systemd_dounit contrib/systemd/haproxy.service |
175 |
+ |
176 |
+ einstalldocs |
177 |
+ |
178 |
+ # The errorfiles are used by upstream defaults. |
179 |
+ insinto /etc/haproxy/errors/ |
180 |
+ doins examples/errorfiles/* |
181 |
+ |
182 |
+ if use doc; then |
183 |
+ dodoc ROADMAP doc/*.txt |
184 |
+ #if use lua; then |
185 |
+ # TODO: doc/lua-api/ |
186 |
+ #fi |
187 |
+ fi |
188 |
+ |
189 |
+ if use tools ; then |
190 |
+ has halog "${CONTRIBS[@]}" && dobin contrib/halog/halog |
191 |
+ has "iprange" "${CONTRIBS[@]}" && newbin contrib/iprange/iprange haproxy_iprange |
192 |
+ has "ip6range" "${CONTRIBS[@]}" && newbin contrib/ip6range/ip6range haproxy_ip6range |
193 |
+ has "spoa_example" "${CONTRIBS[@]}" && newbin contrib/spoa_example/spoa haproxy_spoa_example |
194 |
+ has "spoa_example" "${CONTRIBS[@]}" && newdoc contrib/spoa_example/README README.spoa_example |
195 |
+ has "tcploop" "${CONTRIBS[@]}" && newbin contrib/tcploop/tcploop haproxy_tcploop |
196 |
+ has "hpack" "${CONTRIBS[@]}" && newbin contrib/hpack/gen-rht haproxy_hpack |
197 |
+ fi |
198 |
+ |
199 |
+ if use examples ; then |
200 |
+ docinto examples |
201 |
+ dodoc examples/*.cfg |
202 |
+ dodoc doc/seamless_reload.txt |
203 |
+ fi |
204 |
+ |
205 |
+ if use vim-syntax ; then |
206 |
+ insinto /usr/share/vim/vimfiles/syntax |
207 |
+ doins contrib/syntax-highlight/haproxy.vim |
208 |
+ fi |
209 |
+} |
210 |
+ |
211 |
+pkg_postinst() { |
212 |
+ if [[ ! -f "${EROOT}/etc/haproxy/haproxy.cfg" ]] ; then |
213 |
+ ewarn "You need to create /etc/haproxy/haproxy.cfg before you start the haproxy service." |
214 |
+ ewarn "It's best practice to not run haproxy as root, user and group haproxy was therefore created." |
215 |
+ ewarn "Make use of them with the \"user\" and \"group\" directives." |
216 |
+ |
217 |
+ if [[ -d "${EROOT}/usr/share/doc/${PF}" ]]; then |
218 |
+ einfo "Please consult the installed documentation for learning the configuration file's syntax." |
219 |
+ einfo "The documentation and sample configuration files are installed here:" |
220 |
+ einfo " ${EROOT}/usr/share/doc/${PF}" |
221 |
+ fi |
222 |
+ fi |
223 |
+} |
224 |
|
225 |
diff --git a/net-proxy/haproxy/haproxy-2.4.11.ebuild b/net-proxy/haproxy/haproxy-2.4.11.ebuild |
226 |
new file mode 100644 |
227 |
index 000000000000..ba20ee3537d8 |
228 |
--- /dev/null |
229 |
+++ b/net-proxy/haproxy/haproxy-2.4.11.ebuild |
230 |
@@ -0,0 +1,182 @@ |
231 |
+# Copyright 1999-2022 Gentoo Authors |
232 |
+# Distributed under the terms of the GNU General Public License v2 |
233 |
+ |
234 |
+EAPI="7" |
235 |
+ |
236 |
+LUA_COMPAT=( lua5-3 ) |
237 |
+ |
238 |
+[[ ${PV} == *9999 ]] && SCM="git-r3" |
239 |
+inherit toolchain-funcs flag-o-matic lua-single systemd linux-info ${SCM} |
240 |
+ |
241 |
+MY_P="${PN}-${PV/_beta/-dev}" |
242 |
+ |
243 |
+DESCRIPTION="A TCP/HTTP reverse proxy for high availability environments" |
244 |
+HOMEPAGE="http://www.haproxy.org" |
245 |
+if [[ ${PV} != *9999 ]]; then |
246 |
+ SRC_URI="http://haproxy.1wt.eu/download/$(ver_cut 1-2)/src/${MY_P}.tar.gz" |
247 |
+ KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~x86" |
248 |
+else |
249 |
+ EGIT_REPO_URI="http://git.haproxy.org/git/haproxy-$(ver_cut 1-2).git/" |
250 |
+ EGIT_BRANCH=master |
251 |
+fi |
252 |
+ |
253 |
+LICENSE="GPL-2 LGPL-2.1" |
254 |
+SLOT="0/$(ver_cut 1-2)" |
255 |
+IUSE="+crypt doc examples +slz +net_ns +pcre pcre-jit pcre2 pcre2-jit prometheus-exporter |
256 |
+ssl systemd +threads tools vim-syntax zlib lua device-atlas 51degrees wurfl" |
257 |
+REQUIRED_USE="pcre-jit? ( pcre ) |
258 |
+ pcre2-jit? ( pcre2 ) |
259 |
+ pcre? ( !pcre2 ) |
260 |
+ lua? ( ${LUA_REQUIRED_USE} ) |
261 |
+ device-atlas? ( pcre ) |
262 |
+ ?? ( slz zlib )" |
263 |
+ |
264 |
+BDEPEND="virtual/pkgconfig" |
265 |
+DEPEND=" |
266 |
+ crypt? ( virtual/libcrypt:= ) |
267 |
+ pcre? ( |
268 |
+ dev-libs/libpcre |
269 |
+ pcre-jit? ( dev-libs/libpcre[jit] ) |
270 |
+ ) |
271 |
+ pcre2? ( |
272 |
+ dev-libs/libpcre2:= |
273 |
+ pcre2-jit? ( dev-libs/libpcre2:=[jit] ) |
274 |
+ ) |
275 |
+ ssl? ( |
276 |
+ dev-libs/openssl:0= |
277 |
+ ) |
278 |
+ systemd? ( sys-apps/systemd ) |
279 |
+ zlib? ( sys-libs/zlib ) |
280 |
+ lua? ( ${LUA_DEPS} ) |
281 |
+ device-atlas? ( dev-libs/device-atlas-api-c )" |
282 |
+RDEPEND="${DEPEND} |
283 |
+ acct-group/haproxy |
284 |
+ acct-user/haproxy" |
285 |
+ |
286 |
+S="${WORKDIR}/${MY_P}" |
287 |
+ |
288 |
+DOCS=( CHANGELOG CONTRIBUTING MAINTAINERS README ) |
289 |
+EXTRAS=( admin/halog admin/iprange dev/tcploop dev/hpack ) |
290 |
+ |
291 |
+haproxy_use() { |
292 |
+ (( $# != 2 )) && die "${FUNCNAME} <USE flag> <make option>" |
293 |
+ |
294 |
+ usex "${1}" "USE_${2}=1" "USE_${2}=" |
295 |
+} |
296 |
+ |
297 |
+pkg_setup() { |
298 |
+ use lua && lua-single_pkg_setup |
299 |
+ if use net_ns; then |
300 |
+ CONFIG_CHECK="~NET_NS" |
301 |
+ linux-info_pkg_setup |
302 |
+ fi |
303 |
+} |
304 |
+ |
305 |
+src_compile() { |
306 |
+ local -a args=( |
307 |
+ V=1 |
308 |
+ TARGET=linux-glibc |
309 |
+ ) |
310 |
+ |
311 |
+ # TODO: PCRE2_WIDTH? |
312 |
+ args+=( $(haproxy_use threads THREAD) ) |
313 |
+ args+=( $(haproxy_use crypt LIBCRYPT) ) |
314 |
+ args+=( $(haproxy_use net_ns NS) ) |
315 |
+ args+=( $(haproxy_use pcre PCRE) ) |
316 |
+ args+=( $(haproxy_use pcre-jit PCRE_JIT) ) |
317 |
+ args+=( $(haproxy_use pcre2 PCRE2) ) |
318 |
+ args+=( $(haproxy_use pcre2-jit PCRE2_JIT) ) |
319 |
+ args+=( $(haproxy_use ssl OPENSSL) ) |
320 |
+ args+=( $(haproxy_use slz SLZ) ) |
321 |
+ args+=( $(haproxy_use zlib ZLIB) ) |
322 |
+ args+=( $(haproxy_use lua LUA) ) |
323 |
+ args+=( $(haproxy_use 51degrees 51DEGREES) ) |
324 |
+ args+=( $(haproxy_use device-atlas DEVICEATLAS) ) |
325 |
+ args+=( $(haproxy_use wurfl WURFL) ) |
326 |
+ args+=( $(haproxy_use systemd SYSTEMD) ) |
327 |
+ args+=( $(haproxy_use prometheus-exporter PROMEX) ) |
328 |
+ |
329 |
+ # Bug #668002 |
330 |
+ if use ppc || use arm || use hppa; then |
331 |
+ TARGET_LDFLAGS=-latomic |
332 |
+ fi |
333 |
+ |
334 |
+ # HAProxy really needs some of those "SPEC_CFLAGS", like -fno-strict-aliasing |
335 |
+ emake CFLAGS="${CFLAGS} \$(SPEC_CFLAGS)" LDFLAGS="${LDFLAGS}" CC=$(tc-getCC) EXTRA_OBJS="${EXTRA_OBJS}" TARGET_LDFLAGS="${TARGET_LDFLAGS}" PCRE_LIB=${ERROT}/usr/$(get_libdir) ${args[@]} |
336 |
+ emake -C admin/systemd CFLAGS="${CFLAGS} \$(SPEC_CFLAGS)" LDFLAGS="${LDFLAGS}" CC=$(tc-getCC) EXTRA_OBJS="${EXTRA_OBJS}" TARGET_LDFLAGS="${TARGET_LDFLAGS}" PCRE_LIB=${ERROT}/usr/$(get_libdir) SBINDIR=/usr/sbin |
337 |
+ |
338 |
+ if use tools ; then |
339 |
+ for extra in ${EXTRAS[@]} ; do |
340 |
+ if [ "${extra}" = "admin/halog" ]; then |
341 |
+ emake CFLAGS="${CFLAGS} \$(SPEC_CFLAGS)" LDFLAGS="${LDFLAGS}" CC=$(tc-getCC) EXTRA_OBJS="${EXTRA_OBJS}" TARGET_LDFLAGS="${TARGET_LDFLAGS}" PCRE_LIB=${ERROT}/usr/$(get_libdir) ${args[@]} admin/halog/halog |
342 |
+ elif [ "${extra}" = "dev/hpack" ]; then |
343 |
+ emake CFLAGS="${CFLAGS} \$(SPEC_CFLAGS)" LDFLAGS="${LDFLAGS}" CC=$(tc-getCC) EXTRA_OBJS="${EXTRA_OBJS}" TARGET_LDFLAGS="${TARGET_LDFLAGS}" PCRE_LIB=${ERROT}/usr/$(get_libdir) ${args[@]} dev/hpack/{decode,gen-enc,gen-rht} |
344 |
+ else |
345 |
+ # Those two includes are a workaround for hpack Makefile missing those |
346 |
+ emake -C ${extra} \ |
347 |
+ CFLAGS="${CFLAGS} -I../../include/ -I../../ebtree/" OPTIMIZE="${CFLAGS}" LDFLAGS="${LDFLAGS}" CC=$(tc-getCC) ${args[@]} |
348 |
+ fi |
349 |
+ done |
350 |
+ fi |
351 |
+} |
352 |
+ |
353 |
+src_install() { |
354 |
+ dosbin haproxy |
355 |
+ dosym ../sbin/haproxy /usr/bin/haproxy |
356 |
+ |
357 |
+ newconfd "${FILESDIR}/${PN}.confd" ${PN} |
358 |
+ newinitd "${FILESDIR}/${PN}.initd-r6" ${PN} |
359 |
+ |
360 |
+ doman doc/haproxy.1 |
361 |
+ |
362 |
+ systemd_dounit admin/systemd/haproxy.service |
363 |
+ |
364 |
+ einstalldocs |
365 |
+ |
366 |
+ # The errorfiles are used by upstream defaults. |
367 |
+ insinto /etc/haproxy/errors/ |
368 |
+ doins examples/errorfiles/* |
369 |
+ |
370 |
+ if use doc; then |
371 |
+ dodoc ROADMAP doc/*.txt |
372 |
+ #if use lua; then |
373 |
+ # TODO: doc/lua-api/ |
374 |
+ #fi |
375 |
+ fi |
376 |
+ |
377 |
+ if use tools ; then |
378 |
+ has admin/halog "${EXTRAS[@]}" && dobin admin/halog/halog |
379 |
+ has admin/iprange "${EXTRAS[@]}" && { newbin admin/iprange/iprange haproxy_iprange; newbin admin/iprange/ip6range haproxy_ip6range; } |
380 |
+ has dev/tcploop "${EXTRAS[@]}" && newbin dev/tcploop/tcploop haproxy_tcploop |
381 |
+ has dev/hpack "${EXTRAS[@]}" && { |
382 |
+ newbin dev/hpack/gen-rht haproxy_gen-rht |
383 |
+ newbin dev/hpack/gen-enc haproxy_gen-enc |
384 |
+ newbin dev/hpack/decode haproxy_decode |
385 |
+ } |
386 |
+ fi |
387 |
+ |
388 |
+ if use examples ; then |
389 |
+ docinto examples |
390 |
+ dodoc examples/*.cfg |
391 |
+ dodoc doc/seamless_reload.txt |
392 |
+ fi |
393 |
+ |
394 |
+ if use vim-syntax ; then |
395 |
+ insinto /usr/share/vim/vimfiles/syntax |
396 |
+ doins admin/syntax-highlight/haproxy.vim |
397 |
+ fi |
398 |
+} |
399 |
+ |
400 |
+pkg_postinst() { |
401 |
+ if [[ ! -f "${EROOT}/etc/haproxy/haproxy.cfg" ]] ; then |
402 |
+ ewarn "You need to create /etc/haproxy/haproxy.cfg before you start the haproxy service." |
403 |
+ ewarn "It's best practice to not run haproxy as root, user and group haproxy was therefore created." |
404 |
+ ewarn "Make use of them with the \"user\" and \"group\" directives." |
405 |
+ |
406 |
+ if [[ -d "${EROOT}/usr/share/doc/${PF}" ]]; then |
407 |
+ einfo "Please consult the installed documentation for learning the configuration file's syntax." |
408 |
+ einfo "The documentation and sample configuration files are installed here:" |
409 |
+ einfo " ${EROOT}/usr/share/doc/${PF}" |
410 |
+ fi |
411 |
+ fi |
412 |
+} |