From 8aebb228036d5e2863b7eaa6e319ab41c1669269 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Mon, 16 Apr 2018 16:47:37 +0100 Subject: gentoo resync : 16.04.2018 --- net-proxy/haproxy/Manifest | 6 +- net-proxy/haproxy/haproxy-1.8.3.ebuild | 169 --------------------------------- net-proxy/haproxy/haproxy-1.8.4.ebuild | 169 --------------------------------- net-proxy/haproxy/haproxy-1.8.7.ebuild | 169 +++++++++++++++++++++++++++++++++ 4 files changed, 171 insertions(+), 342 deletions(-) delete mode 100644 net-proxy/haproxy/haproxy-1.8.3.ebuild delete mode 100644 net-proxy/haproxy/haproxy-1.8.4.ebuild create mode 100644 net-proxy/haproxy/haproxy-1.8.7.ebuild (limited to 'net-proxy/haproxy') diff --git a/net-proxy/haproxy/Manifest b/net-proxy/haproxy/Manifest index e9bf04547bf2..cd1100fa5034 100644 --- a/net-proxy/haproxy/Manifest +++ b/net-proxy/haproxy/Manifest @@ -7,14 +7,12 @@ DIST haproxy-1.5.19.tar.gz 1362834 BLAKE2B 72543acf3e78b804e778746ae0dbd1a386e31 DIST haproxy-1.6.11.tar.gz 1574029 BLAKE2B 553f74c2c24a1b07cef2acc6fbc4def1bbe81e41a7b01ba44937c6ff2e14c1f1a4f1472dde229ecef1ed3170f4e89d356324cb2ce1e7d7064837f37fbd4c3b46 SHA512 73ff1c7301197b3bd75a3b1355787419676854d132ce2dcdacb2a296e297dcdfc52b0c571a4fb715e369f1126e1a58196fabb21f828c880f15904032da78e434 DIST haproxy-1.6.14.tar.gz 1583859 BLAKE2B 91695f0b3d901ba70b6bce6572c2f549479c28010ed391b20faae7cd1fd84cdb181e560353337eb9230e38ac2570673725884c131501820c3ef4559ef12f95f2 SHA512 389be3935d901af1fb3a748b5bf73a454578a3ca3e4cc0b881980c2f1e875c47feb2681b42f8d9244d70777261a965c8e47cf5175b7790ff995bff8333902a11 DIST haproxy-1.7.10.tar.gz 1750937 BLAKE2B 26d970862e415b079d4130fd00564677584a7aad74d6812cabed36de9a629321330434b7d4fdf7c2e8b2945b7f394ca33e444158e7fa9b49937db501ea33e78a SHA512 ca6c50848c559ee2ffb9af2d281c3931473dd90d1686d95d962cf604cd92d2feb2b63e006e217cf9078cf08fdd73dc523318c97e13400bc0ef325de47111394e -DIST haproxy-1.8.3.tar.gz 2043861 BLAKE2B 7da143e783cf443f148389947361f0116428c694d68451b6a9c684547d7dbdc89b25b43bad72f94337d143a2c1c185776a12008d969f985605e2601eb58ccd11 SHA512 6118ccbcfe07d96c2cce1a78c30db9c428f8b64e64fc3f5660392a501ecbaefdc5b10bea2f65c6bb3d8e7763b3e17db4ee34e13f689474f8243b52250e212600 -DIST haproxy-1.8.4.tar.gz 2049789 BLAKE2B 30c5c0ed9e149d0cc3ec418dd737945c0646ff661747c8d0c27235ee9302ff85a0f3ea0a078837e24966c3c7f7dbc092c411bf1ee36a27961aaed8ce485fcdea SHA512 618a03062e832260249610d90b3a9ebd171d8a1b0921903f5f3447484bab552ef9399e431417cf3cf4927ac345fe4d2a345ee8513e209b22e0700f5b1edbf86c +DIST haproxy-1.8.7.tar.gz 2053310 BLAKE2B 629334f7ba9637231f5d731ea7db8554aa98c4a4919173e9049abae69818d622e7cd651e56321f9abd04a0ad9e164847aca252a28e5db637a35df2fa2ef9a553 SHA512 f3bbd138d389fcd55d9db2837f6261face3399a95493b3eaf6b33e19bc404d3564abbc42698573a5f94c22ea3d1e41cd604c1d879a73dd83740cf325b867231c EBUILD haproxy-1.5.14.ebuild 3269 BLAKE2B fed37e73d128612260d8266045891a5e271ba399ee61af005409ab07b089297f4ca39adb67c50e0721efa9b7cdc112f0d5d30a65cb60ac027684ddb69e606c9c SHA512 41d1cfec30d177661f4402143ccf1335f5407adeb9f1581ea866011b1ec26c99da67fb2edd33e71e96b64665fa9c62641fd4b5dc1cd1383cc49877a0ce4292b4 EBUILD haproxy-1.5.19-r2.ebuild 3283 BLAKE2B 698bb63a7c0b97aa62e1c3b12de9689ababa6407dc98870bd73fed0d7aad4f2e08f13faf466aa40d8c420618dcd82e2292a54b4a779772a8e106e7f88194c7b0 SHA512 f8056a851fb9800bcced3827d1294b8b81115c5da3ae603067bb4d10e276c9e053823ba72ebabf21955a7fe241911256e87d4f086eb029a5c1e3d144c15ebfc3 EBUILD haproxy-1.6.11-r2.ebuild 4672 BLAKE2B 74b3adb390a7fa1d596e8e91f4ca5fbb46d7dfd201527956a514a3f0855f575b2fc1115b388126d8e54a1a80f13b5b62acb59f53eb92a5bd9ef3f02ab3867c38 SHA512 843c39796ab641d5036dc2f1d151da41acc5820713dd2c2857c551d684b0a5922abead4e9c2afb031bb75635842e9ead645ced6d9cebfa97ccc2f719caed8c58 EBUILD haproxy-1.6.14.ebuild 4608 BLAKE2B d85f4160498f8af8fcc05ccdbe68d771b9d8b5cc71412be2c7430cf769c091f75030d678bf29f56d3bbb432c04f26fd45686333c8b2e282c25ae2dee7eceeb00 SHA512 32ae8badac30ea423613301815c4ccb07a6b81368dc92dc561f13d7432cde041048735cc4790659b4f1827a77e7009120e7977a54a15d164229a41d54d1b1e1b EBUILD haproxy-1.7.10.ebuild 4628 BLAKE2B 267e5228e4c1eb2386ab13a6f21d018e8f8643d9adcdb61851d150b281e2241eda97c701b4577fef8feee00c01409f8f2fc715a9681874fc05fc3f89c09da440 SHA512 941f9c3e0982ee44d51339b3feef43d93c7259413f2d77f8919e63056a0d0504468bd0637965141842af6c8dbb223f23155ffc0728f54bc1bbf539eef678c235 -EBUILD haproxy-1.8.3.ebuild 4890 BLAKE2B 6fbd57c19ba5f561eedc6d03de1bb0128a8c9071e07a5a26195af97807186bfb9f0c69c7c1f4ef2b1164fa5ceea9a5d0fa45bcb3e1df1b299c9ca360d52a8601 SHA512 aa85af8f52c8c56b2a35a5dda1d9e114db4f14044336da5284d31635ec580610c97f4c91f66cd45814386b063f682378ce2a8bf262f6adf68b5bfe29a00f08a4 -EBUILD haproxy-1.8.4.ebuild 4889 BLAKE2B a40d2bf75ece4fcba6f0ac6e8bfcf81763ded4b315781183230a8b514f5931de4c383afbe8d4152f4d2d4d496fd2421f2f10d04e4240b52a7ab15f3c31bc0864 SHA512 2e132cd3018d845450a94857a544c0306a5cf0efe08d5102a7096a424355a4b628bf85c69f02f812577d134ebabef197aa2bb4ff6f5b8f8d3609d072a55af86e +EBUILD haproxy-1.8.7.ebuild 4889 BLAKE2B a40d2bf75ece4fcba6f0ac6e8bfcf81763ded4b315781183230a8b514f5931de4c383afbe8d4152f4d2d4d496fd2421f2f10d04e4240b52a7ab15f3c31bc0864 SHA512 2e132cd3018d845450a94857a544c0306a5cf0efe08d5102a7096a424355a4b628bf85c69f02f812577d134ebabef197aa2bb4ff6f5b8f8d3609d072a55af86e EBUILD haproxy-1.9.9999.ebuild 4889 BLAKE2B a40d2bf75ece4fcba6f0ac6e8bfcf81763ded4b315781183230a8b514f5931de4c383afbe8d4152f4d2d4d496fd2421f2f10d04e4240b52a7ab15f3c31bc0864 SHA512 2e132cd3018d845450a94857a544c0306a5cf0efe08d5102a7096a424355a4b628bf85c69f02f812577d134ebabef197aa2bb4ff6f5b8f8d3609d072a55af86e MISC metadata.xml 2071 BLAKE2B 303b68ae0788743ec5a8d893e69a87fd2d22188b2166f75c23cd2a47c06e69bfe43745016fafd64b5b298f7b56453fcbfb6b4d9bfede1e08e0c603bce7b0955f SHA512 4ac7fd3dcae2293fa3cdb54fba7dfd9cfbc28f5fca33442dd970861ca26672a0b21d825d36099fbf234831a403fb41eabe02d48eca2a971eaef857516427394b diff --git a/net-proxy/haproxy/haproxy-1.8.3.ebuild b/net-proxy/haproxy/haproxy-1.8.3.ebuild deleted file mode 100644 index 7827f2e5bddc..000000000000 --- a/net-proxy/haproxy/haproxy-1.8.3.ebuild +++ /dev/null @@ -1,169 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI="6" - -[[ ${PV} == *9999 ]] && SCM="git-r3" -inherit user versionator toolchain-funcs flag-o-matic systemd linux-info $SCM - -MY_P="${PN}-${PV/_beta/-dev}" - -DESCRIPTION="A TCP/HTTP reverse proxy for high availability environments" -HOMEPAGE="http://haproxy.1wt.eu" -if [[ ${PV} != *9999 ]]; then - SRC_URI="http://haproxy.1wt.eu/download/$(get_version_component_range 1-2)/src/${MY_P}.tar.gz" - KEYWORDS="~amd64 ~arm ~ppc ~x86" -else - EGIT_REPO_URI="http://git.haproxy.org/git/haproxy-$(get_version_component_range 1-2).git/" - EGIT_BRANCH=master -fi - -LICENSE="GPL-2 LGPL-2.1" -SLOT="0" -IUSE="+crypt doc examples libressl slz net_ns +pcre pcre-jit pcre2 pcre2-jit ssl -systemd +threads tools vim-syntax +zlib lua device-atlas 51degrees wurfl" -REQUIRED_USE="pcre-jit? ( pcre ) - pcre2-jit? ( pcre2 ) - pcre? ( !pcre2 ) - device-atlas? ( pcre ) - ?? ( slz zlib )" - -DEPEND=" - pcre? ( - dev-libs/libpcre - pcre-jit? ( dev-libs/libpcre[jit] ) - ) - pcre2? ( - dev-libs/libpcre - pcre2-jit? ( dev-libs/libpcre2[jit] ) - ) - ssl? ( - !libressl? ( dev-libs/openssl:0=[zlib?] ) - libressl? ( dev-libs/libressl:0= ) - ) - slz? ( dev-libs/libslz:= ) - zlib? ( sys-libs/zlib ) - lua? ( dev-lang/lua:5.3 ) - device-atlas? ( dev-libs/device-atlas-api-c )" -RDEPEND="${DEPEND}" - -S="${WORKDIR}/${MY_P}" - -DOCS=( CHANGELOG CONTRIBUTING MAINTAINERS README ) -CONTRIBS=( halog iprange ) -# ip6range is present in 1.6, but broken. -version_is_at_least 1.7.0 $PV && CONTRIBS+=( ip6range spoa_example tcploop ) -# TODO: mod_defender - requires apache / APR, modsecurity - the same -version_is_at_least 1.8.0 $PV && CONTRIBS+=( hpack ) - -haproxy_use() { - (( $# != 2 )) && die "${FUNCNAME} " - - usex "${1}" "USE_${2}=1" "USE_${2}=" -} - -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_compile() { - local -a args=( - TARGET=linux2628 - USE_GETADDRINFO=1 - USE_TFO=1 - ) - - # TODO: PCRE2_WIDTH? - args+=( $(haproxy_use threads THREAD) ) - args+=( $(haproxy_use crypt LIBCRYPT) ) - args+=( $(haproxy_use net_ns NS) ) - args+=( $(haproxy_use pcre PCRE) ) - args+=( $(haproxy_use pcre-jit PCRE_JIT) ) - args+=( $(haproxy_use ssl OPENSSL) ) - args+=( $(haproxy_use slz SLZ) ) - args+=( $(haproxy_use zlib ZLIB) ) - args+=( $(haproxy_use lua LUA) ) - args+=( $(haproxy_use 51degrees 51DEGREES) ) - args+=( $(haproxy_use device-atlas DEVICEATLAS) ) - args+=( $(haproxy_use wurfl WURFL) ) - args+=( $(haproxy_use systemd SYSTEMD) ) - - # For now, until the strict-aliasing breakage will be fixed - append-cflags -fno-strict-aliasing - - emake CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" CC=$(tc-getCC) ${args[@]} - emake -C contrib/systemd SBINDIR=/usr/sbin - - if use tools ; then - for contrib in ${CONTRIBS[@]} ; do - emake -C contrib/${contrib} \ - CFLAGS="${CFLAGS}" OPTIMIZE="${CFLAGS}" LDFLAGS="${LDFLAGS}" CC=$(tc-getCC) ${args[@]} - done - fi -} - -src_install() { - dosbin haproxy - dosym /usr/sbin/haproxy /usr/bin/haproxy - - newconfd "${FILESDIR}/${PN}.confd" $PN - newinitd "${FILESDIR}/${PN}.initd-r6" $PN - - doman doc/haproxy.1 - - systemd_dounit contrib/systemd/haproxy.service - - einstalldocs - - # The errorfiles are used by upstream defaults. - insinto /etc/haproxy/errors/ - doins examples/errorfiles/* - - if use doc; then - dodoc ROADMAP doc/*.txt - #if use lua; then - # TODO: doc/lua-api/ - #fi - fi - - if use tools ; then - has halog "${CONTRIBS[@]}" && dobin contrib/halog/halog - has "iprange" "${CONTRIBS[@]}" && newbin contrib/iprange/iprange haproxy_iprange - has "ip6range" "${CONTRIBS[@]}" && newbin contrib/ip6range/ip6range haproxy_ip6range - has "spoa_example" "${CONTRIBS[@]}" && newbin contrib/spoa_example/spoa haproxy_spoa_example - has "spoa_example" "${CONTRIBS[@]}" && newdoc contrib/spoa_example/README README.spoa_example - has "tcploop" "${CONTRIBS[@]}" && newbin contrib/tcploop/tcploop haproxy_tcploop - has "hpack" "${CONTRIBS[@]}" && newbin contrib/hpack/gen-rht haproxy_hpack - fi - - if use examples ; then - docinto examples - dodoc examples/*.cfg - dodoc examples/seamless_reload.txt - fi - - if use vim-syntax ; then - insinto /usr/share/vim/vimfiles/syntax - doins examples/haproxy.vim - fi -} - -pkg_postinst() { - 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 "${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 " ${EROOT}usr/share/doc/${PF}" - fi - fi -} diff --git a/net-proxy/haproxy/haproxy-1.8.4.ebuild b/net-proxy/haproxy/haproxy-1.8.4.ebuild deleted file mode 100644 index 44131da836d2..000000000000 --- a/net-proxy/haproxy/haproxy-1.8.4.ebuild +++ /dev/null @@ -1,169 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI="6" - -[[ ${PV} == *9999 ]] && SCM="git-r3" -inherit user versionator toolchain-funcs flag-o-matic systemd linux-info $SCM - -MY_P="${PN}-${PV/_beta/-dev}" - -DESCRIPTION="A TCP/HTTP reverse proxy for high availability environments" -HOMEPAGE="http://www.haproxy.org" -if [[ ${PV} != *9999 ]]; then - SRC_URI="http://haproxy.1wt.eu/download/$(get_version_component_range 1-2)/src/${MY_P}.tar.gz" - KEYWORDS="~amd64 ~arm ~ppc ~x86" -else - EGIT_REPO_URI="http://git.haproxy.org/git/haproxy-$(get_version_component_range 1-2).git/" - EGIT_BRANCH=master -fi - -LICENSE="GPL-2 LGPL-2.1" -SLOT="0" -IUSE="+crypt doc examples libressl slz net_ns +pcre pcre-jit pcre2 pcre2-jit ssl -systemd +threads tools vim-syntax +zlib lua device-atlas 51degrees wurfl" -REQUIRED_USE="pcre-jit? ( pcre ) - pcre2-jit? ( pcre2 ) - pcre? ( !pcre2 ) - device-atlas? ( pcre ) - ?? ( slz zlib )" - -DEPEND=" - pcre? ( - dev-libs/libpcre - pcre-jit? ( dev-libs/libpcre[jit] ) - ) - pcre2? ( - dev-libs/libpcre - pcre2-jit? ( dev-libs/libpcre2[jit] ) - ) - ssl? ( - !libressl? ( dev-libs/openssl:0=[zlib?] ) - libressl? ( dev-libs/libressl:0= ) - ) - slz? ( dev-libs/libslz:= ) - zlib? ( sys-libs/zlib ) - lua? ( dev-lang/lua:5.3 ) - device-atlas? ( dev-libs/device-atlas-api-c )" -RDEPEND="${DEPEND}" - -S="${WORKDIR}/${MY_P}" - -DOCS=( CHANGELOG CONTRIBUTING MAINTAINERS README ) -CONTRIBS=( halog iprange ) -# ip6range is present in 1.6, but broken. -version_is_at_least 1.7.0 $PV && CONTRIBS+=( ip6range spoa_example tcploop ) -# TODO: mod_defender - requires apache / APR, modsecurity - the same -version_is_at_least 1.8.0 $PV && CONTRIBS+=( hpack ) - -haproxy_use() { - (( $# != 2 )) && die "${FUNCNAME} " - - usex "${1}" "USE_${2}=1" "USE_${2}=" -} - -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_compile() { - local -a args=( - TARGET=linux2628 - USE_GETADDRINFO=1 - USE_TFO=1 - ) - - # TODO: PCRE2_WIDTH? - args+=( $(haproxy_use threads THREAD) ) - args+=( $(haproxy_use crypt LIBCRYPT) ) - args+=( $(haproxy_use net_ns NS) ) - args+=( $(haproxy_use pcre PCRE) ) - args+=( $(haproxy_use pcre-jit PCRE_JIT) ) - args+=( $(haproxy_use ssl OPENSSL) ) - args+=( $(haproxy_use slz SLZ) ) - args+=( $(haproxy_use zlib ZLIB) ) - args+=( $(haproxy_use lua LUA) ) - args+=( $(haproxy_use 51degrees 51DEGREES) ) - args+=( $(haproxy_use device-atlas DEVICEATLAS) ) - args+=( $(haproxy_use wurfl WURFL) ) - args+=( $(haproxy_use systemd SYSTEMD) ) - - # For now, until the strict-aliasing breakage will be fixed - append-cflags -fno-strict-aliasing - - emake CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" CC=$(tc-getCC) ${args[@]} - emake -C contrib/systemd SBINDIR=/usr/sbin - - if use tools ; then - for contrib in ${CONTRIBS[@]} ; do - emake -C contrib/${contrib} \ - CFLAGS="${CFLAGS}" OPTIMIZE="${CFLAGS}" LDFLAGS="${LDFLAGS}" CC=$(tc-getCC) ${args[@]} - done - fi -} - -src_install() { - dosbin haproxy - dosym ../sbin/haproxy /usr/bin/haproxy - - newconfd "${FILESDIR}/${PN}.confd" $PN - newinitd "${FILESDIR}/${PN}.initd-r6" $PN - - doman doc/haproxy.1 - - systemd_dounit contrib/systemd/haproxy.service - - einstalldocs - - # The errorfiles are used by upstream defaults. - insinto /etc/haproxy/errors/ - doins examples/errorfiles/* - - if use doc; then - dodoc ROADMAP doc/*.txt - #if use lua; then - # TODO: doc/lua-api/ - #fi - fi - - if use tools ; then - has halog "${CONTRIBS[@]}" && dobin contrib/halog/halog - has "iprange" "${CONTRIBS[@]}" && newbin contrib/iprange/iprange haproxy_iprange - has "ip6range" "${CONTRIBS[@]}" && newbin contrib/ip6range/ip6range haproxy_ip6range - has "spoa_example" "${CONTRIBS[@]}" && newbin contrib/spoa_example/spoa haproxy_spoa_example - has "spoa_example" "${CONTRIBS[@]}" && newdoc contrib/spoa_example/README README.spoa_example - has "tcploop" "${CONTRIBS[@]}" && newbin contrib/tcploop/tcploop haproxy_tcploop - has "hpack" "${CONTRIBS[@]}" && newbin contrib/hpack/gen-rht haproxy_hpack - fi - - if use examples ; then - docinto examples - dodoc examples/*.cfg - dodoc examples/seamless_reload.txt - fi - - if use vim-syntax ; then - insinto /usr/share/vim/vimfiles/syntax - doins examples/haproxy.vim - fi -} - -pkg_postinst() { - 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 "${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 " ${EROOT}usr/share/doc/${PF}" - fi - fi -} diff --git a/net-proxy/haproxy/haproxy-1.8.7.ebuild b/net-proxy/haproxy/haproxy-1.8.7.ebuild new file mode 100644 index 000000000000..44131da836d2 --- /dev/null +++ b/net-proxy/haproxy/haproxy-1.8.7.ebuild @@ -0,0 +1,169 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI="6" + +[[ ${PV} == *9999 ]] && SCM="git-r3" +inherit user versionator toolchain-funcs flag-o-matic systemd linux-info $SCM + +MY_P="${PN}-${PV/_beta/-dev}" + +DESCRIPTION="A TCP/HTTP reverse proxy for high availability environments" +HOMEPAGE="http://www.haproxy.org" +if [[ ${PV} != *9999 ]]; then + SRC_URI="http://haproxy.1wt.eu/download/$(get_version_component_range 1-2)/src/${MY_P}.tar.gz" + KEYWORDS="~amd64 ~arm ~ppc ~x86" +else + EGIT_REPO_URI="http://git.haproxy.org/git/haproxy-$(get_version_component_range 1-2).git/" + EGIT_BRANCH=master +fi + +LICENSE="GPL-2 LGPL-2.1" +SLOT="0" +IUSE="+crypt doc examples libressl slz net_ns +pcre pcre-jit pcre2 pcre2-jit ssl +systemd +threads tools vim-syntax +zlib lua device-atlas 51degrees wurfl" +REQUIRED_USE="pcre-jit? ( pcre ) + pcre2-jit? ( pcre2 ) + pcre? ( !pcre2 ) + device-atlas? ( pcre ) + ?? ( slz zlib )" + +DEPEND=" + pcre? ( + dev-libs/libpcre + pcre-jit? ( dev-libs/libpcre[jit] ) + ) + pcre2? ( + dev-libs/libpcre + pcre2-jit? ( dev-libs/libpcre2[jit] ) + ) + ssl? ( + !libressl? ( dev-libs/openssl:0=[zlib?] ) + libressl? ( dev-libs/libressl:0= ) + ) + slz? ( dev-libs/libslz:= ) + zlib? ( sys-libs/zlib ) + lua? ( dev-lang/lua:5.3 ) + device-atlas? ( dev-libs/device-atlas-api-c )" +RDEPEND="${DEPEND}" + +S="${WORKDIR}/${MY_P}" + +DOCS=( CHANGELOG CONTRIBUTING MAINTAINERS README ) +CONTRIBS=( halog iprange ) +# ip6range is present in 1.6, but broken. +version_is_at_least 1.7.0 $PV && CONTRIBS+=( ip6range spoa_example tcploop ) +# TODO: mod_defender - requires apache / APR, modsecurity - the same +version_is_at_least 1.8.0 $PV && CONTRIBS+=( hpack ) + +haproxy_use() { + (( $# != 2 )) && die "${FUNCNAME} " + + usex "${1}" "USE_${2}=1" "USE_${2}=" +} + +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_compile() { + local -a args=( + TARGET=linux2628 + USE_GETADDRINFO=1 + USE_TFO=1 + ) + + # TODO: PCRE2_WIDTH? + args+=( $(haproxy_use threads THREAD) ) + args+=( $(haproxy_use crypt LIBCRYPT) ) + args+=( $(haproxy_use net_ns NS) ) + args+=( $(haproxy_use pcre PCRE) ) + args+=( $(haproxy_use pcre-jit PCRE_JIT) ) + args+=( $(haproxy_use ssl OPENSSL) ) + args+=( $(haproxy_use slz SLZ) ) + args+=( $(haproxy_use zlib ZLIB) ) + args+=( $(haproxy_use lua LUA) ) + args+=( $(haproxy_use 51degrees 51DEGREES) ) + args+=( $(haproxy_use device-atlas DEVICEATLAS) ) + args+=( $(haproxy_use wurfl WURFL) ) + args+=( $(haproxy_use systemd SYSTEMD) ) + + # For now, until the strict-aliasing breakage will be fixed + append-cflags -fno-strict-aliasing + + emake CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" CC=$(tc-getCC) ${args[@]} + emake -C contrib/systemd SBINDIR=/usr/sbin + + if use tools ; then + for contrib in ${CONTRIBS[@]} ; do + emake -C contrib/${contrib} \ + CFLAGS="${CFLAGS}" OPTIMIZE="${CFLAGS}" LDFLAGS="${LDFLAGS}" CC=$(tc-getCC) ${args[@]} + done + fi +} + +src_install() { + dosbin haproxy + dosym ../sbin/haproxy /usr/bin/haproxy + + newconfd "${FILESDIR}/${PN}.confd" $PN + newinitd "${FILESDIR}/${PN}.initd-r6" $PN + + doman doc/haproxy.1 + + systemd_dounit contrib/systemd/haproxy.service + + einstalldocs + + # The errorfiles are used by upstream defaults. + insinto /etc/haproxy/errors/ + doins examples/errorfiles/* + + if use doc; then + dodoc ROADMAP doc/*.txt + #if use lua; then + # TODO: doc/lua-api/ + #fi + fi + + if use tools ; then + has halog "${CONTRIBS[@]}" && dobin contrib/halog/halog + has "iprange" "${CONTRIBS[@]}" && newbin contrib/iprange/iprange haproxy_iprange + has "ip6range" "${CONTRIBS[@]}" && newbin contrib/ip6range/ip6range haproxy_ip6range + has "spoa_example" "${CONTRIBS[@]}" && newbin contrib/spoa_example/spoa haproxy_spoa_example + has "spoa_example" "${CONTRIBS[@]}" && newdoc contrib/spoa_example/README README.spoa_example + has "tcploop" "${CONTRIBS[@]}" && newbin contrib/tcploop/tcploop haproxy_tcploop + has "hpack" "${CONTRIBS[@]}" && newbin contrib/hpack/gen-rht haproxy_hpack + fi + + if use examples ; then + docinto examples + dodoc examples/*.cfg + dodoc examples/seamless_reload.txt + fi + + if use vim-syntax ; then + insinto /usr/share/vim/vimfiles/syntax + doins examples/haproxy.vim + fi +} + +pkg_postinst() { + 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 "${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 " ${EROOT}usr/share/doc/${PF}" + fi + fi +} -- cgit v1.2.3