Created
July 9, 2013 04:14
-
-
Save chrisboulton/5954651 to your computer and use it in GitHub Desktop.
package nodejs using fpm (for debian) i'm lazy, you should be too, so here's a bash script.
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 | |
set -e | |
VERSION=0.10.12 | |
BUILD_DIR=`mktemp -d` | |
trap "rm -rf -- $BUILD_DIR" EXIT | |
export DESTDIR=$BUILD_DIR/build | |
ARCHIVE=node-v$VERSION | |
wget http://nodejs.org/dist/v$VERSION/$ARCHIVE.tar.gz -O $BUILD_DIR/$ARCHIVE.tar.gz | |
tar -C $BUILD_DIR -zxf $BUILD_DIR/$ARCHIVE.tar.gz | |
cd $BUILD_DIR/$ARCHIVE | |
./configure --prefix /usr | |
make install | |
cd - | |
ln -s node $DESTDIR/usr/bin/nodejs | |
fpm -s dir -t deb -n nodejs -v $VERSION -C $DESTDIR --deb-user root --deb-group root \ | |
--replaces npm --provides npm -m 'Chris Boulton <[email protected]>' \ | |
--iteration 1 --description "nodejs v$VERSION, includes bundled npm" \ | |
--url http://nodejs.org --vendor 'Joyent, Inc' usr/bin usr/lib usr/share | |
exit |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment