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: Mon, 05 Dec 2016 15:57:03
Message-Id: 1480953374.e4841bc2c8c4c75e867c0419aa14ccf3c5dd4f35.robbat2@gentoo
1 commit: e4841bc2c8c4c75e867c0419aa14ccf3c5dd4f35
2 Author: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
3 AuthorDate: Sat Dec 3 21:50:50 2016 +0000
4 Commit: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
5 CommitDate: Mon Dec 5 15:56:14 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e4841bc2
7
8 net-proxy/haproxy: bump.
9
10 Package-Manager: portage-2.3.2
11
12 net-proxy/haproxy/Manifest | 1 +
13 net-proxy/haproxy/haproxy-1.6.10.ebuild | 141 ++++++++++++++++++++++++++++++++
14 2 files changed, 142 insertions(+)
15
16 diff --git a/net-proxy/haproxy/Manifest b/net-proxy/haproxy/Manifest
17 index 06b20d1..5439038 100644
18 --- a/net-proxy/haproxy/Manifest
19 +++ b/net-proxy/haproxy/Manifest
20 @@ -1,3 +1,4 @@
21 DIST haproxy-1.5.14.tar.gz 1345345 SHA256 9565dd38649064d0350a2883fa81ccfe92eb17dcda457ebdc01535e1ab0c8f99 SHA512 83d6101fd402f37845ab3febc914335e4c6d9bdebbb0ff81c8e048d5252ffa5a1b77c4250a434fed5dd541ef1f1f2c47d969b59f7a51d6ab9aea38a8646a9798 WHIRLPOOL 7d2c580589b9b31e1eba169e4bf930ac42d2564e21eb1c25adbdd39b701abd221fd671ebc227167ab956a48b2c30eeb740a6394355a8fa748c408ee42fdff6fc
22 DIST haproxy-1.5.18.tar.gz 1360582 SHA256 14a5684d85cf65c34a8d441afff2aaa4dd9b4234e81b3d4ddd242e6e7c97257e SHA512 b4f85986a6b1e0d152b643f576a0ff770fbc190457d3e0130fbb923ff9bf4d00b634e64edf0eadd5b47d0eb758fd9f6ecf33907fc4c21150a518064df954e7d0 WHIRLPOOL 5faf0aec42332564a3c392b0bbca25dc56c6a754672e1853ca765fc5d95d9ca963cd041dc705bbb38085a3da77219adf061966f2caa209e327ff02f3ee8fde3b
23 +DIST haproxy-1.6.10.tar.gz 1571842 SHA256 5c865e0238d31b03ec7e31d4bf1a20d08984eea7fcf4bbb36a40bd35d8744460 SHA512 84920ef12357f5149ed286030ea38e0f9ae09b29003e8c000eef7f50a519ea958f3a92d352b25fd71d296f0b68beffb797ca4b6e59b87e71dc02f7fe20d50573 WHIRLPOOL 2c4d4b22d6412b8f7e4e6c3c94e9a666b87d9e38a6cb07094438d28c5cce2c4ef1fe14df00afeb8ed284f306d5a09616d04a1b4a5b8573c6e8d283cdfe26428b
24 DIST haproxy-1.6.9.tar.gz 1566715 SHA256 cf7d2fa891d2ae4aa6489fc43a9cadf68c42f9cb0de4801afad45d32e7dda133 SHA512 0060a93c628689e1ca9e5845f9f93641f7647efc176cbf093bce59be19496492c317c8101fa50dd6181b130f861c74a20199f18e41ebd6995715364b1ea46a2e WHIRLPOOL a7311cb08507898cf19a422a6a55a6d429cbb99e0329b2de0defea472314c495d6c426a973ef436d532340f95d5abee2ad07fbf1d051d36fe4618ac28b743a35
25
26 diff --git a/net-proxy/haproxy/haproxy-1.6.10.ebuild b/net-proxy/haproxy/haproxy-1.6.10.ebuild
27 new file mode 100644
28 index 00000000..8f3c3a0
29 --- /dev/null
30 +++ b/net-proxy/haproxy/haproxy-1.6.10.ebuild
31 @@ -0,0 +1,141 @@
32 +# Copyright 1999-2016 Gentoo Foundation
33 +# Distributed under the terms of the GNU General Public License v2
34 +# $Id$
35 +
36 +EAPI="6"
37 +
38 +inherit user versionator toolchain-funcs flag-o-matic systemd linux-info
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 +SRC_URI="http://haproxy.1wt.eu/download/$(get_version_component_range 1-2)/src/${MY_P}.tar.gz"
45 +
46 +LICENSE="GPL-2 LGPL-2.1"
47 +SLOT="0"
48 +KEYWORDS="~amd64 ~arm ~ppc ~x86"
49 +IUSE="+crypt doc examples libressl slz net_ns +pcre pcre-jit ssl tools vim-syntax +zlib"
50 +REQUIRED_USE="pcre-jit? ( pcre )
51 + ?? ( slz zlib )"
52 +
53 +DEPEND="
54 + pcre? (
55 + dev-libs/libpcre
56 + pcre-jit? ( dev-libs/libpcre[jit] )
57 + )
58 + ssl? (
59 + !libressl? ( dev-libs/openssl:0=[zlib?] )
60 + libressl? ( dev-libs/libressl:0= )
61 + )
62 + slz? ( dev-libs/libslz:= )
63 + zlib? ( sys-libs/zlib )"
64 +RDEPEND="${DEPEND}"
65 +
66 +S="${WORKDIR}/${MY_P}"
67 +
68 +DOCS=( CHANGELOG CONTRIBUTING MAINTAINERS )
69 +
70 +haproxy_use() {
71 + (( $# != 2 )) && die "${FUNCNAME} <USE flag> <make option>"
72 +
73 + usex "${1}" "USE_${2}=1" "USE_${2}="
74 +}
75 +
76 +pkg_setup() {
77 + enewgroup haproxy
78 + enewuser haproxy -1 -1 -1 haproxy
79 +
80 + if use net_ns; then
81 + CONFIG_CHECK="~NET_NS"
82 + linux-info_pkg_setup
83 + fi
84 +}
85 +
86 +src_prepare() {
87 + default
88 +
89 + sed -e 's:@SBINDIR@:'/usr/bin':' contrib/systemd/haproxy.service.in \
90 + > contrib/systemd/haproxy.service || die
91 +
92 + sed -ie 's:/usr/sbin/haproxy:/usr/bin/haproxy:' src/haproxy-systemd-wrapper.c || die
93 +}
94 +
95 +src_compile() {
96 + local -a args=(
97 + TARGET=linux2628
98 + USE_GETADDRINFO=1
99 + )
100 +
101 + args+=( $(haproxy_use crypt LIBCRYPT) )
102 + args+=( $(haproxy_use net_ns NS) )
103 + args+=( $(haproxy_use pcre PCRE) )
104 + args+=( $(haproxy_use pcre-jit PCRE_JIT) )
105 + args+=( $(haproxy_use ssl OPENSSL) )
106 + args+=( $(haproxy_use slz SLZ) )
107 + args+=( $(haproxy_use zlib ZLIB) )
108 +
109 + # For now, until the strict-aliasing breakage will be fixed
110 + append-cflags -fno-strict-aliasing
111 +
112 + emake CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" CC=$(tc-getCC) ${args[@]}
113 +
114 + if use tools ; then
115 + for contrib in halog iprange ; do
116 + emake -C contrib/${contrib} \
117 + CFLAGS="${CFLAGS}" OPTIMIZE="${CFLAGS}" LDFLAGS="${LDFLAGS}" CC=$(tc-getCC) ${args[@]}
118 + done
119 + fi
120 +}
121 +
122 +src_install() {
123 + dobin haproxy
124 +
125 + newconfd "${FILESDIR}/${PN}.confd" $PN
126 + newinitd "${FILESDIR}/${PN}.initd-r3" $PN
127 +
128 + doman doc/haproxy.1
129 +
130 + dobin haproxy-systemd-wrapper
131 + systemd_dounit contrib/systemd/haproxy.service
132 +
133 + einstalldocs
134 +
135 + if use doc; then
136 + dodoc ROADMAP doc/{close-options,configuration,cookie-options,intro,linux-syn-cookies,management,proxy-protocol}.txt
137 + fi
138 +
139 + if use tools ; then
140 + dobin contrib/halog/halog
141 + newbin contrib/iprange/iprange haproxy_iprange
142 + fi
143 +
144 + if use net_ns && use doc; then
145 + dodoc doc/network-namespaces.txt
146 + fi
147 +
148 + if use examples ; then
149 + docinto examples
150 + dodoc examples/*.cfg
151 + dodoc examples/seamless_reload.txt
152 + fi
153 +
154 + if use vim-syntax ; then
155 + insinto /usr/share/vim/vimfiles/syntax
156 + doins examples/haproxy.vim
157 + fi
158 +}
159 +
160 +pkg_postinst() {
161 + if [[ ! -f "${EROOT}/etc/haproxy/haproxy.cfg" ]] ; then
162 + ewarn "You need to create /etc/haproxy/haproxy.cfg before you start the haproxy service."
163 + ewarn "It's best practice to not run haproxy as root, user and group haproxy was therefore created."
164 + ewarn "Make use of them with the \"user\" and \"group\" directives."
165 +
166 + if [[ -d "${EROOT}/usr/share/doc/${PF}" ]]; then
167 + einfo "Please consult the installed documentation for learning the configuration file's syntax."
168 + einfo "The documentation and sample configuration files are installed here:"
169 + einfo " ${EROOT}usr/share/doc/${PF}"
170 + fi
171 + fi
172 +}