1 |
commit: 5782458daa6a4ba799483ec40f0106f1decb8e5f |
2 |
Author: Christian Ruppert <idl0r <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Jun 25 13:34:19 2021 +0000 |
4 |
Commit: Christian Ruppert <idl0r <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Jun 25 13:39:45 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5782458d |
7 |
|
8 |
net-proxy/haproxy: Version bump |
9 |
|
10 |
Package-Manager: Portage-3.0.18, Repoman-3.0.3 |
11 |
Signed-off-by: Christian Ruppert <idl0r <AT> gentoo.org> |
12 |
|
13 |
net-proxy/haproxy/Manifest | 1 + |
14 |
net-proxy/haproxy/haproxy-2.4.1.ebuild | 176 +++++++++++++++++++++++++++++++++ |
15 |
2 files changed, 177 insertions(+) |
16 |
|
17 |
diff --git a/net-proxy/haproxy/Manifest b/net-proxy/haproxy/Manifest |
18 |
index 8793e9a0410..c0c1dbf80ce 100644 |
19 |
--- a/net-proxy/haproxy/Manifest |
20 |
+++ b/net-proxy/haproxy/Manifest |
21 |
@@ -10,3 +10,4 @@ DIST haproxy-2.2.5.tar.gz 2876429 BLAKE2B 1da993769302186ab0d7e1b0c8651c7e9a1512 |
22 |
DIST haproxy-2.3.10.tar.gz 2942240 BLAKE2B 1fecbf3dde98b4839911e3e6437fa01ebf2e8b5b534665619703d42c9163afcd2b19768d408b27484ad73061e10b54b4bb512f09444944c403a30431814e8f8a SHA512 595a62d677240cb8a463245e5d5d497bb584a379852e533d82e45a77e1b91b469f84e386adcd42b6ec24e5806e256fc2708f672a0da5c1c4f784e3b76a9e7318 |
23 |
DIST haproxy-2.3.9.tar.gz 2928660 BLAKE2B 48b56aa72d50d4783bf54c6dbf642388d6f12d4e2ede09e86e9262d62a981177365dc2d2999e76c2be124c0576fe0b8d16a7a5bf412133fcbf87d45d8abfe3dd SHA512 49ee2a9be8dc7836e73be8e01ccbde52e29522f94d0bc80cf753fe76f4b32657fb123df7d443228afef36928f5a6cef67b693f05008a891001082b4264f015f6 |
24 |
DIST haproxy-2.4.0.tar.gz 3570069 BLAKE2B f37df37232edd5066564bb0f8b02125f697dc1e4d1d8121321a7a5e5089a63c16fb6919f329ac0adf8450f3088efc959fd0cad873151bddf5b53c149530a6e8e SHA512 846faffb7ac2ccbfe314f7c72d4ab3f1955338f3be45906e76a53934c32934e6a3ed9b7a04411717e9a91966e55266183e9cf583df5375f67d03d26c6c6fc273 |
25 |
+DIST haproxy-2.4.1.tar.gz 3575591 BLAKE2B ae5d9f12cf2ef8e114f3ec65a3f636c81b3816ea8dd20635ebc2f2e62ed351463ea97f834a166e2d0e8debc168ef23cbe1fab2f4951a2528bb4e02720e59138f SHA512 6251f0ac77b7bceb349a174faff003bbe621490e5380dcdcd06bf712e13e0c94fd08a3651a62e68c862978031ca2fc9ac8432ea4c6062bb1c718db697030de9d |
26 |
|
27 |
diff --git a/net-proxy/haproxy/haproxy-2.4.1.ebuild b/net-proxy/haproxy/haproxy-2.4.1.ebuild |
28 |
new file mode 100644 |
29 |
index 00000000000..ec2939f568a |
30 |
--- /dev/null |
31 |
+++ b/net-proxy/haproxy/haproxy-2.4.1.ebuild |
32 |
@@ -0,0 +1,176 @@ |
33 |
+# Copyright 1999-2021 Gentoo Authors |
34 |
+# Distributed under the terms of the GNU General Public License v2 |
35 |
+ |
36 |
+EAPI="7" |
37 |
+ |
38 |
+[[ ${PV} == *9999 ]] && SCM="git-r3" |
39 |
+inherit toolchain-funcs flag-o-matic systemd linux-info ${SCM} |
40 |
+ |
41 |
+MY_P="${PN}-${PV/_beta/-dev}" |
42 |
+ |
43 |
+DESCRIPTION="A TCP/HTTP reverse proxy for high availability environments" |
44 |
+HOMEPAGE="http://www.haproxy.org" |
45 |
+if [[ ${PV} != *9999 ]]; then |
46 |
+ SRC_URI="http://haproxy.1wt.eu/download/$(ver_cut 1-2)/src/${MY_P}.tar.gz" |
47 |
+ KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~x86" |
48 |
+else |
49 |
+ EGIT_REPO_URI="http://git.haproxy.org/git/haproxy-$(ver_cut 1-2).git/" |
50 |
+ EGIT_BRANCH=master |
51 |
+fi |
52 |
+ |
53 |
+LICENSE="GPL-2 LGPL-2.1" |
54 |
+SLOT="0/$(ver_cut 1-2)" |
55 |
+IUSE="+crypt doc examples +slz +net_ns +pcre pcre-jit pcre2 pcre2-jit prometheus-exporter |
56 |
+ssl systemd +threads tools vim-syntax zlib lua device-atlas 51degrees wurfl" |
57 |
+REQUIRED_USE="pcre-jit? ( pcre ) |
58 |
+ pcre2-jit? ( pcre2 ) |
59 |
+ pcre? ( !pcre2 ) |
60 |
+ device-atlas? ( pcre ) |
61 |
+ ?? ( slz zlib )" |
62 |
+ |
63 |
+DEPEND=" |
64 |
+ pcre? ( |
65 |
+ dev-libs/libpcre |
66 |
+ pcre-jit? ( dev-libs/libpcre[jit] ) |
67 |
+ ) |
68 |
+ pcre2? ( |
69 |
+ dev-libs/libpcre |
70 |
+ pcre2-jit? ( dev-libs/libpcre2[jit] ) |
71 |
+ ) |
72 |
+ ssl? ( |
73 |
+ dev-libs/openssl:0=[zlib?] |
74 |
+ ) |
75 |
+ systemd? ( sys-apps/systemd ) |
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 |
+ acct-group/haproxy |
81 |
+ acct-user/haproxy" |
82 |
+ |
83 |
+S="${WORKDIR}/${MY_P}" |
84 |
+ |
85 |
+DOCS=( CHANGELOG CONTRIBUTING MAINTAINERS README ) |
86 |
+EXTRAS=( admin/halog admin/iprange dev/tcploop dev/hpack ) |
87 |
+ |
88 |
+haproxy_use() { |
89 |
+ (( $# != 2 )) && die "${FUNCNAME} <USE flag> <make option>" |
90 |
+ |
91 |
+ usex "${1}" "USE_${2}=1" "USE_${2}=" |
92 |
+} |
93 |
+ |
94 |
+pkg_setup() { |
95 |
+ if use net_ns; then |
96 |
+ CONFIG_CHECK="~NET_NS" |
97 |
+ linux-info_pkg_setup |
98 |
+ fi |
99 |
+} |
100 |
+ |
101 |
+src_compile() { |
102 |
+ local -a args=( |
103 |
+ V=1 |
104 |
+ TARGET=linux-glibc |
105 |
+ ) |
106 |
+ |
107 |
+ # TODO: PCRE2_WIDTH? |
108 |
+ args+=( $(haproxy_use threads THREAD) ) |
109 |
+ args+=( $(haproxy_use crypt LIBCRYPT) ) |
110 |
+ args+=( $(haproxy_use net_ns NS) ) |
111 |
+ args+=( $(haproxy_use pcre PCRE) ) |
112 |
+ args+=( $(haproxy_use pcre-jit PCRE_JIT) ) |
113 |
+ args+=( $(haproxy_use pcre2 PCRE2) ) |
114 |
+ args+=( $(haproxy_use pcre2-jit PCRE2_JIT) ) |
115 |
+ args+=( $(haproxy_use ssl OPENSSL) ) |
116 |
+ args+=( $(haproxy_use slz SLZ) ) |
117 |
+ args+=( $(haproxy_use zlib ZLIB) ) |
118 |
+ args+=( $(haproxy_use lua LUA) ) |
119 |
+ args+=( $(haproxy_use 51degrees 51DEGREES) ) |
120 |
+ args+=( $(haproxy_use device-atlas DEVICEATLAS) ) |
121 |
+ args+=( $(haproxy_use wurfl WURFL) ) |
122 |
+ args+=( $(haproxy_use systemd SYSTEMD) ) |
123 |
+ args+=( $(haproxy_use prometheus-exporter PROMEX) ) |
124 |
+ |
125 |
+ # Bug #668002 |
126 |
+ if use ppc || use arm || use hppa; then |
127 |
+ TARGET_LDFLAGS=-latomic |
128 |
+ fi |
129 |
+ |
130 |
+ # HAProxy really needs some of those "SPEC_CFLAGS", like -fno-strict-aliasing |
131 |
+ 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[@]} |
132 |
+ 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 |
133 |
+ |
134 |
+ if use tools ; then |
135 |
+ for extra in ${EXTRAS[@]} ; do |
136 |
+ if [ "${extra}" = "admin/halog" ]; then |
137 |
+ 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 |
138 |
+ elif [ "${extra}" = "dev/hpack" ]; then |
139 |
+ 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} |
140 |
+ else |
141 |
+ # Those two includes are a workaround for hpack Makefile missing those |
142 |
+ emake -C ${extra} \ |
143 |
+ CFLAGS="${CFLAGS} -I../../include/ -I../../ebtree/" OPTIMIZE="${CFLAGS}" LDFLAGS="${LDFLAGS}" CC=$(tc-getCC) ${args[@]} |
144 |
+ fi |
145 |
+ done |
146 |
+ fi |
147 |
+} |
148 |
+ |
149 |
+src_install() { |
150 |
+ dosbin haproxy |
151 |
+ dosym ../sbin/haproxy /usr/bin/haproxy |
152 |
+ |
153 |
+ newconfd "${FILESDIR}/${PN}.confd" ${PN} |
154 |
+ newinitd "${FILESDIR}/${PN}.initd-r6" ${PN} |
155 |
+ |
156 |
+ doman doc/haproxy.1 |
157 |
+ |
158 |
+ systemd_dounit admin/systemd/haproxy.service |
159 |
+ |
160 |
+ einstalldocs |
161 |
+ |
162 |
+ # The errorfiles are used by upstream defaults. |
163 |
+ insinto /etc/haproxy/errors/ |
164 |
+ doins examples/errorfiles/* |
165 |
+ |
166 |
+ if use doc; then |
167 |
+ dodoc ROADMAP doc/*.txt |
168 |
+ #if use lua; then |
169 |
+ # TODO: doc/lua-api/ |
170 |
+ #fi |
171 |
+ fi |
172 |
+ |
173 |
+ if use tools ; then |
174 |
+ has admin/halog "${EXTRAS[@]}" && dobin admin/halog/halog |
175 |
+ has admin/iprange "${EXTRAS[@]}" && { newbin admin/iprange/iprange haproxy_iprange; newbin admin/iprange/ip6range haproxy_ip6range; } |
176 |
+ has dev/tcploop "${EXTRAS[@]}" && newbin dev/tcploop/tcploop haproxy_tcploop |
177 |
+ has dev/hpack "${EXTRAS[@]}" && { |
178 |
+ newbin dev/hpack/gen-rht haproxy_gen-rht |
179 |
+ newbin dev/hpack/gen-enc haproxy_gen-enc |
180 |
+ newbin dev/hpack/decode haproxy_decode |
181 |
+ } |
182 |
+ fi |
183 |
+ |
184 |
+ if use examples ; then |
185 |
+ docinto examples |
186 |
+ dodoc examples/*.cfg |
187 |
+ dodoc doc/seamless_reload.txt |
188 |
+ fi |
189 |
+ |
190 |
+ if use vim-syntax ; then |
191 |
+ insinto /usr/share/vim/vimfiles/syntax |
192 |
+ doins admin/syntax-highlight/haproxy.vim |
193 |
+ fi |
194 |
+} |
195 |
+ |
196 |
+pkg_postinst() { |
197 |
+ if [[ ! -f "${EROOT}/etc/haproxy/haproxy.cfg" ]] ; then |
198 |
+ ewarn "You need to create /etc/haproxy/haproxy.cfg before you start the haproxy service." |
199 |
+ ewarn "It's best practice to not run haproxy as root, user and group haproxy was therefore created." |
200 |
+ ewarn "Make use of them with the \"user\" and \"group\" directives." |
201 |
+ |
202 |
+ if [[ -d "${EROOT}/usr/share/doc/${PF}" ]]; then |
203 |
+ einfo "Please consult the installed documentation for learning the configuration file's syntax." |
204 |
+ einfo "The documentation and sample configuration files are installed here:" |
205 |
+ einfo " ${EROOT}/usr/share/doc/${PF}" |
206 |
+ fi |
207 |
+ fi |
208 |
+} |