npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

debify

v1.1.0

Published

Cross-platform utility for creating DEB-packages

Downloads

9

Readme

debify

This is a cross-platform utility for creating DEB-packages. It is written in pure JavaScript and doesn't rely on any system utilities (such as dpkg, ar, tar, etc), so it can be used on MacOS, Windows, and GNU/Linux.

Initially debify was intended to be used for creating DEB-packages from single-page web applications, so that they can be installed into Debian based GNU/Linux distributions in a proper way, i.e. using standard package managers like apt, aptitude or dpkg, but since it's a general tool, you can "debify" anything you want.

Installation

$ npm install -g debify

Usage

This utility requires two arguments: DATA_DIRECTORY and CONTROL_DIRECTORY:

$ debify <DATA_DIRECTORY> <CONTROL_DIRECTORY>

It creates a DEB-package using contents of DATA_DIRECTORY and metadata from CONTROL_DIRECTORY which must contain at least control file—the binary package control file with the control fields for the package. There are five mandatory control fields: Package, Version, Architecture, Maintainer, and Description. The fields can have hard-coded values or can refer to environment variables using ${VARIABLE_NAME} syntax. All other metadata files (such as conffiles, postinst, postrm, preinst and prerm) is used as well if present in CONTROL_DIRECTORY.

Example

Let's say there is a web application (named example) which consists of three files: index.html, index.js and index.css. To create a DEB-package which installs them into /var/www/example directory, we will need a control file like this one:

Package: example
Version: 1.0.0${SUFFIX}
Architecture: all
Maintainer: John Doe <[email protected]>
Description: An example web-application

Also we will need data and debian directories. We will place index.html, index.js and index.css into desired subdirectory under the former directory, and the newly created control file into the latter directory. At the end we should got the following directory structure:

example
├── data
│   └── var
│       └── www
│           └── example
│               ├── index.css
│               ├── index.html
│               └── index.js
└── debian
    └── control

No we can launch debify utility giving it paths to data and debian directories as the fist and second arguments respectively (we assume that current working directory is example):

$ debify data debian

This will create the DEB-package in the current working directory. According to the control file it will be named example_1.0.0-all.deb, but since Version control field refers to SUFFIX environment variable, we can use it for creating release candidates (example_1.0.0rc1-all.deb) without changing the control file:

$ SUFFIX=rc1 debify data debian