From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id EF6E1138330 for ; Wed, 28 Sep 2016 19:54:05 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 3E867E0850; Wed, 28 Sep 2016 19:54:04 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 0DBB0E0850 for ; Wed, 28 Sep 2016 19:54:03 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id C67F834092E for ; Wed, 28 Sep 2016 19:54:02 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id D8C472490 for ; Wed, 28 Sep 2016 19:54:00 +0000 (UTC) From: "Christian Ruppert" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Christian Ruppert" Message-ID: <1475092430.0848c9412a70bd44c065e2da79c97aeedac9c2d9.idl0r@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: net-proxy/haproxy/ X-VCS-Repository: repo/gentoo X-VCS-Files: net-proxy/haproxy/haproxy-9999.ebuild X-VCS-Directories: net-proxy/haproxy/ X-VCS-Committer: idl0r X-VCS-Committer-Name: Christian Ruppert X-VCS-Revision: 0848c9412a70bd44c065e2da79c97aeedac9c2d9 X-VCS-Branch: master Date: Wed, 28 Sep 2016 19:54:00 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 98e1a72c-4dbc-4914-a60f-aabd62ce95e3 X-Archives-Hash: c0c12adc3a1323b4bf19ef7791ac6967 commit: 0848c9412a70bd44c065e2da79c97aeedac9c2d9 Author: Bertrand Jacquin jacquin bzh> AuthorDate: Sat Sep 10 23:58:55 2016 +0000 Commit: Christian Ruppert gentoo org> CommitDate: Wed Sep 28 19:53:50 2016 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0848c941 net-proxy/haproxy: Move to EAPI 6 and git-r3 Sync live ebuild with 1.6.9 Package-Manager: portage-2.2.28 Closes: https://github.com/gentoo/gentoo/pull/2293 Signed-off-by: Christian Ruppert gentoo.org> net-proxy/haproxy/haproxy-9999.ebuild | 72 +++++++++++++++++++++++++---------- 1 file changed, 51 insertions(+), 21 deletions(-) diff --git a/net-proxy/haproxy/haproxy-9999.ebuild b/net-proxy/haproxy/haproxy-9999.ebuild index 6306bfa..42be396 100644 --- a/net-proxy/haproxy/haproxy-9999.ebuild +++ b/net-proxy/haproxy/haproxy-9999.ebuild @@ -2,9 +2,9 @@ # Distributed under the terms of the GNU General Public License v2 # $Id$ -EAPI="5" +EAPI="6" -inherit user versionator toolchain-funcs flag-o-matic git-2 systemd +inherit user versionator toolchain-funcs flag-o-matic systemd linux-info git-r3 MY_P="${PN}-${PV/_beta/-dev}" @@ -15,7 +15,7 @@ EGIT_REPO_URI="http://master.formilux.org/git/people/willy/haproxy.git" LICENSE="GPL-2 LGPL-2.1" SLOT="0" KEYWORDS="" -IUSE="+crypt examples libressl +pcre pcre-jit ssl tools vim-syntax +zlib" +IUSE="+crypt doc examples libressl net_ns +pcre pcre-jit ssl tools vim-syntax +zlib" # lua DEPEND=" pcre? ( @@ -27,16 +27,26 @@ DEPEND=" libressl? ( dev-libs/libressl:0= ) ) zlib? ( sys-libs/zlib )" +# lua? ( dev-lang/lua:5.3 ) RDEPEND="${DEPEND}" S="${WORKDIR}/${MY_P}" +DOCS=( CHANGELOG CONTRIBUTING MAINTAINERS ) + pkg_setup() { enewgroup haproxy enewuser haproxy -1 -1 -1 haproxy + + if use net_ns; then + CONFIG_CHECK="~NET_NS" + linux-info_pkg_setup + fi } src_prepare() { + default + sed -e 's:@SBINDIR@:'/usr/bin':' contrib/systemd/haproxy.service.in \ > contrib/systemd/haproxy.service || die @@ -46,6 +56,25 @@ src_prepare() { src_compile() { local args="TARGET=linux2628 USE_GETADDRINFO=1" + if use crypt ; then + args="${args} USE_LIBCRYPT=1" + else + args="${args} USE_LIBCRYPT=" + fi + +# bug 541042 +# if use lua; then +# args="${args} USE_LUA=1" +# else + args="${args} USE_LUA=" +# fi + + if use net_ns; then + args="${args} USE_NS=1" + else + args="${args} USE_NS=" + fi + if use pcre ; then args="${args} USE_PCRE=1" if use pcre-jit; then @@ -63,12 +92,6 @@ src_compile() { # args="${args} USE_LINUX_SPLICE= USE_LINUX_TPROXY=" # fi - if use crypt ; then - args="${args} USE_LIBCRYPT=1" - else - args="${args} USE_LIBCRYPT=" - fi - if use ssl ; then args="${args} USE_OPENSSL=1" else @@ -97,26 +120,33 @@ src_compile() { src_install() { dobin haproxy - newinitd "${FILESDIR}/haproxy.initd-r2" haproxy - - # Don't install useless files -# rm examples/build.cfg doc/*gpl.txt + newconfd "${FILESDIR}/${PN}.confd" $PN + newinitd "${FILESDIR}/${PN}.initd-r3" $PN - dodoc CHANGELOG ROADMAP doc/{configuration,haproxy-en}.txt doman doc/haproxy.1 dobin haproxy-systemd-wrapper systemd_dounit contrib/systemd/haproxy.service + einstalldocs + + if use doc; then + dodoc ROADMAP doc/{close-options,configuration,cookie-options,intro,linux-syn-cookies,management,proxy-protocol}.txt + fi + if use tools ; then - for contrib in halog iprange ; do - dobin contrib/${contrib}/${contrib} - done + dobin contrib/halog/halog + newbin contrib/iprange/iprange haproxy_iprange + fi + + if use net_ns && use doc; then + dodoc doc/network-namespaces.txt fi if use examples ; then docinto examples dodoc examples/*.cfg + dodoc examples/seamless_reload.txt fi if use vim-syntax ; then @@ -126,15 +156,15 @@ src_install() { } pkg_postinst() { - if [[ ! -f "${ROOT}/etc/haproxy.cfg" ]] ; then - ewarn "You need to create /etc/haproxy.cfg before you start the haproxy service." + if [[ ! -f "${EROOT}/etc/haproxy/haproxy.cfg" ]] ; then + ewarn "You need to create /etc/haproxy/haproxy.cfg before you start the haproxy service." ewarn "It's best practice to not run haproxy as root, user and group haproxy was therefore created." ewarn "Make use of them with the \"user\" and \"group\" directives." - if [[ -d "${ROOT}/usr/share/doc/${PF}" ]]; then + if [[ -d "${EROOT}/usr/share/doc/${PF}" ]]; then einfo "Please consult the installed documentation for learning the configuration file's syntax." einfo "The documentation and sample configuration files are installed here:" - einfo " ${ROOT}usr/share/doc/${PF}" + einfo " ${EROOT}usr/share/doc/${PF}" fi fi }