makedeb creates DEB files that can be installed using dpkg or uploaded to an apt repository and installed using apt-get.
$ npm install makedeb
makedeb is a function that returns a promise with the path to the built package.
var makedeb = require('makedeb');
makedeb(options)
.then(function(debFilePath) {
// Package successfully created.
})
.catch(function(error) {
// An error occurred creating the package.
});
makedeb({
packageName: 'sample',
version: '1.2.3',
buildDir: path.join(__dirname, 'dist'),
outDir: path.join(__dirname, 'artifacts'),
installPath: '/opt/example/sample',
overwrite: false,
// debian control file options
maintainer: 'admin@example.com',
section: 'main',
priority: 'optional',
architecture: 'all',
essential: 'no',
packageDescription: ''
});
The name of the package.
The version of the package. Must be a string or number.
The directory to package into a DEB file.
The directory to write the DEB file into. Must be a valid directory.
The directory dpkg or apt-get should install the package into.
The maintainer of the package.
Default: true
If a DEB package with the same name already exists, whether or not to overwrite it.
Default: 'main'
"Section" parameter in the control file.
Default: 'optional'
"Priority" parameter in the control file.
Default: 'all'
"Architecture" parameter in the control file.
Default: 'no'
"Essential" parameter in the control file.
Default: ''
"Description" parameter in the control file.