Skip to content

Instantly share code, notes, and snippets.

@jedi4ever
Created April 14, 2011 14:43
Show Gist options
  • Save jedi4ever/919616 to your computer and use it in GitHub Desktop.
Save jedi4ever/919616 to your computer and use it in GitHub Desktop.
build .deb for nodejs with fpm
rm node-v0.4.5.tar.gz
rm -rf node-v0.4.5
apt-get -y install wget
wget http://nodejs.org/dist/node-v0.4.5.tar.gz
tar -xzvf node-v0.4.5.tar.gz
cd node-v0.4.5
./configure --prefix=/usr
rm -rf /tmp/node-v0.4.5.$$
mkdir /tmp/node-v0.4.5.$$
make install DESTDIR=/tmp/node-v0.4.5.$$
cd ..
fpm -sdir -t deb -n nodejs -v 0.4.5 -C /tmp/node-v0.4.5.$$ -p nodejs-VERSION_ARCH.deb usr/bin usr/include usr/lib usr/share
rm -rf /tmp/node-v0.4.5.$$
VERSION=0.3.18
apt-get -y install git
rm -rf npm
git clone https://github.com/isaacs/npm.git
cd npm
git checkout tags/v$VERSION
mkdir /tmp/npm.$$
export npm_config_root=/tmp/npm.$$/usr
export npm_config_binroot=/tmp/npm.$$/usr/bin
export npm_config_manroot=/tmp/npm.$$/usr/man
make install
cd ..
fpm -sdir -t deb -n npm -v $VERSION -C /tmp/npm.$$ -p npm-VERSION_ARCH.deb usr/ -d "nodejs (>= 0.4.5)"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment