-
-
Save ofross/37a8f9d379a3a4b9d7e1394a8491a9c8 to your computer and use it in GitHub Desktop.
Builds a super basic haproxy deb, no extra crap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
VERSION="1.5.8" | |
BUILD="betable1" | |
set -e -x | |
DIRNAME="$(cd "$(dirname "$0")" && pwd)" | |
OLDESTPWD="$PWD" | |
cd "$(mktemp -d)" | |
trap "rm -rf \"$PWD\"" EXIT INT QUIT TERM | |
curl -O "http://www.haproxy.org/download/1.5/src/haproxy-$VERSION.tar.gz" | |
tar xf "haproxy-$VERSION.tar.gz" | |
cd "haproxy-$VERSION" | |
make TARGET=linux2628 \ | |
CPU=generic \ | |
ARCH=x86_64 \ | |
USE_ZLIB=1 \ | |
USE_OPENSSL=1 \ | |
USE_PCRE=1 \ | |
USE_TFO=1 \ | |
DEFINE="-fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security -D_FORTIFY_SOURCE=2" | |
mkdir -p "$PWD/rootfs" | |
make install DESTDIR="$PWD/rootfs" | |
fakeroot fpm -C "$PWD/rootfs" \ | |
-d "libc6 >= 2.15" -d "libpcre3 >= 8.10" -d "libssl1.0.0 >= 1.0.1" -d "zlib1g >= 1:1.1.4" \ | |
-m "Nate Brown <nate@betable.com>" \ | |
-n "haproxy" -v "$VERSION-$BUILD" \ | |
-p "$OLDESTPWD/haproxy_${VERSION}-${BUILD}_amd64.deb" \ | |
-s "dir" -t "deb" \ | |
"usr" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment