summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /net-proxy/haproxy
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'net-proxy/haproxy')
-rw-r--r--net-proxy/haproxy/Manifest4
-rw-r--r--net-proxy/haproxy/files/haproxy.initd-r247
-rw-r--r--net-proxy/haproxy/haproxy-1.4.25.ebuild89
-rw-r--r--net-proxy/haproxy/haproxy-1.4.26.ebuild89
-rw-r--r--net-proxy/haproxy/haproxy-1.5.14.ebuild135
-rw-r--r--net-proxy/haproxy/haproxy-1.5.4.ebuild128
-rw-r--r--net-proxy/haproxy/haproxy-9999.ebuild135
-rw-r--r--net-proxy/haproxy/metadata.xml25
8 files changed, 652 insertions, 0 deletions
diff --git a/net-proxy/haproxy/Manifest b/net-proxy/haproxy/Manifest
new file mode 100644
index 000000000000..0c4fa2a1e5bc
--- /dev/null
+++ b/net-proxy/haproxy/Manifest
@@ -0,0 +1,4 @@
+DIST haproxy-1.4.25.tar.gz 838775 SHA256 84408ec1e37bf308c6b45ae3c7e66f2a9d2f762cb689ab6d322c67bba691db62 SHA512 c3424151309be5eea761ff02b29a0e54bd34f5fcb4087e8b99fb2f4cde17bbc3caf07b6cb41ae5a2606325f8a950a06c4683ceb04c05fd6ebf0177326030bca9 WHIRLPOOL 0b32acffc82d216325abd330073717d951aa8cff349d538fa42a9de76154e1f7be5b1718854d04be41f78834b914b83be804557eb20aa174db71769060c9f644
+DIST haproxy-1.4.26.tar.gz 837280 SHA256 a8787dae723c045eebd0ed9e0213514f909a67325d64e963eaf50c35b147d3d3 SHA512 f21901069f651f3320c2b7cb6aee96fced5d4d5d4a73eec0d94dd8bd109a391d8da85026389e7209f85026cdefc1b879afcfd0a9bc0970e41aedd59e35935454 WHIRLPOOL 406b7f8bb4b9b3f6b8080f58431a804abea1d834ef9b8d86ede328b27e4f3fe944fbdae5bad8c3f7da75c81c92ff0e030950e09feac28eac4f763e511b5e7dce
+DIST haproxy-1.5.14.tar.gz 1345345 SHA256 9565dd38649064d0350a2883fa81ccfe92eb17dcda457ebdc01535e1ab0c8f99 SHA512 83d6101fd402f37845ab3febc914335e4c6d9bdebbb0ff81c8e048d5252ffa5a1b77c4250a434fed5dd541ef1f1f2c47d969b59f7a51d6ab9aea38a8646a9798 WHIRLPOOL 7d2c580589b9b31e1eba169e4bf930ac42d2564e21eb1c25adbdd39b701abd221fd671ebc227167ab956a48b2c30eeb740a6394355a8fa748c408ee42fdff6fc
+DIST haproxy-1.5.4.tar.gz 1336140 SHA256 75056ca5b9121b193d383ba4ebc6e5a3782c537a7499db80fce8d6d5fd265e10 SHA512 9ba6a82207487a8e59117c21de0dd7a178cc4bf472cc99fbca21146883f8a2ffe1b3d0bab316999abc151e16ad363f80b593205f39fa2cb173ba37b086076323 WHIRLPOOL 19ef3cbe10aac30c80ac193e7728f5f5127ce690e4f4e314e3ea23743701adffb2f7248a37b2d3737461abf89f575612980208a8af8499dffc34e28b40817389
diff --git a/net-proxy/haproxy/files/haproxy.initd-r2 b/net-proxy/haproxy/files/haproxy.initd-r2
new file mode 100644
index 000000000000..c25c71e09268
--- /dev/null
+++ b/net-proxy/haproxy/files/haproxy.initd-r2
@@ -0,0 +1,47 @@
+#!/sbin/runscript
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+extra_commands="checkconfig"
+extra_started_commands="reload"
+
+command="/usr/bin/haproxy"
+pidfile="/var/run/${SVCNAME}.pid"
+
+if [ -z "${CONFFILE}" -a -d "/etc/haproxy" -a -f "/etc/haproxy/${SVCNAME}.cfg" ]; then
+ CONFFILE=/etc/haproxy/${SVCNAME}.cfg
+else
+ CONFFILE=/etc/${SVCNAME}.cfg
+fi
+
+command_args="-D -p ${pidfile} -f ${CONFFILE}"
+
+depend() {
+ need net
+ use dns logger
+}
+
+checkconfig() {
+ if [ ! -f "${CONFFILE}" ]; then
+ eerror "${CONFFILE} does not exist!"
+ return 1
+ fi
+
+ ebegin "Checking ${CONFFILE}"
+ $command -q -c -f "${CONFFILE}"
+ eend $?
+}
+
+stop_pre() {
+ if [ "${RC_CMD}" = "restart" ]; then
+ checkconfig || return 1
+ fi
+}
+
+reload() {
+ ebegin "Reloading ${SVCNAME}"
+ checkconfig || { eerror "Reloading failed, please fix your ${CONFFILE} first"; return 1; }
+ $command -D -p "${pidfile}" -f "${CONFFILE}" -sf $(cat "${pidfile}")
+ eend $?
+}
diff --git a/net-proxy/haproxy/haproxy-1.4.25.ebuild b/net-proxy/haproxy/haproxy-1.4.25.ebuild
new file mode 100644
index 000000000000..7bf4532bb2d4
--- /dev/null
+++ b/net-proxy/haproxy/haproxy-1.4.25.ebuild
@@ -0,0 +1,89 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit user versionator toolchain-funcs flag-o-matic
+
+DESCRIPTION="A TCP/HTTP reverse proxy for high availability environments"
+HOMEPAGE="http://haproxy.1wt.eu"
+SRC_URI="http://haproxy.1wt.eu/download/$(get_version_component_range 1-2)/src/${P}.tar.gz"
+
+LICENSE="GPL-2 LGPL-2.1"
+SLOT="0"
+KEYWORDS="amd64 ppc x86"
+IUSE="+crypt examples +pcre vim-syntax"
+
+DEPEND="pcre? ( dev-libs/libpcre )"
+RDEPEND="${DEPEND}"
+
+pkg_setup() {
+ enewgroup haproxy
+ enewuser haproxy -1 -1 -1 haproxy
+}
+
+src_compile() {
+ local args="TARGET=linux2628"
+
+ if use pcre; then
+ args="${args} USE_PCRE=1"
+ else
+ args="${args} USE_PCRE="
+ fi
+
+# if use kernel_linux; then
+# args="${args} USE_LINUX_SPLICE=1 USE_LINUX_TPROXY=1"
+# else
+# args="${args} USE_LINUX_SPLICE= USE_LINUX_TPROXY="
+# fi
+
+ if use crypt; then
+ args="${args} USE_LIBCRYPT=1"
+ else
+ args="${args} USE_LIBCRYPT="
+ fi
+
+ # For now, until the strict-aliasing breakage will be fixed
+# append-cflags -fno-strict-aliasing
+
+ emake CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" CC=$(tc-getCC) ${args} || die
+}
+
+src_install() {
+ dobin haproxy || die
+
+ newinitd "${FILESDIR}/haproxy.initd-r2" haproxy || die
+
+ # Don't install useless files
+ rm examples/build.cfg doc/*gpl.txt
+
+ dodoc CHANGELOG ROADMAP TODO doc/{configuration,haproxy-en}.txt
+ doman doc/haproxy.1
+
+ if use examples;
+ then
+ docinto examples
+ dodoc examples/*.cfg || die
+ fi
+
+ if use vim-syntax;
+ then
+ insinto /usr/share/vim/vimfiles/syntax
+ doins examples/haproxy.vim || die
+ fi
+}
+
+pkg_postinst() {
+ if [[ ! -f "${ROOT}/etc/haproxy.cfg" ]] ; then
+ ewarn "You need to create /etc/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
+ 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}"
+ fi
+ fi
+}
diff --git a/net-proxy/haproxy/haproxy-1.4.26.ebuild b/net-proxy/haproxy/haproxy-1.4.26.ebuild
new file mode 100644
index 000000000000..60db25b6cfba
--- /dev/null
+++ b/net-proxy/haproxy/haproxy-1.4.26.ebuild
@@ -0,0 +1,89 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit user versionator toolchain-funcs flag-o-matic
+
+DESCRIPTION="A TCP/HTTP reverse proxy for high availability environments"
+HOMEPAGE="http://haproxy.1wt.eu"
+SRC_URI="http://haproxy.1wt.eu/download/$(get_version_component_range 1-2)/src/${P}.tar.gz"
+
+LICENSE="GPL-2 LGPL-2.1"
+SLOT="0"
+KEYWORDS="amd64 ppc ~x86"
+IUSE="+crypt examples +pcre vim-syntax"
+
+DEPEND="pcre? ( dev-libs/libpcre )"
+RDEPEND="${DEPEND}"
+
+pkg_setup() {
+ enewgroup haproxy
+ enewuser haproxy -1 -1 -1 haproxy
+}
+
+src_compile() {
+ local args="TARGET=linux2628"
+
+ if use pcre; then
+ args="${args} USE_PCRE=1"
+ else
+ args="${args} USE_PCRE="
+ fi
+
+# if use kernel_linux; then
+# args="${args} USE_LINUX_SPLICE=1 USE_LINUX_TPROXY=1"
+# else
+# args="${args} USE_LINUX_SPLICE= USE_LINUX_TPROXY="
+# fi
+
+ if use crypt; then
+ args="${args} USE_LIBCRYPT=1"
+ else
+ args="${args} USE_LIBCRYPT="
+ fi
+
+ # For now, until the strict-aliasing breakage will be fixed
+# append-cflags -fno-strict-aliasing
+
+ emake CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" CC=$(tc-getCC) ${args} || die
+}
+
+src_install() {
+ dobin haproxy || die
+
+ newinitd "${FILESDIR}/haproxy.initd-r2" haproxy || die
+
+ # Don't install useless files
+ rm examples/build.cfg doc/*gpl.txt
+
+ dodoc CHANGELOG ROADMAP doc/{configuration,haproxy-en}.txt
+ doman doc/haproxy.1
+
+ if use examples;
+ then
+ docinto examples
+ dodoc examples/*.cfg || die
+ fi
+
+ if use vim-syntax;
+ then
+ insinto /usr/share/vim/vimfiles/syntax
+ doins examples/haproxy.vim || die
+ fi
+}
+
+pkg_postinst() {
+ if [[ ! -f "${ROOT}/etc/haproxy.cfg" ]] ; then
+ ewarn "You need to create /etc/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
+ 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}"
+ fi
+ fi
+}
diff --git a/net-proxy/haproxy/haproxy-1.5.14.ebuild b/net-proxy/haproxy/haproxy-1.5.14.ebuild
new file mode 100644
index 000000000000..b86d295c1659
--- /dev/null
+++ b/net-proxy/haproxy/haproxy-1.5.14.ebuild
@@ -0,0 +1,135 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit user versionator toolchain-funcs flag-o-matic systemd
+
+MY_P="${PN}-${PV/_beta/-dev}"
+
+DESCRIPTION="A TCP/HTTP reverse proxy for high availability environments"
+HOMEPAGE="http://haproxy.1wt.eu"
+SRC_URI="http://haproxy.1wt.eu/download/$(get_version_component_range 1-2)/src/${MY_P}.tar.gz"
+
+LICENSE="GPL-2 LGPL-2.1"
+SLOT="0"
+KEYWORDS="amd64 ppc x86"
+IUSE="+crypt examples +pcre pcre-jit ssl tools vim-syntax +zlib"
+
+DEPEND="pcre? ( dev-libs/libpcre
+ pcre-jit? ( dev-libs/libpcre[jit] )
+ )
+ ssl? ( dev-libs/openssl:0[zlib?] )
+ zlib? ( sys-libs/zlib )"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${MY_P}"
+
+pkg_setup() {
+ enewgroup haproxy
+ enewuser haproxy -1 -1 -1 haproxy
+}
+
+src_prepare() {
+ sed -e 's:@SBINDIR@:'/usr/bin':' contrib/systemd/haproxy.service.in \
+ > contrib/systemd/haproxy.service || die
+
+ sed -ie 's:/usr/sbin/haproxy:/usr/bin/haproxy:' src/haproxy-systemd-wrapper.c || die
+}
+
+src_compile() {
+ local args="TARGET=linux2628 USE_GETADDRINFO=1"
+
+ if use pcre ; then
+ args="${args} USE_PCRE=1"
+ if use pcre-jit; then
+ args="${args} USE_PCRE_JIT=1"
+ else
+ args="${args} USE_PCRE_JIT="
+ fi
+ else
+ args="${args} USE_PCRE= USE_PCRE_JIT="
+ fi
+
+# if use kernel_linux; then
+# args="${args} USE_LINUX_SPLICE=1 USE_LINUX_TPROXY=1"
+# else
+# 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
+ args="${args} USE_OPENSSL="
+ fi
+
+ if use zlib ; then
+ args="${args} USE_ZLIB=1"
+ else
+ args="${args} USE_ZLIB="
+ fi
+
+ # For now, until the strict-aliasing breakage will be fixed
+ append-cflags -fno-strict-aliasing
+
+ emake CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" CC=$(tc-getCC) ${args}
+
+ if use tools ; then
+ for contrib in halog iprange ; do
+ emake -C contrib/${contrib} \
+ CFLAGS="${CFLAGS}" OPTIMIZE="${CFLAGS}" LDFLAGS="${LDFLAGS}" CC=$(tc-getCC) ${args}
+ done
+ fi
+}
+
+src_install() {
+ dobin haproxy
+
+ newinitd "${FILESDIR}/haproxy.initd-r2" haproxy
+
+ # Don't install useless files
+# rm examples/build.cfg doc/*gpl.txt
+
+ dodoc CHANGELOG ROADMAP doc/{configuration,haproxy-en}.txt
+ doman doc/haproxy.1
+
+ dobin haproxy-systemd-wrapper
+ systemd_dounit contrib/systemd/haproxy.service
+
+ if use tools ; then
+ for contrib in halog iprange ; do
+ dobin contrib/${contrib}/${contrib}
+ done
+ fi
+
+ if use examples ; then
+ docinto examples
+ dodoc examples/*.cfg
+ fi
+
+ if use vim-syntax ; then
+ insinto /usr/share/vim/vimfiles/syntax
+ doins examples/haproxy.vim
+ fi
+}
+
+pkg_postinst() {
+ if [[ ! -f "${ROOT}/etc/haproxy.cfg" ]] ; then
+ ewarn "You need to create /etc/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
+ 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}"
+ fi
+ fi
+}
diff --git a/net-proxy/haproxy/haproxy-1.5.4.ebuild b/net-proxy/haproxy/haproxy-1.5.4.ebuild
new file mode 100644
index 000000000000..e5c0140c1d03
--- /dev/null
+++ b/net-proxy/haproxy/haproxy-1.5.4.ebuild
@@ -0,0 +1,128 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit user versionator toolchain-funcs flag-o-matic systemd
+
+MY_P="${PN}-${PV/_beta/-dev}"
+
+DESCRIPTION="A TCP/HTTP reverse proxy for high availability environments"
+HOMEPAGE="http://haproxy.1wt.eu"
+SRC_URI="http://haproxy.1wt.eu/download/$(get_version_component_range 1-2)/src/${MY_P}.tar.gz"
+
+LICENSE="GPL-2 LGPL-2.1"
+SLOT="0"
+KEYWORDS="amd64 ppc x86"
+IUSE="+crypt examples +pcre ssl tools vim-syntax +zlib"
+
+DEPEND="pcre? ( dev-libs/libpcre )
+ ssl? ( dev-libs/openssl[zlib?] )
+ zlib? ( sys-libs/zlib )"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${MY_P}"
+
+pkg_setup() {
+ enewgroup haproxy
+ enewuser haproxy -1 -1 -1 haproxy
+}
+
+src_prepare() {
+ sed -e 's:@SBINDIR@:'/usr/bin':' contrib/systemd/haproxy.service.in \
+ > contrib/systemd/haproxy.service || die
+
+ sed -ie 's:/usr/sbin/haproxy:/usr/bin/haproxy:' src/haproxy-systemd-wrapper.c || die
+}
+
+src_compile() {
+ local args="TARGET=linux2628 USE_GETADDRINFO=1"
+
+ if use pcre ; then
+ args="${args} USE_PCRE=1 USE_PCRE_JIT=1"
+ else
+ args="${args} USE_PCRE= USE_PCRE_JIT="
+ fi
+
+# if use kernel_linux; then
+# args="${args} USE_LINUX_SPLICE=1 USE_LINUX_TPROXY=1"
+# else
+# 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
+ args="${args} USE_OPENSSL="
+ fi
+
+ if use zlib ; then
+ args="${args} USE_ZLIB=1"
+ else
+ args="${args} USE_ZLIB="
+ fi
+
+ # For now, until the strict-aliasing breakage will be fixed
+ append-cflags -fno-strict-aliasing
+
+ emake CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" CC=$(tc-getCC) ${args}
+
+ if use tools ; then
+ for contrib in halog iprange ; do
+ emake -C contrib/${contrib} \
+ CFLAGS="${CFLAGS}" OPTIMIZE="${CFLAGS}" LDFLAGS="${LDFLAGS}" CC=$(tc-getCC) ${args}
+ done
+ fi
+}
+
+src_install() {
+ dobin haproxy
+
+ newinitd "${FILESDIR}/haproxy.initd-r2" haproxy
+
+ # Don't install useless files
+# rm examples/build.cfg doc/*gpl.txt
+
+ dodoc CHANGELOG ROADMAP doc/{configuration,haproxy-en}.txt
+ doman doc/haproxy.1
+
+ dobin haproxy-systemd-wrapper
+ systemd_dounit contrib/systemd/haproxy.service
+
+ if use tools ; then
+ for contrib in halog iprange ; do
+ dobin contrib/${contrib}/${contrib}
+ done
+ fi
+
+ if use examples ; then
+ docinto examples
+ dodoc examples/*.cfg
+ fi
+
+ if use vim-syntax ; then
+ insinto /usr/share/vim/vimfiles/syntax
+ doins examples/haproxy.vim
+ fi
+}
+
+pkg_postinst() {
+ if [[ ! -f "${ROOT}/etc/haproxy.cfg" ]] ; then
+ ewarn "You need to create /etc/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
+ 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}"
+ fi
+ fi
+}
diff --git a/net-proxy/haproxy/haproxy-9999.ebuild b/net-proxy/haproxy/haproxy-9999.ebuild
new file mode 100644
index 000000000000..2446dbfdac11
--- /dev/null
+++ b/net-proxy/haproxy/haproxy-9999.ebuild
@@ -0,0 +1,135 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit user versionator toolchain-funcs flag-o-matic git-2 systemd
+
+MY_P="${PN}-${PV/_beta/-dev}"
+
+DESCRIPTION="A TCP/HTTP reverse proxy for high availability environments"
+HOMEPAGE="http://haproxy.1wt.eu"
+EGIT_REPO_URI="http://master.formilux.org/git/people/willy/haproxy.git"
+
+LICENSE="GPL-2 LGPL-2.1"
+SLOT="0"
+KEYWORDS=""
+IUSE="+crypt examples +pcre pcre-jit ssl tools vim-syntax +zlib"
+
+DEPEND="pcre? ( dev-libs/libpcre
+ pcre-jit? ( dev-libs/libpcre[jit] )
+ )
+ ssl? ( dev-libs/openssl:0[zlib?] )
+ zlib? ( sys-libs/zlib )"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${MY_P}"
+
+pkg_setup() {
+ enewgroup haproxy
+ enewuser haproxy -1 -1 -1 haproxy
+}
+
+src_prepare() {
+ sed -e 's:@SBINDIR@:'/usr/bin':' contrib/systemd/haproxy.service.in \
+ > contrib/systemd/haproxy.service || die
+
+ sed -ie 's:/usr/sbin/haproxy:/usr/bin/haproxy:' src/haproxy-systemd-wrapper.c || die
+}
+
+src_compile() {
+ local args="TARGET=linux2628 USE_GETADDRINFO=1"
+
+ if use pcre ; then
+ args="${args} USE_PCRE=1"
+ if use pcre-jit; then
+ args="${args} USE_PCRE_JIT=1"
+ else
+ args="${args} USE_PCRE_JIT="
+ fi
+ else
+ args="${args} USE_PCRE= USE_PCRE_JIT="
+ fi
+
+# if use kernel_linux; then
+# args="${args} USE_LINUX_SPLICE=1 USE_LINUX_TPROXY=1"
+# else
+# 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
+ args="${args} USE_OPENSSL="
+ fi
+
+ if use zlib ; then
+ args="${args} USE_ZLIB=1"
+ else
+ args="${args} USE_ZLIB="
+ fi
+
+ # For now, until the strict-aliasing breakage will be fixed
+ append-cflags -fno-strict-aliasing
+
+ emake CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" CC=$(tc-getCC) ${args}
+
+ if use tools ; then
+ for contrib in halog iprange ; do
+ emake -C contrib/${contrib} \
+ CFLAGS="${CFLAGS}" OPTIMIZE="${CFLAGS}" LDFLAGS="${LDFLAGS}" CC=$(tc-getCC) ${args}
+ done
+ fi
+}
+
+src_install() {
+ dobin haproxy
+
+ newinitd "${FILESDIR}/haproxy.initd-r2" haproxy
+
+ # Don't install useless files
+# rm examples/build.cfg doc/*gpl.txt
+
+ dodoc CHANGELOG ROADMAP doc/{configuration,haproxy-en}.txt
+ doman doc/haproxy.1
+
+ dobin haproxy-systemd-wrapper
+ systemd_dounit contrib/systemd/haproxy.service
+
+ if use tools ; then
+ for contrib in halog iprange ; do
+ dobin contrib/${contrib}/${contrib}
+ done
+ fi
+
+ if use examples ; then
+ docinto examples
+ dodoc examples/*.cfg
+ fi
+
+ if use vim-syntax ; then
+ insinto /usr/share/vim/vimfiles/syntax
+ doins examples/haproxy.vim
+ fi
+}
+
+pkg_postinst() {
+ if [[ ! -f "${ROOT}/etc/haproxy.cfg" ]] ; then
+ ewarn "You need to create /etc/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
+ 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}"
+ fi
+ fi
+}
diff --git a/net-proxy/haproxy/metadata.xml b/net-proxy/haproxy/metadata.xml
new file mode 100644
index 000000000000..2691f323b3fa
--- /dev/null
+++ b/net-proxy/haproxy/metadata.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>idl0r@gentoo.org</email>
+ <name>Christian Ruppert</name>
+ </maintainer>
+ <longdescription>
+HAProxy is a free, very fast and reliable solution offering high availability, load balancing, and proxying for TCP and HTTP-based applications. It is particularly suited for web sites crawling under very high loads while needing persistence or Layer7 processing. Supporting tens of thousands of connections is clearly realistic with todays hardware. Its mode of operation makes its integration into existing architectures very easy and riskless, while still offering the possibility not to expose fragile web servers to the Net.
+
+It can:
+ - route HTTP requests depending on statically assigned cookies
+ - spread the load among several servers while assuring server persistence through the use of HTTP cookies
+ - switch to backup servers in the event a main one fails
+ - accept connections to special ports dedicated to service monitoring
+ - stop accepting connections without breaking existing ones
+ - add/modify/delete HTTP headers both ways
+ - block requests matching a particular pattern
+Its event-driven architecture allows it to easily handle thousands of simultaneous connections on hundreds of instances without risking the system's stability.
+ </longdescription>
+ <use>
+ <flag name="pcre-jit">Use JIT support for PCRE</flag>
+ <flag name="tools">Install additional tools (halog, iprange)</flag>
+ </use>
+</pkgmetadata>