1 |
commit: 0848c9412a70bd44c065e2da79c97aeedac9c2d9 |
2 |
Author: Bertrand Jacquin <bertrand <AT> jacquin <DOT> bzh> |
3 |
AuthorDate: Sat Sep 10 23:58:55 2016 +0000 |
4 |
Commit: Christian Ruppert <idl0r <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Sep 28 19:53:50 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0848c941 |
7 |
|
8 |
net-proxy/haproxy: Move to EAPI 6 and git-r3 |
9 |
|
10 |
Sync live ebuild with 1.6.9 |
11 |
|
12 |
Package-Manager: portage-2.2.28 |
13 |
Closes: https://github.com/gentoo/gentoo/pull/2293 |
14 |
|
15 |
Signed-off-by: Christian Ruppert <idl0r <AT> gentoo.org> |
16 |
|
17 |
net-proxy/haproxy/haproxy-9999.ebuild | 72 +++++++++++++++++++++++++---------- |
18 |
1 file changed, 51 insertions(+), 21 deletions(-) |
19 |
|
20 |
diff --git a/net-proxy/haproxy/haproxy-9999.ebuild b/net-proxy/haproxy/haproxy-9999.ebuild |
21 |
index 6306bfa..42be396 100644 |
22 |
--- a/net-proxy/haproxy/haproxy-9999.ebuild |
23 |
+++ b/net-proxy/haproxy/haproxy-9999.ebuild |
24 |
@@ -2,9 +2,9 @@ |
25 |
# Distributed under the terms of the GNU General Public License v2 |
26 |
# $Id$ |
27 |
|
28 |
-EAPI="5" |
29 |
+EAPI="6" |
30 |
|
31 |
-inherit user versionator toolchain-funcs flag-o-matic git-2 systemd |
32 |
+inherit user versionator toolchain-funcs flag-o-matic systemd linux-info git-r3 |
33 |
|
34 |
MY_P="${PN}-${PV/_beta/-dev}" |
35 |
|
36 |
@@ -15,7 +15,7 @@ EGIT_REPO_URI="http://master.formilux.org/git/people/willy/haproxy.git" |
37 |
LICENSE="GPL-2 LGPL-2.1" |
38 |
SLOT="0" |
39 |
KEYWORDS="" |
40 |
-IUSE="+crypt examples libressl +pcre pcre-jit ssl tools vim-syntax +zlib" |
41 |
+IUSE="+crypt doc examples libressl net_ns +pcre pcre-jit ssl tools vim-syntax +zlib" # lua |
42 |
|
43 |
DEPEND=" |
44 |
pcre? ( |
45 |
@@ -27,16 +27,26 @@ DEPEND=" |
46 |
libressl? ( dev-libs/libressl:0= ) |
47 |
) |
48 |
zlib? ( sys-libs/zlib )" |
49 |
+# lua? ( dev-lang/lua:5.3 ) |
50 |
RDEPEND="${DEPEND}" |
51 |
|
52 |
S="${WORKDIR}/${MY_P}" |
53 |
|
54 |
+DOCS=( CHANGELOG CONTRIBUTING MAINTAINERS ) |
55 |
+ |
56 |
pkg_setup() { |
57 |
enewgroup haproxy |
58 |
enewuser haproxy -1 -1 -1 haproxy |
59 |
+ |
60 |
+ if use net_ns; then |
61 |
+ CONFIG_CHECK="~NET_NS" |
62 |
+ linux-info_pkg_setup |
63 |
+ fi |
64 |
} |
65 |
|
66 |
src_prepare() { |
67 |
+ default |
68 |
+ |
69 |
sed -e 's:@SBINDIR@:'/usr/bin':' contrib/systemd/haproxy.service.in \ |
70 |
> contrib/systemd/haproxy.service || die |
71 |
|
72 |
@@ -46,6 +56,25 @@ src_prepare() { |
73 |
src_compile() { |
74 |
local args="TARGET=linux2628 USE_GETADDRINFO=1" |
75 |
|
76 |
+ if use crypt ; then |
77 |
+ args="${args} USE_LIBCRYPT=1" |
78 |
+ else |
79 |
+ args="${args} USE_LIBCRYPT=" |
80 |
+ fi |
81 |
+ |
82 |
+# bug 541042 |
83 |
+# if use lua; then |
84 |
+# args="${args} USE_LUA=1" |
85 |
+# else |
86 |
+ args="${args} USE_LUA=" |
87 |
+# fi |
88 |
+ |
89 |
+ if use net_ns; then |
90 |
+ args="${args} USE_NS=1" |
91 |
+ else |
92 |
+ args="${args} USE_NS=" |
93 |
+ fi |
94 |
+ |
95 |
if use pcre ; then |
96 |
args="${args} USE_PCRE=1" |
97 |
if use pcre-jit; then |
98 |
@@ -63,12 +92,6 @@ src_compile() { |
99 |
# args="${args} USE_LINUX_SPLICE= USE_LINUX_TPROXY=" |
100 |
# fi |
101 |
|
102 |
- if use crypt ; then |
103 |
- args="${args} USE_LIBCRYPT=1" |
104 |
- else |
105 |
- args="${args} USE_LIBCRYPT=" |
106 |
- fi |
107 |
- |
108 |
if use ssl ; then |
109 |
args="${args} USE_OPENSSL=1" |
110 |
else |
111 |
@@ -97,26 +120,33 @@ src_compile() { |
112 |
src_install() { |
113 |
dobin haproxy |
114 |
|
115 |
- newinitd "${FILESDIR}/haproxy.initd-r2" haproxy |
116 |
- |
117 |
- # Don't install useless files |
118 |
-# rm examples/build.cfg doc/*gpl.txt |
119 |
+ newconfd "${FILESDIR}/${PN}.confd" $PN |
120 |
+ newinitd "${FILESDIR}/${PN}.initd-r3" $PN |
121 |
|
122 |
- dodoc CHANGELOG ROADMAP doc/{configuration,haproxy-en}.txt |
123 |
doman doc/haproxy.1 |
124 |
|
125 |
dobin haproxy-systemd-wrapper |
126 |
systemd_dounit contrib/systemd/haproxy.service |
127 |
|
128 |
+ einstalldocs |
129 |
+ |
130 |
+ if use doc; then |
131 |
+ dodoc ROADMAP doc/{close-options,configuration,cookie-options,intro,linux-syn-cookies,management,proxy-protocol}.txt |
132 |
+ fi |
133 |
+ |
134 |
if use tools ; then |
135 |
- for contrib in halog iprange ; do |
136 |
- dobin contrib/${contrib}/${contrib} |
137 |
- done |
138 |
+ dobin contrib/halog/halog |
139 |
+ newbin contrib/iprange/iprange haproxy_iprange |
140 |
+ fi |
141 |
+ |
142 |
+ if use net_ns && use doc; then |
143 |
+ dodoc doc/network-namespaces.txt |
144 |
fi |
145 |
|
146 |
if use examples ; then |
147 |
docinto examples |
148 |
dodoc examples/*.cfg |
149 |
+ dodoc examples/seamless_reload.txt |
150 |
fi |
151 |
|
152 |
if use vim-syntax ; then |
153 |
@@ -126,15 +156,15 @@ src_install() { |
154 |
} |
155 |
|
156 |
pkg_postinst() { |
157 |
- if [[ ! -f "${ROOT}/etc/haproxy.cfg" ]] ; then |
158 |
- ewarn "You need to create /etc/haproxy.cfg before you start the haproxy service." |
159 |
+ if [[ ! -f "${EROOT}/etc/haproxy/haproxy.cfg" ]] ; then |
160 |
+ ewarn "You need to create /etc/haproxy/haproxy.cfg before you start the haproxy service." |
161 |
ewarn "It's best practice to not run haproxy as root, user and group haproxy was therefore created." |
162 |
ewarn "Make use of them with the \"user\" and \"group\" directives." |
163 |
|
164 |
- if [[ -d "${ROOT}/usr/share/doc/${PF}" ]]; then |
165 |
+ if [[ -d "${EROOT}/usr/share/doc/${PF}" ]]; then |
166 |
einfo "Please consult the installed documentation for learning the configuration file's syntax." |
167 |
einfo "The documentation and sample configuration files are installed here:" |
168 |
- einfo " ${ROOT}usr/share/doc/${PF}" |
169 |
+ einfo " ${EROOT}usr/share/doc/${PF}" |
170 |
fi |
171 |
fi |
172 |
} |