Gentoo Archives: gentoo-commits

From: "Robin H. Johnson" <robbat2@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-proxy/haproxy/
Date: Tue, 22 Aug 2017 19:21:14
Message-Id: 1503429654.e17d9a71c6cc35c5afea4df5d0251a4aa8f863a1.robbat2@gentoo
1 commit: e17d9a71c6cc35c5afea4df5d0251a4aa8f863a1
2 Author: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
3 AuthorDate: Tue Aug 22 19:20:54 2017 +0000
4 Commit: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
5 CommitDate: Tue Aug 22 19:20:54 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e17d9a71
7
8 net-proxy/haproxy: bump.
9
10 Package-Manager: Portage-2.3.6, Repoman-2.3.3
11
12 net-proxy/haproxy/Manifest | 1 +
13 net-proxy/haproxy/haproxy-1.7.9.ebuild | 159 +++++++++++++++++++++++++++++++++
14 2 files changed, 160 insertions(+)
15
16 diff --git a/net-proxy/haproxy/Manifest b/net-proxy/haproxy/Manifest
17 index 5b8f076d48e..23588fa5466 100644
18 --- a/net-proxy/haproxy/Manifest
19 +++ b/net-proxy/haproxy/Manifest
20 @@ -4,3 +4,4 @@ DIST haproxy-1.6.11.tar.gz 1574029 SHA256 62fe982edb102a9f55205792bc14b0d05745cc
21 DIST haproxy-1.6.13.tar.gz 1580214 SHA256 7d318583f3a1bf185e857bd40449004b29c95547c89bbb36718f284e29502a1b SHA512 ffed3b347e0cd9cefdc379c91890a3c104d6848b976a9f28984878a9c2d05ca7ddea678f7a93f75cb9d29ae2be921e5a5bd295b1a8771765b099d1c619ded7a3 WHIRLPOOL 70176ee090dacbbdc822c74bba137589f168482c560734c06b98dc23b4d957ed1e016309f11f25a0b486bc6917633455f1174dc6688d6aef53667c61b83a9ff3
22 DIST haproxy-1.7.7.tar.gz 1745024 SHA256 81196ca449e4ada45fbd743fe3804bb82c25563ff9653e136872181ee5603ae2 SHA512 aa4720962e94b00c2b6090f62fb875e8977783256d877eb799b6a48c884833bac00b12d04fabd440011007e2af1914e0d67ab485026a447d8a61d58128d04a5a WHIRLPOOL d730dd21f1d8c2132297011e3dfbbbc12b6aa2cc61b67ee1cb9001b9f320e1e403ba917b81c8159fc7e2b43a0e3c95fd27172e1c86aada4963d3a4ecaebb3e2e
23 DIST haproxy-1.7.8.tar.gz 1746321 SHA256 ec90153ccedd20ad4015d3eaf76b502ff1f61b431d54c22b8457b5784a9ae142 SHA512 e1d65c8a4607c01d52628f36f8c7342096267130a0f949474746f571158e4f795281f78765004c214a0527f74ce180760f9cc910d3650d30026776076d721c0c WHIRLPOOL f781963b2cf80bfb6219399120821a4dd035dd89c07dc4191d45e2a7e4eaf6e8439f4eaa3174dd7a93ceb6f156d9124806f9c6490f8715bf127f37f0b33f9e17
24 +DIST haproxy-1.7.9.tar.gz 1748159 SHA256 1072337e54fa188dc6e0cfe3ba4c2200b07082e321cbfe5a0882d85d54db068e SHA512 d1ed791bc9607dbeabcfc6a1853cf258e28b3a079923b63d3bf97504dd59e64a5f5f44f9da968c23c12b4279e8d45ff3bd39418942ca6f00d9d548c9a0ccfd73 WHIRLPOOL efd7671925bfd260c0fce9d611ca24f3253a5553677687e5a136f6371a85852caaa4069df9bd1ba3ebe0d86ebdeef5e3c139609fc922eb0c10467cf28570e151
25
26 diff --git a/net-proxy/haproxy/haproxy-1.7.9.ebuild b/net-proxy/haproxy/haproxy-1.7.9.ebuild
27 new file mode 100644
28 index 00000000000..43c58bdf5bc
29 --- /dev/null
30 +++ b/net-proxy/haproxy/haproxy-1.7.9.ebuild
31 @@ -0,0 +1,159 @@
32 +# Copyright 1999-2017 Gentoo Foundation
33 +# Distributed under the terms of the GNU General Public License v2
34 +
35 +EAPI="6"
36 +
37 +[[ ${PV} == *9999 ]] && SCM="git-r3"
38 +inherit user versionator toolchain-funcs flag-o-matic systemd linux-info $SCM
39 +
40 +MY_P="${PN}-${PV/_beta/-dev}"
41 +
42 +DESCRIPTION="A TCP/HTTP reverse proxy for high availability environments"
43 +HOMEPAGE="http://haproxy.1wt.eu"
44 +if [[ ${PV} != *9999 ]]; then
45 + SRC_URI="http://haproxy.1wt.eu/download/$(get_version_component_range 1-2)/src/${MY_P}.tar.gz"
46 + KEYWORDS="~amd64 ~arm ~ppc ~x86"
47 +else
48 + EGIT_REPO_URI="http://git.haproxy.org/git/haproxy-$(get_version_component_range 1-2).git/"
49 + EGIT_BRANCH=master
50 +fi
51 +
52 +LICENSE="GPL-2 LGPL-2.1"
53 +SLOT="0"
54 +IUSE="+crypt doc examples libressl slz net_ns +pcre pcre-jit ssl tools vim-syntax +zlib lua device-atlas 51degrees wurfl"
55 +REQUIRED_USE="pcre-jit? ( pcre )
56 + device-atlas? ( pcre )
57 + ?? ( slz zlib )"
58 +
59 +DEPEND="
60 + pcre? (
61 + dev-libs/libpcre
62 + pcre-jit? ( dev-libs/libpcre[jit] )
63 + )
64 + ssl? (
65 + !libressl? ( dev-libs/openssl:0=[zlib?] )
66 + libressl? ( dev-libs/libressl:0= )
67 + )
68 + slz? ( dev-libs/libslz:= )
69 + zlib? ( sys-libs/zlib )
70 + lua? ( dev-lang/lua:5.3 )
71 + device-atlas? ( dev-libs/device-atlas-api-c )"
72 +RDEPEND="${DEPEND}"
73 +
74 +S="${WORKDIR}/${MY_P}"
75 +
76 +DOCS=( CHANGELOG CONTRIBUTING MAINTAINERS README )
77 +version_is_at_least 1.7.0 $PV && PATCHES=( "${FILESDIR}"/haproxy-1.7-contrib.patch )
78 +CONTRIBS=( halog iprange )
79 +# ip6range is present in 1.6, but broken.
80 +version_is_at_least 1.7.0 $PV && CONTRIBS+=( ip6range spoa_example tcploop )
81 +
82 +haproxy_use() {
83 + (( $# != 2 )) && die "${FUNCNAME} <USE flag> <make option>"
84 +
85 + usex "${1}" "USE_${2}=1" "USE_${2}="
86 +}
87 +
88 +pkg_setup() {
89 + enewgroup haproxy
90 + enewuser haproxy -1 -1 -1 haproxy
91 +
92 + if use net_ns; then
93 + CONFIG_CHECK="~NET_NS"
94 + linux-info_pkg_setup
95 + fi
96 +}
97 +
98 +src_compile() {
99 + local -a args=(
100 + TARGET=linux2628
101 + USE_GETADDRINFO=1
102 + USE_TFO=1
103 + )
104 +
105 + args+=( $(haproxy_use crypt LIBCRYPT) )
106 + args+=( $(haproxy_use net_ns NS) )
107 + args+=( $(haproxy_use pcre PCRE) )
108 + args+=( $(haproxy_use pcre-jit PCRE_JIT) )
109 + args+=( $(haproxy_use ssl OPENSSL) )
110 + args+=( $(haproxy_use slz SLZ) )
111 + args+=( $(haproxy_use zlib ZLIB) )
112 + args+=( $(haproxy_use lua LUA) )
113 + args+=( $(haproxy_use 51degrees 51DEGREES) )
114 + args+=( $(haproxy_use device-atlas DEVICEATLAS) )
115 + args+=( $(haproxy_use wurfl WURFL) )
116 +
117 + # For now, until the strict-aliasing breakage will be fixed
118 + append-cflags -fno-strict-aliasing
119 +
120 + emake CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" CC=$(tc-getCC) ${args[@]}
121 + emake -C contrib/systemd SBINDIR=/usr/sbin
122 +
123 + if use tools ; then
124 + for contrib in ${CONTRIBS[@]} ; do
125 + emake -C contrib/${contrib} \
126 + CFLAGS="${CFLAGS}" OPTIMIZE="${CFLAGS}" LDFLAGS="${LDFLAGS}" CC=$(tc-getCC) ${args[@]}
127 + done
128 + fi
129 +}
130 +
131 +src_install() {
132 + dosbin haproxy
133 + dosym /usr/sbin/haproxy /usr/bin/haproxy
134 +
135 + newconfd "${FILESDIR}/${PN}.confd" $PN
136 + newinitd "${FILESDIR}/${PN}.initd-r5" $PN
137 +
138 + doman doc/haproxy.1
139 +
140 + dosbin haproxy-systemd-wrapper
141 + dosym /usr/sbin/haproxy-systemd-wrapper /usr/bin/haproxy-systemd-wrapper
142 + systemd_dounit contrib/systemd/haproxy.service
143 +
144 + einstalldocs
145 +
146 + # The errorfiles are used by upstream defaults.
147 + insinto /etc/haproxy/errors/
148 + doins examples/errorfiles/*
149 +
150 + if use doc; then
151 + dodoc ROADMAP doc/*.txt
152 + #if use lua; then
153 + # TODO: doc/lua-api/
154 + #fi
155 + fi
156 +
157 + if use tools ; then
158 + has halog "${CONTRIBS[@]}" && dobin contrib/halog/halog
159 + has "iprange" "${CONTRIBS[@]}" && newbin contrib/iprange/iprange haproxy_iprange
160 + has "ip6range" "${CONTRIBS[@]}" && newbin contrib/ip6range/ip6range haproxy_ip6range
161 + has "spoa_example" "${CONTRIBS[@]}" && newbin contrib/spoa_example/spoa haproxy_spoa_example
162 + has "spoa_example" "${CONTRIBS[@]}" && newdoc contrib/spoa_example/README README.spoa_example
163 + has "tcploop" "${CONTRIBS[@]}" && newbin contrib/tcploop/tcploop haproxy_tcploop
164 + fi
165 +
166 + if use examples ; then
167 + docinto examples
168 + dodoc examples/*.cfg
169 + dodoc examples/seamless_reload.txt
170 + fi
171 +
172 + if use vim-syntax ; then
173 + insinto /usr/share/vim/vimfiles/syntax
174 + doins examples/haproxy.vim
175 + fi
176 +}
177 +
178 +pkg_postinst() {
179 + if [[ ! -f "${EROOT}/etc/haproxy/haproxy.cfg" ]] ; then
180 + ewarn "You need to create /etc/haproxy/haproxy.cfg before you start the haproxy service."
181 + ewarn "It's best practice to not run haproxy as root, user and group haproxy was therefore created."
182 + ewarn "Make use of them with the \"user\" and \"group\" directives."
183 +
184 + if [[ -d "${EROOT}/usr/share/doc/${PF}" ]]; then
185 + einfo "Please consult the installed documentation for learning the configuration file's syntax."
186 + einfo "The documentation and sample configuration files are installed here:"
187 + einfo " ${EROOT}usr/share/doc/${PF}"
188 + fi
189 + fi
190 +}