Skip to content

Instantly share code, notes, and snippets.

@nbrownus
Last active November 10, 2015 22:33
Show Gist options
  • Save nbrownus/9747573 to your computer and use it in GitHub Desktop.
Save nbrownus/9747573 to your computer and use it in GitHub Desktop.
Creates a deb for graphite-web
VERSION="0.9.14"
BUILD="slack4"
set -e -x
ORIGPWD="$(pwd)"
TMP="$(mktemp -d)"
cd $TMP
trap "rm -rf \"$TMP\"" EXIT INT QUIT TERM
git clone https://github.com/graphite-project/graphite-web.git
cd graphite-web
git checkout "tags/$VERSION"
python setup.py install --prefix "$TMP/prepare/opt/graphite" --install-lib "$TMP/prepare/opt/graphite/lib"
cd ../prepare
rm -f "$ORIGPWD/graphite-web_${VERSION}-${BUILD}_amd64.deb"
fakeroot fpm -m "Nate Brown <[email protected]>" \
-n "graphite-web" -v "$VERSION-$BUILD" \
-p "$ORIGPWD/graphite-web_${VERSION}-${BUILD}_amd64.deb" \
-d "whisper >= $VERSION" -d "carbon >= $VERSION" \
-s "dir" -t "deb" "."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment