pkg_origin=core
pkg_name=haproxy
pkg_description="The Reliable, High Performance TCP/HTTP Load Balancer"
pkg_version=1.6.5
pkg_maintainer='The Habitat Maintainers <humans@habitat.sh>'
pkg_license=('GPL-2.0' 'LGPL-2.1')
pkg_source=http://www.haproxy.org/download/1.6/src/haproxy-1.6.5.tar.gz
pkg_upstream_url="http://git.haproxy.org/git/haproxy-1.6.git/"
pkg_shasum=c4b3fb938874abbbbd52782087117cc2590263af78fdce86d64e4a11acfe85de
pkg_svc_run='haproxy -f config/haproxy.conf -db'
pkg_expose=(8080)
pkg_deps=(core/zlib core/pcre core/openssl)
pkg_build_deps=(
  core/coreutils
  core/gcc
  core/pcre
  core/make
  core/openssl
  core/zlib
)

pkg_bin_dirs=(bin)

do_build() {
  make USE_PCRE=1 \
       USE_PCRE_JIT=1 \
       TARGET=linux2628 \
       USE_OPENSSL=1 \
       USE_ZLIB=1 \
       ADDINC="$CFLAGS" \
       ADDLIB="$LDFLAGS"
}

do_install() {
  mkdir -p "$pkg_prefix"/bin
  cp haproxy "$pkg_prefix"/bin
}

pkg_origin=core
pkg_name=haproxy
pkg_description="The Reliable, High Performance TCP/HTTP Load Balancer"
pkg_version=1.6.5
pkg_maintainer='The Habitat Maintainers <humans@habitat.sh>'
pkg_license=('GPL-2.0' 'LGPL-2.1')
pkg_source=http://www.haproxy.org/download/1.6/src/haproxy-1.6.5.tar.gz
pkg_upstream_url="http://git.haproxy.org/git/haproxy-1.6.git/"
pkg_shasum=c4b3fb938874abbbbd52782087117cc2590263af78fdce86d64e4a11acfe85de
pkg_svc_run='bin/haproxy -f config/haproxy.conf -db'
pkg_expose=(8080)
pkg_deps=(core/zlib core/pcre core/openssl)
pkg_build_deps=(
  core/coreutils
  core/gcc
  core/pcre
  core/make
  core/openssl
  core/zlib
)

pkg_bin_dirs=(bin)

do_build() {
  make USE_PCRE=1 \
       USE_PCRE_JIT=1 \
       TARGET=linux2628 \
       USE_OPENSSL=1 \
       USE_ZLIB=1 \
       ADDINC="$CFLAGS" \
       ADDLIB="$LDFLAGS"
}

do_install() {
  mkdir -p "$pkg_prefix"/bin
  cp haproxy "$pkg_prefix"/bin
}

--- 
+++ 
@@ -7,7 +7,7 @@
 pkg_source=http://www.haproxy.org/download/1.6/src/haproxy-1.6.5.tar.gz
 pkg_upstream_url="http://git.haproxy.org/git/haproxy-1.6.git/"
 pkg_shasum=c4b3fb938874abbbbd52782087117cc2590263af78fdce86d64e4a11acfe85de
-pkg_svc_run='bin/haproxy -f config/haproxy.conf -db'
+pkg_svc_run='haproxy -f config/haproxy.conf -db'
 pkg_expose=(8080)
 pkg_deps=(core/zlib core/pcre core/openssl)
 pkg_build_deps=(
[haproxy] Fix pkg_scv_run to work with hab 0.9.3+

As of 0.9.3, $pkg_prefix is no longer prepended to the pkg_svc_run
command.  Rather, we depend on the bin/ directory being in the PATH.

See 8ff7d48f2246d42a5d059dbe209ffe459f672852 for a similar fix in the
httpd plan.

Fixes #204

Signed-off-by: Steven Danna <9ce5770b3bb4b2a1d59be2d97e34379cd192299f@chef.io>
