Skip to main content

Lightweight tool for creating deb packages

Project description

A tool to create lightweight deb packages.

By default it creates deb files for installation in the Termux Linux environment, but by specifying e.g. --prefix /usr a deb file can be created for any .deb-using distribution such as Debian or Ubuntu.

Prerequisites

Install it with apt install termux-create-package to use inside Termux.

If you want to run this tool in a non-Termux environment (Linux/macOS), install with pip3 install termux-create-package after making sure that Python 3 is installed.

Usage

This tool expects packages to be defined in JSON manifest files. Run termux-create-package -h for more information.

An example manifest file is given below:

{
  "name": "myproject",
  "version": "1.0",
  "homepage": "http://mysite.com",
  "maintainer": "@mynick",
  "description": "my description",
  "arch": "all",
  "depends": ["dependency"],
  "files" :{
    "myfile.py": "bin/myfile",
    "mylib.so": "lib/mylib.so"
  }
}

The fields are as follows:

  • name: The name of your package.

  • version: The version of the package.

  • maintainer: Optional informative field specifying who maintains the package.

  • homepage: Optional informative field specifying a homepage URL.

  • description: Optional informative field containing a short description of the package.

  • depends: Comma-separated list of packages that this package depends on. Will be installed automatically when this package is installed using apt.

  • arch: Set to all if the package only contains architecture-independent data, or one of arm/i686/aarch64/x86_64 as appropriate.

  • files: Files relative to the manifest file that should be included in the package. The keys are paths (relative to the current directory) to include and the values are paths where the files should end up at installation (relative to the $PREFIX path in Termux where everything is installed under).

Run the following command to create a package file named ${name}_${version}_all.deb:

$ termux-create-package manifest.json

This can then be installed in Termux using the command:

apt install ./my-package-file.deb

or may be added to a custom apt repository created with termux-apt-repo or any other available tool.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

termux-create-package-0.4.tar.gz (3.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

termux_create_package-0.4-py3-none-any.whl (6.2 kB view details)

Uploaded Python 3

File details

Details for the file termux-create-package-0.4.tar.gz.

File metadata

File hashes

Hashes for termux-create-package-0.4.tar.gz
Algorithm Hash digest
SHA256 5d900fa16849e16c049e7a0f0560358c57087512fe9e86104d654814c988f115
MD5 0b72e50d0ac6f0b92642dc8f8daac8b8
BLAKE2b-256 cbd1bac7633a802c03db163019201ae4a980e8925e1164ad456af3f08d1c7f9f

See more details on using hashes here.

File details

Details for the file termux_create_package-0.4-py3-none-any.whl.

File metadata

File hashes

Hashes for termux_create_package-0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 2da214ef542c9762b4e1b7e56740f3119e05a765395933c1eda8aceb0607dda5
MD5 574a8bd1ee23a85f754cf71e9f1cf9ee
BLAKE2b-256 263aabb452bfb1fb3829d7008e166cfd3b162544518f3d47fde5912e95a2129c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page