FILE_LIST="" PATCH_LIST=" 0001-timer-reduce-cpu-usage.patch 0002-scheduler-reduce-CPU-usage.patch 0003-Added-vrrp-timeout-to-synopsis.patch 0004-Cleaned-fixed-up-KEEPALIVED-MIB-it-now-passes-smilin.patch 0005-Added-support-for-static-and-virtual-ip-rules-for-us.patch 0006-Fix-socket-setup-code-for-IPv4-multicast.patch 0007-Set-and-restore-interface-parameters.patch 0008-Leave-VRRP-multicast-group-by-ifindex.patch 0009-Don-t-delete-vmac-interfaces-before-dropping-multica.patch 0010-Don-t-open-vrrp_send_socket-if-address-family-is-wro.patch 0011-Stop-m-cast-packets-being-queued-and-not-received-on.patch 0012-Fix-typos-in-log-messages.patch 0013-Fix-RFC-reference.patch 0014-Fix-vrrp-parser-error-message.patch 0015-Add-interface-index-to-vrrp-dump-data.patch 0016-Don-t-specify-source-address-in-IP_ADD_MEMBERSHIP-io.patch 0017-If-fail-to-remove-vmac-i-f-don-t-report-success-afte.patch 0018-Don-t-explicitly-drop-IGMP-membership-before-interfa.patch 0019-Don-t-report-error-on-interface-creation-deletion.patch 0020-Ensure-the-first-interface-s-parameters-are-set-when.patch 0021-Allow-gratuitious-ARP-parameters-to-be-configured-gl.patch 0022-Remove-nat_mask-configuration-parameter.patch 0023-Update-man-pages.patch 0024-Remove-remaining-2.2-kernel-code.patch 0025-Remove-plugin_dir-configuration-parameter.patch 0026-Allow-specification-of-default-VRRP-version-to-use.patch 0027-Remove-use-of-deprecated-nl_join_groups.patch 0028-vrrp-set-router-flag-in-neighbour-advertisements.patch 0029-Dynamic-addition-of-interfaces-from-netlink-msg.patch 0030-Stop-memory-leak-rename-function-for-convention.patch 0031-Make-parent-process-handle-and-propagate-USR1-2-sign.patch 0032-Ignore-all-signals-except-those-explicitly-wanted.patch 0033-Remove-potential-race-condition-when-setting-signal-.patch 0034-Make-signal_ignore-mean-ignore.patch 0035-Streamline-signal-handling-code.patch 0036-Invoke-notify-scripts-with-the-default-signal-dispos.patch 0037-Return-address-of-previous-signal-handler-according-.patch 0038-Invoke-all-scripts-with-the-default-signal-dispositi.patch 0039-Don-t-wait-on-script-process-being-killed-after-time.patch 0040-Set-thread-conditions-before-adding-to-list.patch 0041-Remove-some-code-duplication-re-running-scripts.patch 0042-Set-standard-signal-disposition-before-invoking-ip-6.patch 0043-Fix-reloading-and-invoking-notify-scripts.patch 0044-Move-common-code-for-opening-fd-0-1-2-into-a-functio.patch 0045-Optimise-closure-of-fds-before-invoking-scripts.patch 0046-Simplify-some-IPv4-IPv6-code.patch 0047-Added-check-for-libnfnetlink-header-during-the-confi.patch 0048-build-fix-kernel-include-path.patch " SRC_FETCH_PATH="http://www.keepalived.org/software/keepalived-${PKGVER}.tar.gz" SRC_FETCH_METHOD="http" MAKEDEPENDS=( "popt-*:::*.h *.a" "openssl-*:::*.h *.so *.so.*" ) function do_config { CC="$CC" LD="$LD" \ CFLAGS="$GCC_ARCH_SMALL $GCC_CPU_SMALL $GCC_OPT_SMALL" \ LDFLAGS="-Wl,-Bstatic -lpopt -Wl,-Bdynamic" \ ./configure --build=${FLXHOST} --host=${FLXTARG} \ --prefix=/usr --sysconfdir=/etc \ --with-kernel-version=2.6 --with-kernel-dir=$KERNDIR \ --disable-lvs --disable-fwmark --disable-snmp --disable-sha1 } function do_compile_only { mkdir -p bin #$FLXPMAKE LDFLAGS="-Wl,-Bstatic -lpopt -Wl,-Bdynamic -lssl -lcrypto -ldl" $FLXPMAKE mv -f bin/keepalived bin/keepalived.dynamic # only if static build is needed (check libssl.a and libcrypto.a) # $FLXMAKE LDFLAGS="-Wl,-Bstatic -lpopt -lssl -lcrypto -Wl,-Bdynamic -ldl" # mv -f bin/keepalived bin/keepalived.static mv -f bin/keepalived.dynamic bin/keepalived } function do_prepack { $FLXMAKE install prefix=$ROOTDIR/usr sysconfdir=$ROOTDIR/etc # cp bin/keepalived.static $ROOTDIR/usr/sbin/ mkdir -p $EXAMPLEDIR/keepalived/etc $ROOTDIR/sbin/init.d mv $ROOTDIR/etc/keepalived $EXAMPLEDIR/keepalived/etc/ rm -f $ROOTDIR/etc/init.d/keepalived install -o 0 -g 4 -m 750 .flxpkg/add-ons/vrrp $ROOTDIR/sbin/init.d/ cp .flxpkg/add-ons/vrrp_notify* $EXAMPLEDIR/keepalived/etc/keepalived/ cp .flxpkg/add-ons/config.rc $EXAMPLEDIR/keepalived/etc/ mv $EXAMPLEDIR/keepalived/etc/keepalived/samples/* $EXAMPLEDIR/keepalived/etc/keepalived/ rmdir $EXAMPLEDIR/keepalived/etc/keepalived/samples set_default_perm $ROOTDIR chmod 755 $ROOTDIR/etc/rc.d/init.d/keepalived }