跳转到主要内容

创建Termux apt仓库的脚本

项目描述

termux-apt-repo

创建Termux软件包仓库的脚本。

它可以用来发布使用Termux构建设置或使用termux-create-package创建的跨编译软件包。

使用说明

在Termux中,使用pkg install termux-apt-repo安装并执行

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
-s --sign         sign repo with GPG key

在Termux外部使用(脚本应在大多数Linux发行版上工作),使用pip3 install termux-apt-repo安装。

第一个目录中的所有.deb文件都将发布到第二个目录(如果已存在,则将其删除,请小心处理)中创建的新APT仓库。

发布生成的文件夹

可以通过任何方法将发布文件夹提供在公开可访问的$REPO_URL

  1. 通过在直接运行的Web服务器上运行termux-apt-repository。

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

  3. 在Web服务器上创建zip或tar文件并解压。

  4. 任何其他创造性的方法。

也可以使用例如 GitHub pages 进行发布。

访问仓库

创建的 <apt-repository-directory> 可在 $REPO_URL 处访问,用户可以通过创建一个包含以下单行的文件来访问repo:

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

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

[trusted=yes] 如果仓库未使用gpg密钥签名。要签名它,传递 --sign 参数。然后用户需要导入签名密钥以使apt信任它。

项目详情


下载文件

下载您平台上的文件。如果您不确定选择哪个,请了解有关 安装包 的更多信息。

源分发

termux-apt-repo-0.5.tar.gz (8.9 kB 查看哈希值)

上传时间

由以下机构支持