#!/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 0100-MEDIUM-buffers-add-some-new-primitives-and-rework-ex.patch 0101-BUG-buffers-don-t-return-a-negative-value-on-buffer_.patch 0102-MINOR-buffers-make-buffer_pointer-support-negative-p.patch 0103-CLEANUP-kill-buffer_replace-and-use-an-inline-instea.patch 0104-BUG-tcp-option-nolinger-does-not-work-on-backends.patch 0105-CLEANUP-ebtree-remove-a-few-annoying-signedness-warn.patch 0106-CLEANUP-ebtree-clarify-licence-and-update-to-6.0.6.patch 0107-CLEANUP-ebtree-remove-4-year-old-harmless-typo-in-du.patch 0108-CLEANUP-ebtree-remove-another-typo-a-wrong-initializ.patch 0109-BUG-ebtree-ebst_lookup-could-return-the-wrong-entry.patch 0110-OPTIM-stream_sock-reduce-the-amount-of-in-flight-spl.patch 0111-OPTIM-stream_sock-save-a-failed-recv-syscall-when-sp.patch 0112-MINOR-acl-add-support-for-TLS-server-name-matching-u.patch 0113-BUG-http-re-enable-TCP-quick-ack-upon-incomplete-HTT.patch 0114-EXP-buffers-add-buffer_is_between-and-buffer_delete_.patch 0115-BUG-proto_tcp-don-t-try-to-bind-to-a-foreign-address.patch 0116-MINOR-pattern-export-the-global-temporary-pattern.patch 0117-CLEANUP-patterns-get-rid-of-pattern_data_setstring.patch 0118-MEDIUM-acl-use-temp_pattern-to-store-fetched-informa.patch 0119-MINOR-acl-include-pattern.h-to-make-pattern-migratio.patch 0120-MEDIUM-pattern-change-the-pattern-data-integer-from-.patch 0121-MEDIUM-acl-use-temp_pattern-to-store-any-integer-typ.patch 0122-MEDIUM-acl-use-temp_pattern-to-store-any-address-typ.patch 0123-CLEANUP-acl-integer-part-of-acl_test-is-not-used-any.patch 0124-MEDIUM-acl-use-temp_pattern-to-store-any-string-type.patch 0125-CLEANUP-acl-remove-last-data-fields-from-the-acl_tes.patch 0126-MEDIUM-http-replace-get_ip_from_hdr2-with-http_get_h.patch 0127-MEDIUM-patterns-the-hdr-pattern-is-now-of-type-strin.patch 0128-EXP-http-make-acl_fetch_hdr-use-http_get_hdr.patch 0129-MAJOR-add-support-for-quoted-strings-in-configuratio.patch 1000-add-dlmalloc.patch " ### Mainline: 60612ebbbf28de4f13393d411c8368a0bf001289 (v1.5-dev7) ### Updated : 0ea0bbf46811b890b7bc51e9becdbc905fb52297 (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 }