Script to create Termux apt repositories
Script to create Termux package repos.
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:
- By running termux-apt-repository on a web server directly.
- Using rsync: rsync --delete -r <apt-repository-directory> your.host:path/to/folder.
- Creating a zip or tar file and unpacking it at a web server.
- 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:
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.
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size||File type||Python version||Upload date||Hashes|
|Filename, size termux_apt_repo-0.4-py3-none-any.whl (9.4 kB)||File type Wheel||Python version py3||Upload date||Hashes View|
|Filename, size termux-apt-repo-0.4.tar.gz (4.9 kB)||File type Source||Python version None||Upload date||Hashes View|
Hashes for termux_apt_repo-0.4-py3-none-any.whl