[Pkg-javascript-devel] Bug#650343: [PATCH/WIP] build: install nodejs synonym for node command
Jonathan Nieder
jrnieder at gmail.com
Tue May 1 20:55:31 UTC 2012
Gah, even a little talking on debian-devel@ is so tiring. :) I really
dislike rule by the loudest.
It reminded me to send this patch so it doesn't get forgotten, so I
guess it's not a complete loss.
Patch is against Joyent's "master" branch (0.7.y). Looks like
upstream dropped --shared-cares and never added --shared-libev or
--shared-libeio, and the build system was revamped so the patch adding
mips support will need tweaking. So there's a little more work to do
before this is ready for experimental.
-- >8 --
On some machines the "node" command refers to some program that is not
Node.js.
This patch adds a "nodejs" symlink that does exactly the same thing as
/usr/bin/node, for use when one wants to refer unambiguously to the
Node.js interpreter.
---
Makefile | 1 +
doc/node.1 | 5 ++++-
doc/nodejs.1 | 1 +
tools/installer.js | 4 +++-
4 files changed, 9 insertions(+), 2 deletions(-)
create mode 120000 doc/nodejs.1
diff --git a/Makefile b/Makefile
index 94b7eb9e..3288ca59 100644
--- a/Makefile
+++ b/Makefile
@@ -209,6 +209,7 @@ $(TARBALL): node out/doc
git archive --format=tar --prefix=$(TARNAME)/ HEAD | tar xf -
mkdir -p $(TARNAME)/doc
cp doc/node.1 $(TARNAME)/doc/node.1
+ ln -s node.1 $(TARNAME)/doc/nodejs.1
cp -r out/doc/api $(TARNAME)/doc/api
rm -rf $(TARNAME)/deps/v8/test # too big
rm -rf $(TARNAME)/doc/images # too big
diff --git a/doc/node.1 b/doc/node.1
index f17ccdae..f582bed5 100644
--- a/doc/node.1
+++ b/doc/node.1
@@ -2,7 +2,7 @@
.SH "NAME"
-node \- Server-side JavaScript
+node, nodejs \- Server-side JavaScript
.SH SYNOPSIS
@@ -32,6 +32,9 @@ node \- Server-side JavaScript
Execute without arguments to start the REPL.
+.B nodejs
+is equivalent to
+.BR node .
.SH DESCRIPTION
diff --git a/doc/nodejs.1 b/doc/nodejs.1
new file mode 120000
index 00000000..93cddbc0
--- /dev/null
+++ b/doc/nodejs.1
@@ -0,0 +1 @@
+node.1
\ No newline at end of file
diff --git a/tools/installer.js b/tools/installer.js
index 96c992ed..369c68a6 100644
--- a/tools/installer.js
+++ b/tools/installer.js
@@ -117,6 +117,8 @@ if (cmd === 'install') {
// Copy binary file
copy('out/Release/node', 'bin/node');
+ queue.push('ln -sf node ' +
+ path.join(dest_dir, node_prefix, 'bin/nodejs'));
// Install node-waf
if (variables.node_install_waf) {
@@ -135,7 +137,7 @@ if (cmd === 'install') {
}
} else {
remove([
- 'bin/node', 'bin/npm', 'bin/node-waf',
+ 'bin/node', 'bin/nodejs', 'bin/npm', 'bin/node-waf',
'include/node/*', 'lib/node_modules', 'lib/node'
]);
}
--
1.7.10
More information about the Pkg-javascript-devel
mailing list