Skip to content

Instantly share code, notes, and snippets.

@nbrownus
Last active November 10, 2015 22:33
Show Gist options
  • Save nbrownus/9747587 to your computer and use it in GitHub Desktop.
Save nbrownus/9747587 to your computer and use it in GitHub Desktop.
Creates a deb for carbon
VERSION="0.9.14"
BUILD="slack2"
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/carbon.git
cd carbon
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/carbon_${VERSION}-${BUILD}_amd64.deb"
fakeroot fpm -m "Nate Brown <nate@slack-corp.com>" \
-n "carbon" -v "$VERSION-$BUILD" \
-p "$ORIGPWD/carbon_${VERSION}-${BUILD}_amd64.deb" \
-s "dir" -t "deb" "."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment