1 |
commit: 0bf76b7ba9fdcae0455599ddb348b1e79b65b413 |
2 |
Author: Patrick Lauer <patrick <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Jun 21 18:19:57 2017 +0000 |
4 |
Commit: Patrick Lauer <patrick <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Jun 21 18:21:17 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0bf76b7b |
7 |
|
8 |
net-proxy/haproxy: Fix init script (openrc_default_stop -> default_stop) #620418 |
9 |
|
10 |
Package-Manager: Portage-2.3.6, Repoman-2.3.2 |
11 |
RepoMan-Options: --force |
12 |
|
13 |
.../files/{haproxy.initd-r3 => haproxy.initd-r4} | 4 +- |
14 |
...roxy-1.6.11.ebuild => haproxy-1.6.11-r1.ebuild} | 2 +- |
15 |
...roxy-1.6.12.ebuild => haproxy-1.6.12-r1.ebuild} | 2 +- |
16 |
...roxy-1.6.13.ebuild => haproxy-1.6.13-r1.ebuild} | 2 +- |
17 |
...oxy-1.7.6.ebuild => haproxy-1.6.9999-r1.ebuild} | 2 +- |
18 |
net-proxy/haproxy/haproxy-1.6.9999.ebuild | 165 --------------------- |
19 |
...aproxy-1.7.5.ebuild => haproxy-1.7.5-r1.ebuild} | 2 +- |
20 |
...aproxy-1.7.6.ebuild => haproxy-1.7.6-r1.ebuild} | 2 +- |
21 |
...oxy-1.7.6.ebuild => haproxy-1.7.9999-r1.ebuild} | 2 +- |
22 |
net-proxy/haproxy/haproxy-1.7.9999.ebuild | 165 --------------------- |
23 |
10 files changed, 9 insertions(+), 339 deletions(-) |
24 |
|
25 |
diff --git a/net-proxy/haproxy/files/haproxy.initd-r3 b/net-proxy/haproxy/files/haproxy.initd-r4 |
26 |
similarity index 95% |
27 |
rename from net-proxy/haproxy/files/haproxy.initd-r3 |
28 |
rename to net-proxy/haproxy/files/haproxy.initd-r4 |
29 |
index abba9f86534..c37719b1675 100644 |
30 |
--- a/net-proxy/haproxy/files/haproxy.initd-r3 |
31 |
+++ b/net-proxy/haproxy/files/haproxy.initd-r4 |
32 |
@@ -1,5 +1,5 @@ |
33 |
#!/sbin/openrc-run |
34 |
-# Copyright 1999-2016 Gentoo Foundation |
35 |
+# Copyright 1999-2017 Gentoo Foundation |
36 |
# Distributed under the terms of the GNU General Public License v2 |
37 |
|
38 |
extra_commands="checkconfig" |
39 |
@@ -66,7 +66,7 @@ stop() { |
40 |
_t="$(mktemp)" |
41 |
for _pid in $(cat ${pidfile}) ; do |
42 |
echo "${_pid}" > "${_t}" |
43 |
- pidfile="${_t}" openrc_default_stop |
44 |
+ pidfile="${_t}" default_stop |
45 |
done |
46 |
rm -f "${_t}" |
47 |
} |
48 |
|
49 |
diff --git a/net-proxy/haproxy/haproxy-1.6.11.ebuild b/net-proxy/haproxy/haproxy-1.6.11-r1.ebuild |
50 |
similarity index 99% |
51 |
rename from net-proxy/haproxy/haproxy-1.6.11.ebuild |
52 |
rename to net-proxy/haproxy/haproxy-1.6.11-r1.ebuild |
53 |
index 39b23851f90..06254314e42 100644 |
54 |
--- a/net-proxy/haproxy/haproxy-1.6.11.ebuild |
55 |
+++ b/net-proxy/haproxy/haproxy-1.6.11-r1.ebuild |
56 |
@@ -108,7 +108,7 @@ src_install() { |
57 |
dobin haproxy |
58 |
|
59 |
newconfd "${FILESDIR}/${PN}.confd" $PN |
60 |
- newinitd "${FILESDIR}/${PN}.initd-r3" $PN |
61 |
+ newinitd "${FILESDIR}/${PN}.initd-r4" $PN |
62 |
|
63 |
doman doc/haproxy.1 |
64 |
|
65 |
|
66 |
diff --git a/net-proxy/haproxy/haproxy-1.6.12.ebuild b/net-proxy/haproxy/haproxy-1.6.12-r1.ebuild |
67 |
similarity index 99% |
68 |
rename from net-proxy/haproxy/haproxy-1.6.12.ebuild |
69 |
rename to net-proxy/haproxy/haproxy-1.6.12-r1.ebuild |
70 |
index e1c758115e5..11493f63057 100644 |
71 |
--- a/net-proxy/haproxy/haproxy-1.6.12.ebuild |
72 |
+++ b/net-proxy/haproxy/haproxy-1.6.12-r1.ebuild |
73 |
@@ -108,7 +108,7 @@ src_install() { |
74 |
dobin haproxy |
75 |
|
76 |
newconfd "${FILESDIR}/${PN}.confd" $PN |
77 |
- newinitd "${FILESDIR}/${PN}.initd-r3" $PN |
78 |
+ newinitd "${FILESDIR}/${PN}.initd-r4" $PN |
79 |
|
80 |
doman doc/haproxy.1 |
81 |
|
82 |
|
83 |
diff --git a/net-proxy/haproxy/haproxy-1.6.13.ebuild b/net-proxy/haproxy/haproxy-1.6.13-r1.ebuild |
84 |
similarity index 99% |
85 |
rename from net-proxy/haproxy/haproxy-1.6.13.ebuild |
86 |
rename to net-proxy/haproxy/haproxy-1.6.13-r1.ebuild |
87 |
index e1c758115e5..11493f63057 100644 |
88 |
--- a/net-proxy/haproxy/haproxy-1.6.13.ebuild |
89 |
+++ b/net-proxy/haproxy/haproxy-1.6.13-r1.ebuild |
90 |
@@ -108,7 +108,7 @@ src_install() { |
91 |
dobin haproxy |
92 |
|
93 |
newconfd "${FILESDIR}/${PN}.confd" $PN |
94 |
- newinitd "${FILESDIR}/${PN}.initd-r3" $PN |
95 |
+ newinitd "${FILESDIR}/${PN}.initd-r4" $PN |
96 |
|
97 |
doman doc/haproxy.1 |
98 |
|
99 |
|
100 |
diff --git a/net-proxy/haproxy/haproxy-1.7.6.ebuild b/net-proxy/haproxy/haproxy-1.6.9999-r1.ebuild |
101 |
similarity index 99% |
102 |
copy from net-proxy/haproxy/haproxy-1.7.6.ebuild |
103 |
copy to net-proxy/haproxy/haproxy-1.6.9999-r1.ebuild |
104 |
index c0a7cc341e6..dc6dcf334d8 100644 |
105 |
--- a/net-proxy/haproxy/haproxy-1.7.6.ebuild |
106 |
+++ b/net-proxy/haproxy/haproxy-1.6.9999-r1.ebuild |
107 |
@@ -109,7 +109,7 @@ src_install() { |
108 |
dobin haproxy |
109 |
|
110 |
newconfd "${FILESDIR}/${PN}.confd" $PN |
111 |
- newinitd "${FILESDIR}/${PN}.initd-r3" $PN |
112 |
+ newinitd "${FILESDIR}/${PN}.initd-r4" $PN |
113 |
|
114 |
doman doc/haproxy.1 |
115 |
|
116 |
|
117 |
diff --git a/net-proxy/haproxy/haproxy-1.6.9999.ebuild b/net-proxy/haproxy/haproxy-1.6.9999.ebuild |
118 |
deleted file mode 100644 |
119 |
index 713e9e895bd..00000000000 |
120 |
--- a/net-proxy/haproxy/haproxy-1.6.9999.ebuild |
121 |
+++ /dev/null |
122 |
@@ -1,165 +0,0 @@ |
123 |
-# Copyright 1999-2016 Gentoo Foundation |
124 |
-# Distributed under the terms of the GNU General Public License v2 |
125 |
- |
126 |
-EAPI="6" |
127 |
- |
128 |
-[[ ${PV} == *9999 ]] && SCM="git-r3" |
129 |
-inherit user versionator toolchain-funcs flag-o-matic systemd linux-info $SCM |
130 |
- |
131 |
-MY_P="${PN}-${PV/_beta/-dev}" |
132 |
- |
133 |
-DESCRIPTION="A TCP/HTTP reverse proxy for high availability environments" |
134 |
-HOMEPAGE="http://haproxy.1wt.eu" |
135 |
-if [[ ${PV} != *9999 ]]; then |
136 |
- SRC_URI="http://haproxy.1wt.eu/download/$(get_version_component_range 1-2)/src/${MY_P}.tar.gz" |
137 |
- KEYWORDS="~amd64 ~arm ~ppc ~x86" |
138 |
-else |
139 |
- EGIT_REPO_URI="http://git.haproxy.org/git/haproxy-$(get_version_component_range 1-2).git/" |
140 |
- EGIT_BRANCH=master |
141 |
-fi |
142 |
- |
143 |
-LICENSE="GPL-2 LGPL-2.1" |
144 |
-SLOT="0" |
145 |
-IUSE="+crypt doc examples libressl slz net_ns +pcre pcre-jit ssl tools vim-syntax +zlib lua device-atlas 51degrees wurfl" |
146 |
-REQUIRED_USE="pcre-jit? ( pcre ) |
147 |
- device-atlas? ( pcre ) |
148 |
- ?? ( slz zlib )" |
149 |
- |
150 |
-DEPEND=" |
151 |
- pcre? ( |
152 |
- dev-libs/libpcre |
153 |
- pcre-jit? ( dev-libs/libpcre[jit] ) |
154 |
- ) |
155 |
- ssl? ( |
156 |
- !libressl? ( dev-libs/openssl:0=[zlib?] ) |
157 |
- libressl? ( dev-libs/libressl:0= ) |
158 |
- ) |
159 |
- slz? ( dev-libs/libslz:= ) |
160 |
- zlib? ( sys-libs/zlib ) |
161 |
- lua? ( dev-lang/lua:5.3 ) |
162 |
- device-atlas? ( dev-libs/device-atlas-api-c )" |
163 |
-RDEPEND="${DEPEND}" |
164 |
- |
165 |
-S="${WORKDIR}/${MY_P}" |
166 |
- |
167 |
-DOCS=( CHANGELOG CONTRIBUTING MAINTAINERS README ) |
168 |
-version_is_at_least 1.7.0 $PV && PATCHES=( "${FILESDIR}"/haproxy-1.7-contrib.patch ) |
169 |
-CONTRIBS=( halog iprange ) |
170 |
-# ip6range is present in 1.6, but broken. |
171 |
-version_is_at_least 1.7.0 $PV && CONTRIBS+=( ip6range spoa_example tcploop ) |
172 |
- |
173 |
-haproxy_use() { |
174 |
- (( $# != 2 )) && die "${FUNCNAME} <USE flag> <make option>" |
175 |
- |
176 |
- usex "${1}" "USE_${2}=1" "USE_${2}=" |
177 |
-} |
178 |
- |
179 |
-pkg_setup() { |
180 |
- enewgroup haproxy |
181 |
- enewuser haproxy -1 -1 -1 haproxy |
182 |
- |
183 |
- if use net_ns; then |
184 |
- CONFIG_CHECK="~NET_NS" |
185 |
- linux-info_pkg_setup |
186 |
- fi |
187 |
-} |
188 |
- |
189 |
-src_prepare() { |
190 |
- default |
191 |
- |
192 |
- sed -e 's:@SBINDIR@:'/usr/bin':' contrib/systemd/haproxy.service.in \ |
193 |
- > contrib/systemd/haproxy.service || die |
194 |
- |
195 |
- sed -ie 's:/usr/sbin/haproxy:/usr/bin/haproxy:' src/haproxy-systemd-wrapper.c || die |
196 |
-} |
197 |
- |
198 |
-src_compile() { |
199 |
- local -a args=( |
200 |
- TARGET=linux2628 |
201 |
- USE_GETADDRINFO=1 |
202 |
- USE_TFO=1 |
203 |
- ) |
204 |
- |
205 |
- args+=( $(haproxy_use crypt LIBCRYPT) ) |
206 |
- args+=( $(haproxy_use net_ns NS) ) |
207 |
- args+=( $(haproxy_use pcre PCRE) ) |
208 |
- args+=( $(haproxy_use pcre-jit PCRE_JIT) ) |
209 |
- args+=( $(haproxy_use ssl OPENSSL) ) |
210 |
- args+=( $(haproxy_use slz SLZ) ) |
211 |
- args+=( $(haproxy_use zlib ZLIB) ) |
212 |
- args+=( $(haproxy_use lua LUA) ) |
213 |
- args+=( $(haproxy_use 51degrees 51DEGREES) ) |
214 |
- args+=( $(haproxy_use device-atlas DEVICEATLAS) ) |
215 |
- args+=( $(haproxy_use wurfl WURFL) ) |
216 |
- |
217 |
- # For now, until the strict-aliasing breakage will be fixed |
218 |
- append-cflags -fno-strict-aliasing |
219 |
- |
220 |
- emake CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" CC=$(tc-getCC) ${args[@]} |
221 |
- |
222 |
- if use tools ; then |
223 |
- for contrib in ${CONTRIBS[@]} ; do |
224 |
- emake -C contrib/${contrib} \ |
225 |
- CFLAGS="${CFLAGS}" OPTIMIZE="${CFLAGS}" LDFLAGS="${LDFLAGS}" CC=$(tc-getCC) ${args[@]} |
226 |
- done |
227 |
- fi |
228 |
-} |
229 |
- |
230 |
-src_install() { |
231 |
- dobin haproxy |
232 |
- |
233 |
- newconfd "${FILESDIR}/${PN}.confd" $PN |
234 |
- newinitd "${FILESDIR}/${PN}.initd-r3" $PN |
235 |
- |
236 |
- doman doc/haproxy.1 |
237 |
- |
238 |
- dobin haproxy-systemd-wrapper |
239 |
- systemd_dounit contrib/systemd/haproxy.service |
240 |
- |
241 |
- einstalldocs |
242 |
- |
243 |
- # The errorfiles are used by upstream defaults. |
244 |
- insinto /etc/haproxy/errors/ |
245 |
- doins examples/errorfiles/* |
246 |
- |
247 |
- if use doc; then |
248 |
- dodoc ROADMAP doc/*.txt |
249 |
- #if use lua; then |
250 |
- # TODO: doc/lua-api/ |
251 |
- #fi |
252 |
- fi |
253 |
- |
254 |
- if use tools ; then |
255 |
- has halog "${CONTRIBS[@]}" && dobin contrib/halog/halog |
256 |
- has "iprange" "${CONTRIBS[@]}" && newbin contrib/iprange/iprange haproxy_iprange |
257 |
- has "ip6range" "${CONTRIBS[@]}" && newbin contrib/ip6range/ip6range haproxy_ip6range |
258 |
- has "spoa_example" "${CONTRIBS[@]}" && newbin contrib/spoa_example/spoa haproxy_spoa_example |
259 |
- has "spoa_example" "${CONTRIBS[@]}" && newdoc contrib/spoa_example/README README.spoa_example |
260 |
- has "tcploop" "${CONTRIBS[@]}" && newbin contrib/tcploop/tcploop haproxy_tcploop |
261 |
- fi |
262 |
- |
263 |
- if use examples ; then |
264 |
- docinto examples |
265 |
- dodoc examples/*.cfg |
266 |
- dodoc examples/seamless_reload.txt |
267 |
- fi |
268 |
- |
269 |
- if use vim-syntax ; then |
270 |
- insinto /usr/share/vim/vimfiles/syntax |
271 |
- doins examples/haproxy.vim |
272 |
- fi |
273 |
-} |
274 |
- |
275 |
-pkg_postinst() { |
276 |
- if [[ ! -f "${EROOT}/etc/haproxy/haproxy.cfg" ]] ; then |
277 |
- ewarn "You need to create /etc/haproxy/haproxy.cfg before you start the haproxy service." |
278 |
- ewarn "It's best practice to not run haproxy as root, user and group haproxy was therefore created." |
279 |
- ewarn "Make use of them with the \"user\" and \"group\" directives." |
280 |
- |
281 |
- if [[ -d "${EROOT}/usr/share/doc/${PF}" ]]; then |
282 |
- einfo "Please consult the installed documentation for learning the configuration file's syntax." |
283 |
- einfo "The documentation and sample configuration files are installed here:" |
284 |
- einfo " ${EROOT}usr/share/doc/${PF}" |
285 |
- fi |
286 |
- fi |
287 |
-} |
288 |
|
289 |
diff --git a/net-proxy/haproxy/haproxy-1.7.5.ebuild b/net-proxy/haproxy/haproxy-1.7.5-r1.ebuild |
290 |
similarity index 99% |
291 |
rename from net-proxy/haproxy/haproxy-1.7.5.ebuild |
292 |
rename to net-proxy/haproxy/haproxy-1.7.5-r1.ebuild |
293 |
index c0a7cc341e6..dc6dcf334d8 100644 |
294 |
--- a/net-proxy/haproxy/haproxy-1.7.5.ebuild |
295 |
+++ b/net-proxy/haproxy/haproxy-1.7.5-r1.ebuild |
296 |
@@ -109,7 +109,7 @@ src_install() { |
297 |
dobin haproxy |
298 |
|
299 |
newconfd "${FILESDIR}/${PN}.confd" $PN |
300 |
- newinitd "${FILESDIR}/${PN}.initd-r3" $PN |
301 |
+ newinitd "${FILESDIR}/${PN}.initd-r4" $PN |
302 |
|
303 |
doman doc/haproxy.1 |
304 |
|
305 |
|
306 |
diff --git a/net-proxy/haproxy/haproxy-1.7.6.ebuild b/net-proxy/haproxy/haproxy-1.7.6-r1.ebuild |
307 |
similarity index 99% |
308 |
copy from net-proxy/haproxy/haproxy-1.7.6.ebuild |
309 |
copy to net-proxy/haproxy/haproxy-1.7.6-r1.ebuild |
310 |
index c0a7cc341e6..dc6dcf334d8 100644 |
311 |
--- a/net-proxy/haproxy/haproxy-1.7.6.ebuild |
312 |
+++ b/net-proxy/haproxy/haproxy-1.7.6-r1.ebuild |
313 |
@@ -109,7 +109,7 @@ src_install() { |
314 |
dobin haproxy |
315 |
|
316 |
newconfd "${FILESDIR}/${PN}.confd" $PN |
317 |
- newinitd "${FILESDIR}/${PN}.initd-r3" $PN |
318 |
+ newinitd "${FILESDIR}/${PN}.initd-r4" $PN |
319 |
|
320 |
doman doc/haproxy.1 |
321 |
|
322 |
|
323 |
diff --git a/net-proxy/haproxy/haproxy-1.7.6.ebuild b/net-proxy/haproxy/haproxy-1.7.9999-r1.ebuild |
324 |
similarity index 99% |
325 |
rename from net-proxy/haproxy/haproxy-1.7.6.ebuild |
326 |
rename to net-proxy/haproxy/haproxy-1.7.9999-r1.ebuild |
327 |
index c0a7cc341e6..dc6dcf334d8 100644 |
328 |
--- a/net-proxy/haproxy/haproxy-1.7.6.ebuild |
329 |
+++ b/net-proxy/haproxy/haproxy-1.7.9999-r1.ebuild |
330 |
@@ -109,7 +109,7 @@ src_install() { |
331 |
dobin haproxy |
332 |
|
333 |
newconfd "${FILESDIR}/${PN}.confd" $PN |
334 |
- newinitd "${FILESDIR}/${PN}.initd-r3" $PN |
335 |
+ newinitd "${FILESDIR}/${PN}.initd-r4" $PN |
336 |
|
337 |
doman doc/haproxy.1 |
338 |
|
339 |
|
340 |
diff --git a/net-proxy/haproxy/haproxy-1.7.9999.ebuild b/net-proxy/haproxy/haproxy-1.7.9999.ebuild |
341 |
deleted file mode 100644 |
342 |
index 713e9e895bd..00000000000 |
343 |
--- a/net-proxy/haproxy/haproxy-1.7.9999.ebuild |
344 |
+++ /dev/null |
345 |
@@ -1,165 +0,0 @@ |
346 |
-# Copyright 1999-2016 Gentoo Foundation |
347 |
-# Distributed under the terms of the GNU General Public License v2 |
348 |
- |
349 |
-EAPI="6" |
350 |
- |
351 |
-[[ ${PV} == *9999 ]] && SCM="git-r3" |
352 |
-inherit user versionator toolchain-funcs flag-o-matic systemd linux-info $SCM |
353 |
- |
354 |
-MY_P="${PN}-${PV/_beta/-dev}" |
355 |
- |
356 |
-DESCRIPTION="A TCP/HTTP reverse proxy for high availability environments" |
357 |
-HOMEPAGE="http://haproxy.1wt.eu" |
358 |
-if [[ ${PV} != *9999 ]]; then |
359 |
- SRC_URI="http://haproxy.1wt.eu/download/$(get_version_component_range 1-2)/src/${MY_P}.tar.gz" |
360 |
- KEYWORDS="~amd64 ~arm ~ppc ~x86" |
361 |
-else |
362 |
- EGIT_REPO_URI="http://git.haproxy.org/git/haproxy-$(get_version_component_range 1-2).git/" |
363 |
- EGIT_BRANCH=master |
364 |
-fi |
365 |
- |
366 |
-LICENSE="GPL-2 LGPL-2.1" |
367 |
-SLOT="0" |
368 |
-IUSE="+crypt doc examples libressl slz net_ns +pcre pcre-jit ssl tools vim-syntax +zlib lua device-atlas 51degrees wurfl" |
369 |
-REQUIRED_USE="pcre-jit? ( pcre ) |
370 |
- device-atlas? ( pcre ) |
371 |
- ?? ( slz zlib )" |
372 |
- |
373 |
-DEPEND=" |
374 |
- pcre? ( |
375 |
- dev-libs/libpcre |
376 |
- pcre-jit? ( dev-libs/libpcre[jit] ) |
377 |
- ) |
378 |
- ssl? ( |
379 |
- !libressl? ( dev-libs/openssl:0=[zlib?] ) |
380 |
- libressl? ( dev-libs/libressl:0= ) |
381 |
- ) |
382 |
- slz? ( dev-libs/libslz:= ) |
383 |
- zlib? ( sys-libs/zlib ) |
384 |
- lua? ( dev-lang/lua:5.3 ) |
385 |
- device-atlas? ( dev-libs/device-atlas-api-c )" |
386 |
-RDEPEND="${DEPEND}" |
387 |
- |
388 |
-S="${WORKDIR}/${MY_P}" |
389 |
- |
390 |
-DOCS=( CHANGELOG CONTRIBUTING MAINTAINERS README ) |
391 |
-version_is_at_least 1.7.0 $PV && PATCHES=( "${FILESDIR}"/haproxy-1.7-contrib.patch ) |
392 |
-CONTRIBS=( halog iprange ) |
393 |
-# ip6range is present in 1.6, but broken. |
394 |
-version_is_at_least 1.7.0 $PV && CONTRIBS+=( ip6range spoa_example tcploop ) |
395 |
- |
396 |
-haproxy_use() { |
397 |
- (( $# != 2 )) && die "${FUNCNAME} <USE flag> <make option>" |
398 |
- |
399 |
- usex "${1}" "USE_${2}=1" "USE_${2}=" |
400 |
-} |
401 |
- |
402 |
-pkg_setup() { |
403 |
- enewgroup haproxy |
404 |
- enewuser haproxy -1 -1 -1 haproxy |
405 |
- |
406 |
- if use net_ns; then |
407 |
- CONFIG_CHECK="~NET_NS" |
408 |
- linux-info_pkg_setup |
409 |
- fi |
410 |
-} |
411 |
- |
412 |
-src_prepare() { |
413 |
- default |
414 |
- |
415 |
- sed -e 's:@SBINDIR@:'/usr/bin':' contrib/systemd/haproxy.service.in \ |
416 |
- > contrib/systemd/haproxy.service || die |
417 |
- |
418 |
- sed -ie 's:/usr/sbin/haproxy:/usr/bin/haproxy:' src/haproxy-systemd-wrapper.c || die |
419 |
-} |
420 |
- |
421 |
-src_compile() { |
422 |
- local -a args=( |
423 |
- TARGET=linux2628 |
424 |
- USE_GETADDRINFO=1 |
425 |
- USE_TFO=1 |
426 |
- ) |
427 |
- |
428 |
- args+=( $(haproxy_use crypt LIBCRYPT) ) |
429 |
- args+=( $(haproxy_use net_ns NS) ) |
430 |
- args+=( $(haproxy_use pcre PCRE) ) |
431 |
- args+=( $(haproxy_use pcre-jit PCRE_JIT) ) |
432 |
- args+=( $(haproxy_use ssl OPENSSL) ) |
433 |
- args+=( $(haproxy_use slz SLZ) ) |
434 |
- args+=( $(haproxy_use zlib ZLIB) ) |
435 |
- args+=( $(haproxy_use lua LUA) ) |
436 |
- args+=( $(haproxy_use 51degrees 51DEGREES) ) |
437 |
- args+=( $(haproxy_use device-atlas DEVICEATLAS) ) |
438 |
- args+=( $(haproxy_use wurfl WURFL) ) |
439 |
- |
440 |
- # For now, until the strict-aliasing breakage will be fixed |
441 |
- append-cflags -fno-strict-aliasing |
442 |
- |
443 |
- emake CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" CC=$(tc-getCC) ${args[@]} |
444 |
- |
445 |
- if use tools ; then |
446 |
- for contrib in ${CONTRIBS[@]} ; do |
447 |
- emake -C contrib/${contrib} \ |
448 |
- CFLAGS="${CFLAGS}" OPTIMIZE="${CFLAGS}" LDFLAGS="${LDFLAGS}" CC=$(tc-getCC) ${args[@]} |
449 |
- done |
450 |
- fi |
451 |
-} |
452 |
- |
453 |
-src_install() { |
454 |
- dobin haproxy |
455 |
- |
456 |
- newconfd "${FILESDIR}/${PN}.confd" $PN |
457 |
- newinitd "${FILESDIR}/${PN}.initd-r3" $PN |
458 |
- |
459 |
- doman doc/haproxy.1 |
460 |
- |
461 |
- dobin haproxy-systemd-wrapper |
462 |
- systemd_dounit contrib/systemd/haproxy.service |
463 |
- |
464 |
- einstalldocs |
465 |
- |
466 |
- # The errorfiles are used by upstream defaults. |
467 |
- insinto /etc/haproxy/errors/ |
468 |
- doins examples/errorfiles/* |
469 |
- |
470 |
- if use doc; then |
471 |
- dodoc ROADMAP doc/*.txt |
472 |
- #if use lua; then |
473 |
- # TODO: doc/lua-api/ |
474 |
- #fi |
475 |
- fi |
476 |
- |
477 |
- if use tools ; then |
478 |
- has halog "${CONTRIBS[@]}" && dobin contrib/halog/halog |
479 |
- has "iprange" "${CONTRIBS[@]}" && newbin contrib/iprange/iprange haproxy_iprange |
480 |
- has "ip6range" "${CONTRIBS[@]}" && newbin contrib/ip6range/ip6range haproxy_ip6range |
481 |
- has "spoa_example" "${CONTRIBS[@]}" && newbin contrib/spoa_example/spoa haproxy_spoa_example |
482 |
- has "spoa_example" "${CONTRIBS[@]}" && newdoc contrib/spoa_example/README README.spoa_example |
483 |
- has "tcploop" "${CONTRIBS[@]}" && newbin contrib/tcploop/tcploop haproxy_tcploop |
484 |
- fi |
485 |
- |
486 |
- if use examples ; then |
487 |
- docinto examples |
488 |
- dodoc examples/*.cfg |
489 |
- dodoc examples/seamless_reload.txt |
490 |
- fi |
491 |
- |
492 |
- if use vim-syntax ; then |
493 |
- insinto /usr/share/vim/vimfiles/syntax |
494 |
- doins examples/haproxy.vim |
495 |
- fi |
496 |
-} |
497 |
- |
498 |
-pkg_postinst() { |
499 |
- if [[ ! -f "${EROOT}/etc/haproxy/haproxy.cfg" ]] ; then |
500 |
- ewarn "You need to create /etc/haproxy/haproxy.cfg before you start the haproxy service." |
501 |
- ewarn "It's best practice to not run haproxy as root, user and group haproxy was therefore created." |
502 |
- ewarn "Make use of them with the \"user\" and \"group\" directives." |
503 |
- |
504 |
- if [[ -d "${EROOT}/usr/share/doc/${PF}" ]]; then |
505 |
- einfo "Please consult the installed documentation for learning the configuration file's syntax." |
506 |
- einfo "The documentation and sample configuration files are installed here:" |
507 |
- einfo " ${EROOT}usr/share/doc/${PF}" |
508 |
- fi |
509 |
- fi |
510 |
-} |