#!/bin/sh # Build script for formilux >0.1.8 # This build script is able to produce 3 outputs when used this way : # # SRC_FETCH_PATH="http://haproxy.1wt.eu/download/1.5/src/devel/haproxy-1.5-dev12.tar.gz" SRC_FETCH_METHOD="http" MAKEDEPENDS=( "pcre-*:::*.a *.h *.so *.so.*" "openssl-*:::*.h *.so *.so.*" ) # Note : PCRE is enabled. PCRE is statically built for x86_64 models # This pkg is built with smaller options allowing it to support a higher number # of simultaneous connections, typically 5000 with 256 MB memory including the # sockets and the system, or 40000 with 1 GB RAM. # Patches below 1000 are bugfixes and initial backports. # Patches above 1000 are aloha-specific or late backports. PATCH_LIST=" 0001-MEDIUM-settable-crypto-engine-for-openssl.patch 0002-MINOR-Try-to-load-Diffie-Hellman-parameters-from-cer.patch 0003-MINOR-Add-elliptic-curve-Diffie-Hellman-support-for-.patch 1000-add-dlmalloc.patch " ### Mainline: 16216828fcdaeeac70fb69415193eae1dc7808a5 (v1.5-dev12) ### Updated : 16216828fcdaeeac70fb69415193eae1dc7808a5 (v1.5-dev12) FILE_LIST= HAPROXY_VERSION="${PKGVER}" HAPROXY_SUBVERS="-${DISTVER}_${VERSFX}" HAPROXY_DATE="$(date +%Y/%m/%d)" function do_compile_only { # halog ( cd contrib/halog $FLXMAKE CC=$CC halog ) # haproxy case "$FLX_ARCH_SMALL" in i?86) REGPARM=1 ; VSYSCALL=1 ; FUTEX=1 ;; x86*) REGPARM=1 ; VSYSCALL= ; FUTEX=1 ;; *) REGPARM= ; VSYSCALL= ; FUTEX= ;; esac # splice() was introduced in glibc-2.6 case "$(readlink $FLXROOTDIR/lib/libc.so.?)" in libc-2.[0-5]*) MY_SPLICE=1 ;; *) MY_SPLICE= ;; esac SYSTEM_MAXCONN= ; DEFAULT_MAXCONN=10000 ; MEMMAX= $FLXPMAKE CC="$CC" \ TARGET=linux2628 USE_PCRE=1 PCREDIR=$FLXROOTDIR/usr \ SMALL_OPTS="${SYSTEM_MAXCONN:+-DSYSTEM_MAXCONN=$SYSTEM_MAXCONN }${DEFAULT_MAXCONN:+-DDEFAULT_MAXCONN=$DEFAULT_MAXCONN }-DBUFSIZE=8030 -DMAXREWRITE=1030" \ USE_MY_SPLICE=${MY_SPLICE} USE_REGPARM=${REGPARM} USE_VSYSCALL=${VSYSCALL} USE_OPENSSL=1 USE_DLMALLOC=1 USE_FUTEX=${FUTEX} } function do_prepack { # halog mkdir -p $ROOTDIR/usr/bin cp contrib/halog/halog $ROOTDIR/usr/bin/ mkdir -p $ROOTDIR/sbin/init.d ; cp examples/init.haproxy.flx0 $ROOTDIR/sbin/init.d/haproxy chmod 755 $ROOTDIR/sbin/init.d/haproxy mkdir -p $ROOTDIR/usr/sbin ; cp haproxy $ROOTDIR/usr/sbin mkdir -p $ROOTDIR/usr/share/examples/$PKGRADIX/$PKGRADIX-$PKGVER/etc/haproxy/ cp examples/haproxy.cfg $ROOTDIR/usr/share/examples/$PKGRADIX/$PKGRADIX-$PKGVER/etc/haproxy/haproxy.cfg cp examples/rc.highsock $ROOTDIR/usr/share/examples/$PKGRADIX/$PKGRADIX-$PKGVER/etc/rc.highsock cp examples/config.rc.haproxy $ROOTDIR/usr/share/examples/$PKGRADIX/$PKGRADIX-$PKGVER/etc/config.rc.haproxy mkdir -p $ROOTDIR/usr/share/$PKGRADIX/$PKGRADIX-$PKGVER cp doc/haproxy-{fr,en}.txt $ROOTDIR/usr/share/$PKGRADIX/$PKGRADIX-$PKGVER/ cp doc/architecture.txt $ROOTDIR/usr/share/$PKGRADIX/$PKGRADIX-$PKGVER/ cp doc/configuration.txt $ROOTDIR/usr/share/$PKGRADIX/$PKGRADIX-$PKGVER/ ln -s ../../examples/$PKGRADIX/$PKGRADIX-$PKGVER $ROOTDIR/usr/share/$PKGRADIX/$PKGRADIX-$PKGVER/examples cp examples/debug2ansi examples/debug2html examples/debugfind $ROOTDIR/usr/share/$PKGRADIX/$PKGRADIX-$PKGVER/ set_default_perm $ROOTDIR } function do_clean { $FLXMAKE clean rm -f contrib/halog/halog{,64} ( do_delpack ) return 0 }