Skip to main content

termux-apt-repo

Script to create Termux package repos.

It can be used to publish cross-compiled packages created using the Termux build setup or with packages created (possibly on-device) with termux-create-package.

Usage instructions

In Termux, install with packages install termux-apt-repo and execute as:

termux-apt-repo [-h] [--use-hard-links] input output [dist] [comp]

positional arguments:
input             folder where .deb files are located
output            folder with repository tree
dist              name of distribution folder. deb files are put into
                  output/dists/distribution/component/binary-$ARCH/
comp              name of component folder. deb files are put into
                  output/dists/distribution/component/binary-$ARCH/

optional arguments:
-h, --help        show this help message and exit
--use-hard-links  use hard links instead of copying deb files. Will not work
                  on an android device

When using outside Termux (the script should work on most Linux distributions), install with pip3 install termux-apt-repo.

All the .deb files in the first directory will be published to a newly created APT repository in the second directory (which will be deleted if it exists, so take caution).

Publishing the generated folder

The published folder can be made available at a publicly accessible $REPO_URL using any method:

  1. By running termux-apt-repository on a web server directly.

  2. Using rsync: rsync --delete -r <apt-repository-directory> your.host:path/to/folder.

  3. Creating a zip or tar file and unpacking it at a web server.

  4. Any other creative way.

It can also be published using e.g. GitHub pages.

Accessing the repository

With the created <apt-repository-directory> available at $REPO_URL, users can access repo by creating a file:

$PREFIX/etc/apt/sources.list.d

containing the single line:

deb [trusted=yes] $REPO_URL $dist $comp

[trusted=yes] is needed if the repo has not been signed with a gpg key. To sign it, edit termux-apt-repo and change if False: to if True: near end of script. The signing key then has to be imported by the user to make apt trust it.

Release files for termux-apt-repo 0.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for termux-apt-repo 0.4
File Size Uploaded
termux-apt-repo-0.4.tar.gz 4.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for termux-apt-repo 0.4
File Interpreter ABI Platform
termux_apt_repo-0.4-py3-none-any.whl Python 3 none any Details

Total release size: 14.3 kB

Release files / termux-apt-repo-0.4.tar.gz

Download URL termux-apt-repo-0.4.tar.gz
Size 4.9 kB
Tags Source
SHA-256 checksum
How to use checksums
14c20d16c53fd673fae450d6d4ed9c0c2a5a654d04baf2a175750bdb8eb48556
BLAKE2b-256 checksum
How to use checksums
6cb801775fe2298aa5609d3adac0e98b8236bb48e4295c697bcd92817c68d783
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.27.0 CPython/3.7.2

Release files / termux_apt_repo-0.4-py3-none-any.whl

Download URL termux_apt_repo-0.4-py3-none-any.whl
Size 9.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
100bca4f9743fa4e020e4e4445902e8b5caac112bed525cc3edb5cdd528479de
BLAKE2b-256 checksum
How to use checksums
7da7cb94ac51c6c6ed0242147b8c12d13aeff3f55677aade19e69cfc203b63b9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.27.0 CPython/3.7.2

Release history Release notifications | RSS feed

0.5

1 release file

This release

0.4 This release

2 release files

0.3

2 release files

0.2

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page