Skip to content

Instantly share code, notes, and snippets.

@dopey
Last active August 29, 2015 14:24
Show Gist options
  • Save dopey/88d98b677266c0da6027 to your computer and use it in GitHub Desktop.
Save dopey/88d98b677266c0da6027 to your computer and use it in GitHub Desktop.
httperf deb packager
#!/bin/sh
VERSION="0.9.0"
BUILD="betable2"
set -e -x
ORIGPWD="$(pwd)"
cd "$(mktemp -d)"
trap "rm -rf \"$PWD\"" EXIT INT QUIT TERM
wget "http://archive.ubuntu.com/ubuntu/pool/universe/h/httperf/httperf_$VERSION.orig.tar.gz"
/bin/tar -xzvf "httperf_$VERSION.orig.tar.gz"
cd "httperf-$VERSION"
mkdir build; cd build
../configure;
make
make install DESTDIR="$PWD"
rm -f "$ORIGPWD/httperf_${VERSION}-${BUILD}_amd64.deb"
fakeroot fpm -C "$PWD" \
-m "Max Furman <max@betable.com>" \
-n "httperf" -v "$VERSION-$BUILD" \
-p "$ORIGPWD/httperf_${VERSION}-${BUILD}_amd64.deb" \
-s "dir" -t "deb" \
"man" "src" "usr"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment