From 65737cf14a7220bd9a487aa2af4ae0e79bd23e86 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Mon, 8 Jan 2018 21:45:04 +0000 Subject: gentoo resync : 08.01.2018 --- net-proxy/haproxy/Manifest | 15 +-- net-proxy/haproxy/haproxy-1.6.13-r3.ebuild | 158 ------------------------- net-proxy/haproxy/haproxy-1.6.14.ebuild | 158 +++++++++++++++++++++++++ net-proxy/haproxy/haproxy-1.6.9999-r2.ebuild | 3 +- net-proxy/haproxy/haproxy-1.7.10.ebuild | 159 +++++++++++++++++++++++++ net-proxy/haproxy/haproxy-1.7.9-r1.ebuild | 159 ------------------------- net-proxy/haproxy/haproxy-1.8.1.ebuild | 169 --------------------------- net-proxy/haproxy/haproxy-1.8.3.ebuild | 169 +++++++++++++++++++++++++++ net-proxy/haproxy/haproxy-1.8.9999.ebuild | 169 +++++++++++++++++++++++++++ 9 files changed, 664 insertions(+), 495 deletions(-) delete mode 100644 net-proxy/haproxy/haproxy-1.6.13-r3.ebuild create mode 100644 net-proxy/haproxy/haproxy-1.6.14.ebuild create mode 100644 net-proxy/haproxy/haproxy-1.7.10.ebuild delete mode 100644 net-proxy/haproxy/haproxy-1.7.9-r1.ebuild delete mode 100644 net-proxy/haproxy/haproxy-1.8.1.ebuild create mode 100644 net-proxy/haproxy/haproxy-1.8.3.ebuild create mode 100644 net-proxy/haproxy/haproxy-1.8.9999.ebuild (limited to 'net-proxy/haproxy') diff --git a/net-proxy/haproxy/Manifest b/net-proxy/haproxy/Manifest index 1c8c2d4c629b..90e0b991dfa2 100644 --- a/net-proxy/haproxy/Manifest +++ b/net-proxy/haproxy/Manifest @@ -5,15 +5,16 @@ AUX haproxy.initd-r6 1705 BLAKE2B af8b9ad2fcb499d7fec97fe4210af8685a15881aa98634 DIST haproxy-1.5.14.tar.gz 1345345 BLAKE2B b2971826c81716f126e3f9cef9861c425a44348fb0824ea65f55c82917f8b80441ee7752bff5e1c1c9cf22492577b0bf256b2955cba7c81f79e1e19616eb7a41 SHA512 83d6101fd402f37845ab3febc914335e4c6d9bdebbb0ff81c8e048d5252ffa5a1b77c4250a434fed5dd541ef1f1f2c47d969b59f7a51d6ab9aea38a8646a9798 DIST haproxy-1.5.19.tar.gz 1362834 BLAKE2B 72543acf3e78b804e778746ae0dbd1a386e31c9f3f956d91da49e5c4c5f2ace8e46e99372148e7cb97f52a1812501c21319c06eb0230928522d674825b3b1e17 SHA512 3462458350d76fe5634428f7b443f21e2d8d4a171ab6254736db2d64587707d11d0df1d851d629c5a2cdfb2858e98cc9345d592859c6d6d8a352b57542dc465a DIST haproxy-1.6.11.tar.gz 1574029 BLAKE2B 553f74c2c24a1b07cef2acc6fbc4def1bbe81e41a7b01ba44937c6ff2e14c1f1a4f1472dde229ecef1ed3170f4e89d356324cb2ce1e7d7064837f37fbd4c3b46 SHA512 73ff1c7301197b3bd75a3b1355787419676854d132ce2dcdacb2a296e297dcdfc52b0c571a4fb715e369f1126e1a58196fabb21f828c880f15904032da78e434 -DIST haproxy-1.6.13.tar.gz 1580214 BLAKE2B 099ac0a13c899e247616845a32e8ae91c8ac4814ef971c332156ee46b2002774051953ddc6a8e36d38dcdbd3cac1d86be83f38b189b728e0f7089cc2bdcada37 SHA512 ffed3b347e0cd9cefdc379c91890a3c104d6848b976a9f28984878a9c2d05ca7ddea678f7a93f75cb9d29ae2be921e5a5bd295b1a8771765b099d1c619ded7a3 -DIST haproxy-1.7.9.tar.gz 1748159 BLAKE2B 6826ad3519ff300fb1c91992014834543f971fade8a8b89956d4cd1fc0000b1b3e259586a21ee9fa8ca0ee1f4520517dfc328d83d7a858f469f0366df6e3da43 SHA512 d1ed791bc9607dbeabcfc6a1853cf258e28b3a079923b63d3bf97504dd59e64a5f5f44f9da968c23c12b4279e8d45ff3bd39418942ca6f00d9d548c9a0ccfd73 -DIST haproxy-1.8.1.tar.gz 2038215 BLAKE2B 85365fd581a665ec08eaf799a22cecdb95c59485f4846544aafdce38fce3819778d5adb3a652e9b5560973fef4acd348d13f1d545ccd7abf7c9bc67ce1c82049 SHA512 c59bbd144afae01a3802065bf507dc1ca70f09e7112a9f502474ec6758d3ccab084550372562d2906f1e0b9509464e316ca6f95e3575d7273aba49f350791caa +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 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.13-r3.ebuild 4608 BLAKE2B e0dca86f8ee6c089a066cf876a0444468c449021f990eb0d441531d0e42f8a452ba65bd9670ed11c7b297a5105b676ee89039cef6c999b7e97566af89b5c72db SHA512 22fe6a03bd8ca1ea7a521fe6e5b5c5c46de1b8d99885d4ad4c704c8ca1fa255da8381e6eda60fdd3b639f438c260dc4ea030ae746e8c2a234bf72f9b3e0d37c7 -EBUILD haproxy-1.6.9999-r2.ebuild 4632 BLAKE2B bae769008fcc70608d96b1b620d2b561b1f6bc6fc1eb0e6b49c42b20786532f489749947ee7f77aa9dcbf72ca58456e39323fe8e0b5713cbb3a9156318d62201 SHA512 ce18238aeedbdb806fe7f36d7af3d2725e137d20760f7d8812e0c16c8d2f09998800a2809849745176d2d3139c580e9c843454a8006d6115c03608f7828df950 -EBUILD haproxy-1.7.9-r1.ebuild 4632 BLAKE2B bae769008fcc70608d96b1b620d2b561b1f6bc6fc1eb0e6b49c42b20786532f489749947ee7f77aa9dcbf72ca58456e39323fe8e0b5713cbb3a9156318d62201 SHA512 ce18238aeedbdb806fe7f36d7af3d2725e137d20760f7d8812e0c16c8d2f09998800a2809849745176d2d3139c580e9c843454a8006d6115c03608f7828df950 +EBUILD haproxy-1.6.14.ebuild 4608 BLAKE2B d85f4160498f8af8fcc05ccdbe68d771b9d8b5cc71412be2c7430cf769c091f75030d678bf29f56d3bbb432c04f26fd45686333c8b2e282c25ae2dee7eceeb00 SHA512 32ae8badac30ea423613301815c4ccb07a6b81368dc92dc561f13d7432cde041048735cc4790659b4f1827a77e7009120e7977a54a15d164229a41d54d1b1e1b +EBUILD haproxy-1.6.9999-r2.ebuild 4608 BLAKE2B d85f4160498f8af8fcc05ccdbe68d771b9d8b5cc71412be2c7430cf769c091f75030d678bf29f56d3bbb432c04f26fd45686333c8b2e282c25ae2dee7eceeb00 SHA512 32ae8badac30ea423613301815c4ccb07a6b81368dc92dc561f13d7432cde041048735cc4790659b4f1827a77e7009120e7977a54a15d164229a41d54d1b1e1b +EBUILD haproxy-1.7.10.ebuild 4632 BLAKE2B 06dd613111ce7410ce9190b2cbd825f4b9acd16d3c9995ca507fda90a77696e6c931b2f2caeb916ed0f6894110edaa056df5923c204107230af6a4f596c061ab SHA512 bb080ed92cbef8e2851262648519b5e0563749e3bd92396707791775801bf19f029e57fbe4fa029ea240cbc8f55b14e91d5656e85101fb2dc1e8ae219d111d51 EBUILD haproxy-1.7.9999-r2.ebuild 4632 BLAKE2B bae769008fcc70608d96b1b620d2b561b1f6bc6fc1eb0e6b49c42b20786532f489749947ee7f77aa9dcbf72ca58456e39323fe8e0b5713cbb3a9156318d62201 SHA512 ce18238aeedbdb806fe7f36d7af3d2725e137d20760f7d8812e0c16c8d2f09998800a2809849745176d2d3139c580e9c843454a8006d6115c03608f7828df950 -EBUILD haproxy-1.8.1.ebuild 4890 BLAKE2B 8b9a39786819f7354aabcd727a4bebaa5df077af417641ce990860d59ff0f6e4308758cfd17a1eea91f6fa2fd54d864dc9b2bf442277cd8caa21ef3a8ef4c865 SHA512 20f73269d7438b815b1a3bad3b9731ec1dc8f4835990eab0038e0879a1be77a8875133bc3149ee10aecae77de15d7d15dbaf3f9d76e271af8acd06487421f44c +EBUILD haproxy-1.8.3.ebuild 4890 BLAKE2B 6fbd57c19ba5f561eedc6d03de1bb0128a8c9071e07a5a26195af97807186bfb9f0c69c7c1f4ef2b1164fa5ceea9a5d0fa45bcb3e1df1b299c9ca360d52a8601 SHA512 aa85af8f52c8c56b2a35a5dda1d9e114db4f14044336da5284d31635ec580610c97f4c91f66cd45814386b063f682378ce2a8bf262f6adf68b5bfe29a00f08a4 +EBUILD haproxy-1.8.9999.ebuild 4890 BLAKE2B 6fbd57c19ba5f561eedc6d03de1bb0128a8c9071e07a5a26195af97807186bfb9f0c69c7c1f4ef2b1164fa5ceea9a5d0fa45bcb3e1df1b299c9ca360d52a8601 SHA512 aa85af8f52c8c56b2a35a5dda1d9e114db4f14044336da5284d31635ec580610c97f4c91f66cd45814386b063f682378ce2a8bf262f6adf68b5bfe29a00f08a4 MISC metadata.xml 2071 BLAKE2B 303b68ae0788743ec5a8d893e69a87fd2d22188b2166f75c23cd2a47c06e69bfe43745016fafd64b5b298f7b56453fcbfb6b4d9bfede1e08e0c603bce7b0955f SHA512 4ac7fd3dcae2293fa3cdb54fba7dfd9cfbc28f5fca33442dd970861ca26672a0b21d825d36099fbf234831a403fb41eabe02d48eca2a971eaef857516427394b diff --git a/net-proxy/haproxy/haproxy-1.6.13-r3.ebuild b/net-proxy/haproxy/haproxy-1.6.13-r3.ebuild deleted file mode 100644 index 1f40cd754eb7..000000000000 --- a/net-proxy/haproxy/haproxy-1.6.13-r3.ebuild +++ /dev/null @@ -1,158 +0,0 @@ -# Copyright 1999-2017 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 ssl tools vim-syntax +zlib lua device-atlas 51degrees wurfl" -REQUIRED_USE="pcre-jit? ( pcre ) - ?? ( slz zlib )" - -DEPEND=" - pcre? ( - dev-libs/libpcre - pcre-jit? ( dev-libs/libpcre[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 ) -version_is_at_least 1.7.0 $PV && PATCHES=( "${FILESDIR}"/haproxy-1.7-contrib.patch ) -CONTRIBS=( halog iprange ) -# ip6range is present in 1.6, but broken. -version_is_at_least 1.7.0 $PV && CONTRIBS+=( ip6range spoa_example tcploop ) - -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 - ) - - 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) ) - - # 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 - - dosbin haproxy-systemd-wrapper - dosym /usr/sbin/haproxy-systemd-wrapper /usr/bin/haproxy-systemd-wrapper - 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 - 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.6.14.ebuild b/net-proxy/haproxy/haproxy-1.6.14.ebuild new file mode 100644 index 000000000000..236fc4ec8bd0 --- /dev/null +++ b/net-proxy/haproxy/haproxy-1.6.14.ebuild @@ -0,0 +1,158 @@ +# 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 ssl tools vim-syntax +zlib lua device-atlas 51degrees wurfl" +REQUIRED_USE="pcre-jit? ( pcre ) + ?? ( slz zlib )" + +DEPEND=" + pcre? ( + dev-libs/libpcre + pcre-jit? ( dev-libs/libpcre[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 ) +version_is_at_least 1.7.0 $PV && PATCHES=( "${FILESDIR}"/haproxy-1.7-contrib.patch ) +CONTRIBS=( halog iprange ) +# ip6range is present in 1.6, but broken. +version_is_at_least 1.7.0 $PV && CONTRIBS+=( ip6range spoa_example tcploop ) + +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 + ) + + 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) ) + + # 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 + + dosbin haproxy-systemd-wrapper + dosym /usr/sbin/haproxy-systemd-wrapper /usr/bin/haproxy-systemd-wrapper + 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 + 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.6.9999-r2.ebuild b/net-proxy/haproxy/haproxy-1.6.9999-r2.ebuild index 6c77e7061acc..236fc4ec8bd0 100644 --- a/net-proxy/haproxy/haproxy-1.6.9999-r2.ebuild +++ b/net-proxy/haproxy/haproxy-1.6.9999-r2.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2017 Gentoo Foundation +# Copyright 1999-2018 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 EAPI="6" @@ -22,7 +22,6 @@ LICENSE="GPL-2 LGPL-2.1" SLOT="0" IUSE="+crypt doc examples libressl slz net_ns +pcre pcre-jit ssl tools vim-syntax +zlib lua device-atlas 51degrees wurfl" REQUIRED_USE="pcre-jit? ( pcre ) - device-atlas? ( pcre ) ?? ( slz zlib )" DEPEND=" diff --git a/net-proxy/haproxy/haproxy-1.7.10.ebuild b/net-proxy/haproxy/haproxy-1.7.10.ebuild new file mode 100644 index 000000000000..38e5fbe73044 --- /dev/null +++ b/net-proxy/haproxy/haproxy-1.7.10.ebuild @@ -0,0 +1,159 @@ +# 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 ssl tools vim-syntax +zlib lua device-atlas 51degrees wurfl" +REQUIRED_USE="pcre-jit? ( pcre ) + device-atlas? ( pcre ) + ?? ( slz zlib )" + +DEPEND=" + pcre? ( + dev-libs/libpcre + pcre-jit? ( dev-libs/libpcre[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 ) +version_is_at_least 1.7.0 $PV && PATCHES=( "${FILESDIR}"/haproxy-1.7-contrib.patch ) +CONTRIBS=( halog iprange ) +# ip6range is present in 1.6, but broken. +version_is_at_least 1.7.0 $PV && CONTRIBS+=( ip6range spoa_example tcploop ) + +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 + ) + + 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) ) + + # 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 + + dosbin haproxy-systemd-wrapper + dosym /usr/sbin/haproxy-systemd-wrapper /usr/bin/haproxy-systemd-wrapper + 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 + 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.7.9-r1.ebuild b/net-proxy/haproxy/haproxy-1.7.9-r1.ebuild deleted file mode 100644 index 6c77e7061acc..000000000000 --- a/net-proxy/haproxy/haproxy-1.7.9-r1.ebuild +++ /dev/null @@ -1,159 +0,0 @@ -# Copyright 1999-2017 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 ssl tools vim-syntax +zlib lua device-atlas 51degrees wurfl" -REQUIRED_USE="pcre-jit? ( pcre ) - device-atlas? ( pcre ) - ?? ( slz zlib )" - -DEPEND=" - pcre? ( - dev-libs/libpcre - pcre-jit? ( dev-libs/libpcre[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 ) -version_is_at_least 1.7.0 $PV && PATCHES=( "${FILESDIR}"/haproxy-1.7-contrib.patch ) -CONTRIBS=( halog iprange ) -# ip6range is present in 1.6, but broken. -version_is_at_least 1.7.0 $PV && CONTRIBS+=( ip6range spoa_example tcploop ) - -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 - ) - - 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) ) - - # 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 - - dosbin haproxy-systemd-wrapper - dosym /usr/sbin/haproxy-systemd-wrapper /usr/bin/haproxy-systemd-wrapper - 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 - 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.1.ebuild b/net-proxy/haproxy/haproxy-1.8.1.ebuild deleted file mode 100644 index 258b51e7e7d4..000000000000 --- a/net-proxy/haproxy/haproxy-1.8.1.ebuild +++ /dev/null @@ -1,169 +0,0 @@ -# Copyright 1999-2017 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.3.ebuild b/net-proxy/haproxy/haproxy-1.8.3.ebuild new file mode 100644 index 000000000000..7827f2e5bddc --- /dev/null +++ b/net-proxy/haproxy/haproxy-1.8.3.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://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.9999.ebuild b/net-proxy/haproxy/haproxy-1.8.9999.ebuild new file mode 100644 index 000000000000..7827f2e5bddc --- /dev/null +++ b/net-proxy/haproxy/haproxy-1.8.9999.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://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 +} -- cgit v1.2.3