Created
August 6, 2013 20:49
-
-
Save llasram/6168499 to your computer and use it in GitHub Desktop.
Package Leiningen via fpm
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #! /bin/bash -e | |
| PACKAGE=leiningen | |
| VERSION=2.1.2 | |
| ITERATION=1 | |
| DEBVERSION=${VERSION}+dbla.${ITERATION} | |
| BINDIR=/opt/damballa/bin | |
| LIBDIR=/opt/damballa/lib/leiningen | |
| rm -rf ./root/ | |
| mkdir -p ./root/$BINDIR | |
| ( | |
| cd ./root/$BINDIR | |
| curl -O https://raw.github.com/technomancy/leiningen/$VERSION/bin/lein | |
| sed -ri \ | |
| -e "s,^(LEIN_JAR=\")\\\$LEIN_HOME/self-installs,\\1${LIBDIR}," \ | |
| -e 's,\[ "\$1" = "(self-install|upgrade)" \],false,' \ | |
| lein | |
| chmod a+x lein | |
| ln -s lein lein2 | |
| ) | |
| mkdir -p ./root/$LIBDIR | |
| ( | |
| cd ./root/$LIBDIR | |
| prefix=https://leiningen.s3.amazonaws.com/downloads | |
| curl -O $prefix/leiningen-$VERSION-standalone.jar | |
| ) | |
| rm -f ./${PACKAGE}_*.deb | |
| fakeroot fpm -s dir -t deb \ | |
| -n $PACKAGE -v $DEBVERSION \ | |
| -d java-runtime \ | |
| -C root . | |
| rm -rf ./root |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment