Porting Node.js modules is a very simple process.
Add USES=node
to the port's
Makefile
. The framework will install
the relevant files in the right places. It create the
packaging list automatically.
If a port need to install headers or build extension,
instructions on how to select it are given in the USES=node
part of Chapter 15, Using USES
Macros.
Ports that install files under
NODE_MODULEDIR
must use the
node-
name
prefix.
Variable | Value |
---|---|
NODE_MODULEDIR | The directory, where the Node.js module is
installed. Default
${PREFIX}/${NODE_LIBDIR}/${PORTNAME}
|
NODE_SCRIPTS | List of Node.js scripts, located in
${NODE_MODULEDIR}/${NODE_SCRIPTSDIR}
|
NODE_SCRIPTSDIR | Relative paths, where scripts are located.
Default bin/ |
NODE_MAN3 | List of man pages |
NODE_EXCLUDEDIRS | List of additional directories to exclude |
PORTNAME= underscore PORTVERSION= 1.8.3 CATEGORIES= devel node MASTER_SITES= NPM MAINTAINER= ports@FreeBSD.org COMMENT= JavaScript's functional programming helper library USES= node tar:tgz .include <bsd.port.mk>
PORTNAME= coffee-script PORTVERSION= 1.9.3 CATEGORIES= lang node MASTER_SITES= NPM MAINTAINER= ports@FreeBSD.org COMMENT= Interpreter and compiler for the CoffeeScript language RUN_DEPENDS= node-underscore>=1.8.3:devel/node-underscore USES= node tar:tgz NODE_SCRIPTS= cake coffee .include <bsd.port.mk>
The framework automatically creates symlinks in
${PREFIX}/bin
.
NODE_EXCLUDEDIRS
PORTNAME= hooker PORTVERSION= 0.2.3 CATEGORIES= devel node MASTER_SITES= NPM MAINTAINER= ports@FreeBSD.org COMMENT= Useful debugging library for Node.js USES= node tar:tgz NODE_EXCLUDEDIRS= dist/ .include <bsd.port.mk>
All FreeBSD documents are available for download at http://ftp.FreeBSD.org/pub/FreeBSD/doc/
Questions that are not answered by the
documentation may be
sent to <freebsd-questions@FreeBSD.org>.
Send questions about this document to <freebsd-doc@FreeBSD.org>.