Udpated and moved information about nodejs module to right page
|Deletions are marked like this.||Additions are marked like this.|
|Line 18:||Line 18:|
| * if the library is usable from within the NodeJS framework, the ''binary'' package name '''must''' be called '''node-foo''', and the ''source'' package name '''should''' be called the same;
* if the library is usable both from a web-browser ''and'' from NodeJS, it should generate ''two binary packages'', each called as described above.
|Line 26:||Line 28:|
|=== libjs-foo ===|
|Line 29:||Line 30:|
|=== node-foo ===
The scripts should be installed to `/usr/lib/nodejs/` or `/usr/lib/nodejs/foo/`. The choice depends whether the module is contained in a single file or in multiple files. In case the latter is true, please refer to the [[http://nodejs.org/docs/latest/api/modules.html#folders_as_Modules|upstream documentation]] (also available in `/usr/share/doc/nodejs/api/modules.html#folders_as_Modules`) to understand how to correctly make it available to the NodeJS framework.
== Binary rename of node to nodejs ==
The program name "node" is conflicting with another package.
Technical committee decided to fix this by [[http://bugs.debian.org/614907#108|renaming node to nodejs]].
To comply to this, it is often as simple as :
* Depends nodejs
* change shebangs to #!/usr/bin/nodejs
* rename node to nodejs in makefiles
* do not depend on nodejs-legacy
Some programs are a bit less obvious to fix, for example they can spawn nodejs instances using "node" name.
This document is still work in progress.
Please check the mailing list archives for the latest discussions about it.
Given a foo library, packages must be named according to the following rules:
if the library is usable from within a web-browser, the binary package name must be called libjs-foo, and the source package name should be called foo.js;
if the library is usable both from a web-browser and from NodeJS, it should generate two binary packages, each called as described above and in Nodejs/Manual page.
Please remember that it's preferable if you name the repository after the source package name (i.e. foo.js.git for foo.js and node-foo.git for node-foo). This isn't a hard requirement though.