itc-debtool

1.0.1 • Public • Published

ITC Debian package generator

Example

import deb from 'itc-debtool';

// initialize the package generator
let pkg = new deb.Package({

    // the build directory (the package payload)
    input: '/path/to/myproject/build',

    // the package file will be created in this directory
    output: '/path/to/myproject',

    // include timestamp in package filename?
    // if truthy, the value must be the timestamp value (anything you want)
    timestamp: false,

    // .deb package compression
    compression: {
        algo: 'bzip2',
        level: 9,
    },

    debian: {

        // see https://www.debian.org/doc/debian-policy/ch-controlfields.html
        control: new deb.Control({
            'Package': 'name-of-package',
            'Version': '0.1.0',
            'Section': 'base',
            'Priority': 'optional',
            'Architecture': 'all',
            'Maintainer': 'IT Consultis',
            'Description': 'Awesome package',
            'Repository': 'https://github.com/blah/blah.git',
            'Depends': 'php5-fpm, php5-mysql, php5-mcrypt, php5-json',
        }),

        // package scripts
        scripts: {
            preinst: [],
            postinst: [
                '#!/bin/bash',
                'chmod 777 /var/www/blah/index.html', 
            ],
            prerm: [],
            postrm: [],
        },
    },

});

// generate the package
pkg.generate().then((pkgpath) => {
    console.log('Debian package generated at ' + pkgpath);
});

Readme

Keywords

none

Package Sidebar

Install

npm i itc-debtool

Weekly Downloads

1

Version

1.0.1

License

ISC

Last publish

Collaborators

  • itc