Skip to content

Instantly share code, notes, and snippets.

@rflopsy
Forked from jbraeuer/package-graphite.sh
Last active August 29, 2015 14:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rflopsy/b7b27f18e207b218a953 to your computer and use it in GitHub Desktop.
Save rflopsy/b7b27f18e207b218a953 to your computer and use it in GitHub Desktop.
#! /bin/bash
#
# This script needs "fpm". If you dont have it,
# run "gem install fpm"
#
# You also need to "apt-get install python-setuptools" (otherwise fpm fails)
clean() {
rm -rf whisper-0.9.9 carbon-0.9.9 graphite-web-0.9.9
rm -f python*.deb
}
download() {
[ -e graphite-web-0.9.9.tar.gz ] || wget http://launchpad.net/graphite/0.9/0.9.9/+download/graphite-web-0.9.9.tar.gz
[ -e carbon-0.9.9.tar.gz ] || wget http://launchpad.net/graphite/0.9/0.9.9/+download/carbon-0.9.9.tar.gz
[ -e whisper-0.9.9.tar.gz ] || wget http://launchpad.net/graphite/0.9/0.9.9/+download/whisper-0.9.9.tar.gz
}
extract() {
tar -zxvf graphite-web-0.9.9.tar.gz
tar -zxvf carbon-0.9.9.tar.gz
tar -zxvf whisper-0.9.9.tar.gz
}
package() {
fpm -s python -t deb txamqp
fpm -s python -t deb -S 2.7 --depends "python" --depends "python-support" whisper-0.9.9/setup.py
fpm -s python -t deb -S 2.7 --depends "python" --depends "python-support" \
--depends "python-twisted" carbon-0.9.9/setup.py
fpm -s python -t deb -S 2.7 --depends "python" --depends "python-support" \
--depends "python-twisted" \
--depends "python-cairo" \
--depends "python-django" \
--depends "python-django-tagging" \
--depends "python-ldap" \
--depends "python-memcache" \
--depends "python-pysqlite2" \
--depends "python-sqlite" \
--depends "libapache2-mod-python" \
graphite-web-0.9.9/setup.py
}
install() {
sudo dpkg -i python*.deb
sudo apt-get -f install
}
download
clean
extract
package
install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment