Text 18 Nov 7 notes node.js 0.6.1 OpenBSD 5.0

we ported the node.js 0.6.1 to openbsd and my only concern was to provide a way not to install as root as the js dudes around will just tell you sudo make install it but that’s dangerous especially giving a look at the quality of the code of both node.js and npm, the latter is just ridiculous but hey it kind of works so… just install as user and don’t be sorry

  • for node, get the port patch or git the port wip from my crew here
$ cd 
$ git clone https://github.com/firemyst/openbsd-wip
  • backup the old port for node and replace it with the new one
$ mv /usr/ports/www/node/ /usr/ports/www/node.old/
$ mv ~/openbsd-wip/www/node/ /usr/ports/www/node/
  • build the port
$ cd /usr/ports/www/node/
$ make
  • install a fake (an install without root)
$ make fake
  • bring the newly build node to your homedir/bin
$ cd
# optional
$ mkdir bin 
# install node locally
$ cp /usr/ports/pobj/node-0.6.1/fake-i386/usr/local/bin/node/* bin/
$ cp -R /usr/ports/pobj/node-0.6.1/fake-i386/usr/local/include/ bin/
$ cp -R /usr/ports/pobj/node-0.6.1/fake-i386/usr/local/lib/ bin/
# optional add ~/bin to your path global in ~/.profile

tomorrow i’ll hint on npm, it’s easier than node if you know how to fix the tar arguments in its utterly stupid install script

PS. you’ll have to follow the port/package faq of OpenBSD to set your group and /usr/ports permission right to be able to make and make fake with a regular user of the wsrc group. i suppose this is something trivial for an OpenBSD user or even newbie.

  1. thoughts-on-computing reblogged this from firemyst and added:
    Wouldn’t you do … ./configure --install-prefix=/home/`whoami`/node.js/ ? The...are...
  2. firemyst posted this

© firemyst USE AT YOUR OWN RISK