pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
add stable haproxy with password encryption, options framework pcre/ ssl and zero downtime reload action in init script
Module Name: pkgsrc-wip
Committed By: Gianni D'Aprile <giannidaprile+pkgsrc-wip%gmail.com@localhost>
Pushed By: giannidaprile
Date: Sun Dec 27 09:55:55 2015 -0600
Changeset: c518585fbf105f47476968de0358482265077aa6
Added Files:
haproxy15/DESCR
haproxy15/Makefile
haproxy15/PLIST
haproxy15/distinfo
haproxy15/files/haproxy.sh
haproxy15/options.mk
haproxy15/patches/patch-Makefile
Log Message:
add stable haproxy with password encryption, options framework pcre/ssl and zero downtime reload action in init script
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=c518585fbf105f47476968de0358482265077aa6
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
haproxy15/DESCR | 6 ++++
haproxy15/Makefile | 71 ++++++++++++++++++++++++++++++++++++++++
haproxy15/PLIST | 10 ++++++
haproxy15/distinfo | 6 ++++
haproxy15/files/haproxy.sh | 26 +++++++++++++++
haproxy15/options.mk | 42 ++++++++++++++++++++++++
haproxy15/patches/patch-Makefile | 54 ++++++++++++++++++++++++++++++
7 files changed, 215 insertions(+)
diffs:
diff --git a/haproxy15/DESCR b/haproxy15/DESCR
new file mode 100644
index 0000000..f2e3c28
--- /dev/null
+++ b/haproxy15/DESCR
@@ -0,0 +1,6 @@
+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.
diff --git a/haproxy15/Makefile b/haproxy15/Makefile
new file mode 100644
index 0000000..1c558a9
--- /dev/null
+++ b/haproxy15/Makefile
@@ -0,0 +1,71 @@
+# $NetBSD: Makefile,v 1.8 2013/06/20 21:36:28 morr Exp $
+
+DISTNAME= haproxy-1.5.15
+CATEGORIES= net www
+MASTER_SITES= http://www.haproxy.org/download/1.5/src/
+
+MAINTAINER= morr%NetBSD.org@localhost
+HOMEPAGE= http://haproxy.1wt.eu/
+COMMENT= Reliable, high performance TCP/HTTP load balancer
+LICENSE= gnu-gpl-v2
+
+USE_TOOLS+= gmake
+BUILD_MAKE_FLAGS+= TARGET=${TARGET} ADDLIB=${COMPILER_RPATH_FLAG}${PREFIX}/lib
+BUILD_MAKE_FLAGS+= USE_LIBCRYPT=1
+#BUILD_MAKE_FLAGS+= USE_CRYPT_H=1
+BUILD_MAKE_FLAGS+= USE_OPENSSL=1
+BUILD_MAKE_FLAGS+= USE_PCRE=1
+BUILD_MAKE_FLAGS+= USE_PCRE_JIT=1
+#BUILD_MAKE_FLAGS+= USE_STATIC_PCRE=1
+BUILD_MAKE_FLAGS+= USE_ZLIB=1
+#.if ${MACHINE_ARCH} == "i386"
+#BUILD_MAKE_FLAGS+= CPU=i686
+#.endif
+INSTALL_MAKE_FLAGS+= TARGET=${TARGET}
+INSTALL_MAKE_FLAGS+= PREFIX=${PREFIX}
+INSTALL_MAKE_FLAGS+= DOCDIR=${PREFIX}/share/doc/${PKGBASE}
+INSTALL_MAKE_FLAGS+= MANDIR=${PREFIX}/${PKGMANDIR}
+
+EGDIR= ${PREFIX}/share/examples/${PKGBASE}
+INSTALLATION_DIRS= ${EGDIR} share/examples/rc.d
+
+.include "../../mk/bsd.prefs.mk"
+
+PLIST_VARS+= rcd
+.if ${OPSYS} == "NetBSD"
+RCD_SCRIPTS= haproxy
+INSTALLATION_DIRS+= share/examples/rc.d
+PLIST.rcd= yes
+.endif
+
+.if ${OPSYS} == "NetBSD"
+TARGET=netbsd
+.elif ${OPSYS} == "FreeBSD"
+TARGET=freebsd
+.elif ${OPSYS} == "OpenBSD"
+TARGET=openbsd
+.elif ${OPSYS} == "SunOS"
+TARGET=solaris
+.elif ${OPSYS} == "Linux"
+. if !empty(OS_VERSION:M2.6.*)
+TARGET=linux26
+. elif !empty(OS_VERSION:M2.4.*)
+. if exists(/usr/include/linux/eventpoll.h)
+TARGET=linux24e
+. else
+TARGET=linux24
+. endif
+. endif
+.else
+TARGET=generic
+.endif
+
+LIBS.SunOS+= -lxnet
+
+post-install:
+ ${INSTALL_DATA} ${WRKSRC}/examples/haproxy.cfg ${DESTDIR}${EGDIR}/
+
+.include "options.mk"
+
+.include "../../devel/zlib/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/haproxy15/PLIST b/haproxy15/PLIST
new file mode 100644
index 0000000..060c2d2
--- /dev/null
+++ b/haproxy15/PLIST
@@ -0,0 +1,10 @@
+@comment $NetBSD$
+man/man1/haproxy.1
+sbin/haproxy
+sbin/haproxy-systemd-wrapper
+share/doc/haproxy/architecture.txt
+share/doc/haproxy/configuration.txt
+share/doc/haproxy/haproxy-en.txt
+share/doc/haproxy/haproxy-fr.txt
+share/examples/haproxy/haproxy.cfg
+${PLIST.rcd}share/examples/rc.d/haproxy
diff --git a/haproxy15/distinfo b/haproxy15/distinfo
new file mode 100644
index 0000000..d137d03
--- /dev/null
+++ b/haproxy15/distinfo
@@ -0,0 +1,6 @@
+$NetBSD: distinfo,v 1.6 2013/06/20 21:36:28 morr Exp $
+
+SHA1 (haproxy-1.5.15.tar.gz) = a719d131b390e2b622d7cff25a6b3ed5a32cdd63
+RMD160 (haproxy-1.5.15.tar.gz) = 6315c3c7f6952ebbba17d0b8cf06425de3a36aec
+Size (haproxy-1.5.15.tar.gz) = 1356790 bytes
+SHA1 (patch-Makefile) = dcf0694c7592b27fe7787f2806a8a7cef777edc1
diff --git a/haproxy15/files/haproxy.sh b/haproxy15/files/haproxy.sh
new file mode 100755
index 0000000..134964b
--- /dev/null
+++ b/haproxy15/files/haproxy.sh
@@ -0,0 +1,26 @@
+#!@RCD_SCRIPTS_SHELL@
+#
+# $NetBSD: haproxy.sh,v 1.1.1.1 2011/10/31 23:34:07 morr Exp $
+#
+
+# PROVIDE: haproxy
+# REQUIRE: network
+
+$_rc_subr_loaded . /etc/rc.subr
+
+name="haproxy"
+rcvar=$name
+command="/usr/pkg/sbin/${name}"
+conf_file="/usr/pkg/etc/${name}.cfg"
+required_files="${conf_file}"
+command_args="-f $conf_file"
+pid_file="/var/run/haproxy-private.pid"
+extra_commands="reload"
+
+haproxy_reload()
+{
+ ${command} -f ${conf_file} -p ${pid_file} -sf $(cat ${pid_file})
+}
+
+load_rc_config $name
+run_rc_command "$1"
diff --git a/haproxy15/options.mk b/haproxy15/options.mk
new file mode 100644
index 0000000..9f3f092
--- /dev/null
+++ b/haproxy15/options.mk
@@ -0,0 +1,42 @@
+# $NetBSD: options.mk,v 1.1 2015/09/01 20:45:05 devnexen Exp $
+
+PKG_OPTIONS_VAR= PKG_OPTIONS.haproxy15
+PKG_SUPPORTED_OPTIONS= pcre ssl deviceatlas
+PKG_SUGGESTED_OPTIONS= pcre ssl
+
+.include "../../mk/bsd.options.mk"
+
+###
+### Use libpcre rather than libc for header processing regexp
+###
+.if !empty(PKG_OPTIONS:Mpcre)
+. include "../../devel/pcre/buildlink3.mk"
+BUILD_MAKE_FLAGS+= USE_PCRE=1
+.endif
+
+###
+### Support DeviceAtlas detection.
+###
+.if !empty(PKG_OPTIONS:Mpcre) && !empty(PKG_OPTIONS:Mdeviceatlas)
+DEVICEATLAS_VERSION= 2.1
+DEVICEATLAS_DISTFILE= deviceatlas-enterprise-c-${DEVICEATLAS_VERSION}
+DISTFILES+= ${DEVICEATLAS_DISTFILE}.zip
+DEVICEATLAS_HOMEPAGE= https://www.deviceatlas.com/deviceatlas-haproxy-module
+
+BUILD_MAKE_FLAGS+= USE_DEVICEATLAS=1 DEVICEATLAS_SRC=../${DEVICEATLAS_DISTFILE}
+
+.if !exists(${DISTDIR}/${DEVICEATLAS_DISTFILE}.zip)
+FETCH_MESSAGE= "Please fetch ${DEVICEATLAS_DISTFILE}.zip manually from"
+FETCH_MESSAGE+= "${DEVICEATLAS_HOMEPAGE}"
+FETCH_MESSAGE+= "and put into"
+FETCH_MESSAGE+= "${DISTDIR}"
+.endif
+.endif
+
+###
+### Support OpenSSL for termination.
+###
+.if !empty(PKG_OPTIONS:Mssl)
+. include "../../security/openssl/buildlink3.mk"
+BUILD_MAKE_FLAGS+= USE_OPENSSL=1
+.endif
diff --git a/haproxy15/patches/patch-Makefile b/haproxy15/patches/patch-Makefile
new file mode 100644
index 0000000..67bd3db
--- /dev/null
+++ b/haproxy15/patches/patch-Makefile
@@ -0,0 +1,54 @@
+$NetBSD$
+
+# patch adds NetBSD target and undefs CC
+
+--- Makefile.orig 2014-10-08 08:07:23.000000000 +0000
++++ Makefile
+@@ -89,7 +89,7 @@ DOCDIR = $(PREFIX)/doc/haproxy
+ # Use TARGET=<target_name> to optimize for a specifc target OS among the
+ # following list (use the default "generic" if uncertain) :
+ # generic, linux22, linux24, linux24e, linux26, solaris,
+-# freebsd, openbsd, cygwin, custom, aix51, aix52
++# freebsd, osx, netbsd, openbsd, cygwin, custom, aix51, aix52
+ TARGET =
+
+ #### TARGET CPU
+@@ -107,7 +107,7 @@ ARCH =
+
+ #### Toolchain options.
+ # GCC is normally used both for compiling and linking.
+-CC = gcc
++#CC = gcc
+ LD = $(CC)
+
+ #### Debug flags (typically "-g").
+@@ -288,6 +288,12 @@ ifeq ($(TARGET),osx)
+ USE_TPROXY = implicit
+ USE_LIBCRYPT = implicit
+ else
++ifeq ($(TARGET),netbsd)
++ # This is for NetBSD
++ USE_POLL = implicit
++ USE_KQUEUE = implicit
++ USE_TPROXY = implicit
++else
+ ifeq ($(TARGET),openbsd)
+ # This is for OpenBSD >= 3.0
+ USE_POLL = implicit
+@@ -317,6 +323,7 @@ ifeq ($(TARGET),cygwin)
+ endif # cygwin
+ endif # aix52
+ endif # aix51
++endif # netbsd
+ endif # openbsd
+ endif # osx
+ endif # freebsd
+@@ -634,7 +641,7 @@ all:
+ @echo "Please choose the target among the following supported list :"
+ @echo
+ @echo " linux2628, linux26, linux24, linux24e, linux22, solaris"
+- @echo " freebsd, openbsd, cygwin, custom, generic"
++ @echo " freebsd, osx, netbsd, openbsd, cygwin, custom, generic"
+ @echo
+ @echo "Use \"generic\" if you don't want any optimization, \"custom\" if you"
+ @echo "want to precisely tweak every option, or choose the target which"
Home |
Main Index |
Thread Index |
Old Index