Skip to content

Instantly share code, notes, and snippets.

@pilwon
Last active August 29, 2015 14:01
Show Gist options
  • Save pilwon/8701731320c73bc6c914 to your computer and use it in GitHub Desktop.
Save pilwon/8701731320c73bc6c914 to your computer and use it in GitHub Desktop.
Haproxy 1.5 deb package w/ FPM
# Run FPM in docker container.
docker run -it --rm dockerfile/fpm
# Install dependencies.
apt-get install -y libssl-dev
# Download & Build Haproxy.
cd /tmp
wget http://haproxy.1wt.eu/download/1.5/src/devel/haproxy-1.5-dev25.tar.gz
tar xvzf haproxy-1.5-dev25.tar.gz
pushd haproxy-1.5-dev25
make TARGET=linux2628 USE_OPENSSL=1 USE_ZLIB=1
make install DESTDIR=/tmp/haproxy-install
popd
# Package up the Haproxy runtime.
fpm \
-s dir \
-t deb \
-n haproxy \
-v 1.5-dev25 \
-p haproxy-VERSION_ARCH.deb \
-d "libc6 (>= 2.15)" \
-d "libpcre3" \
-d "libssl1.0.0 (>= 1.0.1)" \
-d "zlib1g (>= 1:1.1.4)" \
-d "init-system-helpers (>= 1.13~)" \
-d "adduser" \
-C /tmp/haproxy-install \
usr/local/sbin
# Package up the manpages.
fpm \
-s dir \
-t deb \
-n haproxy-doc \
-v 1.5-dev25 \
-p haproxy-doc-VERSION_ARCH.deb \
-C /tmp/haproxy-install \
usr/local/doc
usr/local/share
# Test.
file haproxy-*.deb
dpkg -i haproxy-*.deb
haproxy
man haproxy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment