Embedding some modules
This page is deprecated.
When we have modules that are unlikely to be needed by other modules we can include it inside another module. Later if other modules also need the embedded module, it can be packaged separately.
See node-tar and node-babel source packages for using pkg-components tool and multiple tarballs. node-tar needs modules only during runtime (it uses debian/components/install script) and node-babel needs them during build (it uses debian/components/build script). Your package must use debhelper >= 11.
Create the directory debian/components and one sub directory for each component
The directory debian/components must be populated with the following files with their content:
build config copyright.in install test
- Each sub directory for each component must be populated with the following files with their content:
control copyright install version watch
- You can copy the files from the packages examples and adapt the content to your package
Declare build dependency on pkg-components
Call dh_components from debian/rules
Add node_modules directory to debian/install file and install your components in this directory.
Run uscan-components --verbose to download all orig.tar files or create it in manually (for example node-tar_4.4.6.orig-minizlib.tar.gz)
Run dpkg-source -b . to generate .dsc file with the component tarball included.
Import the component tarball using gbp import-dsc and pristine-tar commit
Build the package with usual tools (dpkg-buildpackage).
Deprecated method - Use pkg-components and multiple tarballs described above instead.
See node-clone-deep for an example.
- Extract and copy it to debian/node_modules
Add debian/.gitignore with this line: !node_modules
- export NODE_PATH=debian/node_modules in debian/rules and debian/tests
Install the modules if it is a runtime dependency using debian/install file