Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Utility to convert npm packages to Debian packages
JavaScript Elixir Makefile
branch: master

Merge pull request #26 from marado/patch-2

Add repository to package.json file
latest commit 9dacadc42d
@arikon authored
Failed to load latest commit information.
bin Bootstrap for new-age npm2debian
debian-npm-ver FIX: Missing reference to files
debian-npm FIX: Missing reference to files
lib Do not template debian/ file
.gitignore Bootstrap for new-age npm2debian
GNUmakefile rsync-arikon: rsync to another dir Add english ``, fix russian ``
package.json Added repository to package file
test.js Use patched `semver` module to construct Depends on `nodejs` package


npm2debian is a command line tool to convert packages from repository to Debian packages.

Contributions are welcome, we have some tasks to do.


npm2debian [options] <package>


-h, --help                     : Help
-o OUTPUT, --output=OUTPUT     : Output directory
--versioned                    : Build versioned debian package
--no-package-prefix            : Do not add prefix to Debian package name
--maintainer=MAINTAINER        : Debian package maintainer name
-e EMAIL, --email=EMAIL        : Debian package maintainer email
--package-prefix=PACKAGEPREFIX : Debian package name prefix
--debian-version=DEBVERSION    : Debian package version
--debian-build=DEBBUILD        : Debian package build
-v, --version                  : Show version


These environmanet variables are used during the packaging:

DEBFULLNAME="Maintainer Full Name"

You will need the following Debian packages for the tool to work:

sudo apt-get install devscripts dh-make

You will need the following Debian packages to build debs:

sudo apt-get install debhelper fakeroot dpkg-dev


You have several options.

  • Install globally from npm repository

    npm -g install npm2debian

  • Install locally

    npm install npm2debian

  • Install from sources

    git clone
    cd npm2debian
    npm install

Usage examples

  • Simple converting of bem package to npm-bem:

    npm2debian bem

    It will create npm-bem-<version> directory with source Debian package describing only one binary package npm-bem.

  • To get Debian package with version in its name you should specify --versioned options:

    npm2debian --versioned bem

    It will create npm-bem-<version> directory with source Debian package describing two binary packages:

    • npm-bem
    • npm-bem-<dashed-version>, where <dashed-version> is a package version with dots replaced to dashes
  • To build debs run:

    cd npm-bem*
    dpkg-buildpackage -rfakeroot

Something went wrong with that request. Please try again.