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