#!/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/git?p=haproxy.git;a=snapshot;h=60612ebbbf28de4f13393d411c8368a0bf001289;sf=tgz" SRC_FETCH_METHOD="http" MAKEDEPENDS=( "pcre-*:::*.a *.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-BUILD-MINOR-fix-the-source-URL-in-the-spec-file.patch 0002-DOC-acl-is-http_first_req-not-http_req_first.patch 0003-BUG-MEDIUM-don-t-trim-last-spaces-from-headers-consi.patch 0004-MINOR-acl-add-new-matches-for-header-path-url-length.patch 0005-BUILD-halog-make-halog-build-on-solaris.patch 0006-BUG-MINOR-don-t-use-a-wrong-port-when-connecting-to-.patch 0007-MINOR-remove-the-client-server-side-distinction-in-S.patch 0008-BUG-MINOR-fix-options-forwardfor-if-none-when-an-alt.patch 0009-MINOR-halog-add-support-for-matching-queued-requests.patch 0010-DOC-indicate-that-cookie-prefix-and-indirect-should-.patch 0011-OPTIM-MINOR-move-struct-sockaddr_storage-to-the-tail.patch 0012-OPTIM-MINOR-make-it-possible-to-change-pipe-size-tun.patch 0013-BUILD-MINOR-silent-a-build-warning-in-src-pipe.c-fcn.patch 0014-OPTIM-MINOR-move-the-hdr_idx-pools-out-of-the-proxy-.patch 0015-MEDIUM-tune.http.maxhdr-makes-it-possible-to-configu.patch 0016-BUG-MINOR-fix-a-segfault-when-parsing-a-config-with-.patch 0017-CLEANUP-rename-possibly-confusing-struct-field-track.patch 0018-BUG-MEDIUM-checks-fix-slowstart-behaviour-when-serve.patch 0019-MINOR-config-tolerate-server-cookie-setting-in-non-H.patch 0020-MEDIUM-log-Use-linked-lists-for-loggers.patch 1000-add-dlmalloc.patch " ### Mainline: 60612ebbbf28de4f13393d411c8368a0bf001289 (v1.5-dev7) ### Updated : 0f99e349780083834afc188b499357c87d5b04fd (v1.5-dev7-git) FILE_LIST= HAPROXY_VERSION="${PKGVER}" HAPROXY_SUBVERS="-${DISTVER}_${VERSFX}" HAPROXY_DATE="$(date +%Y/%m/%d)" function do_compile_only { # halog ( cd contrib/halog if [ "$FLXARCH" = "x86_64" ]; then $FLXMAKE CC=$CC halog64 mv halog64 halog else $FLXMAKE CC=$CC halog fi ) # haproxy case "$FLXTARGARCH" in i?86) REGPARM=1 ; VSYSCALL=1 ;; x86*) REGPARM=1 ; VSYSCALL= ;; *) REGPARM= ; VSYSCALL= ;; esac 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=linux26 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_LINUX_TPROXY=1 USE_TPROXY=1 USE_LINUX_SPLICE=1 USE_MY_SPLICE=${MY_SPLICE} USE_REGPARM=${REGPARM} USE_VSYSCALL=${VSYSCALL} USE_DLMALLOC=1 } 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 }