Code Monkey home page Code Monkey logo

debify's Introduction

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 to be a DEB-package.

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 at least contain a well-formed control file. All other standard control files (such as conffiles, postinst, postrm, preinst and prerm) will be used as well if present. The result DEB-package is placed into current working directory and its name is up to the contents of the control file.

Example

Let's imagine that there is a single-page web application (named example) which consists of three files: index.html, index.js, and index.css. To create a DEB-package which will install them into /var/www/example directory, we need to create a directory structure like this one:

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

Except for the files of the web application itself there is a control file. The file must comply with binary package control file, and has to include at least five fields: Package, Version, Architecture, Maintainer, and Description:

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

To create the DEB-package (according to our control file it will be named example_1.0.0-all.deb) we have only to change the current working directory to example and run debify:

$ debify data debian

debify's People

Contributors

windicted avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.