-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
/
Copy pathbuild.sh
34 lines (32 loc) · 1.15 KB
/
build.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
TERMUX_PKG_HOMEPAGE=https://github.com/termux/termux-root-packages
TERMUX_PKG_DESCRIPTION="Package repository containing programs for rooted devices"
TERMUX_PKG_LICENSE="Apache-2.0"
TERMUX_PKG_MAINTAINER="Henrik Grimler @Grimler91"
TERMUX_PKG_VERSION=2.4
TERMUX_PKG_REVISION=2
TERMUX_PKG_AUTO_UPDATE=false
TERMUX_PKG_DEPENDS="termux-keyring"
TERMUX_PKG_SKIP_SRC_EXTRACT=true
TERMUX_PKG_PLATFORM_INDEPENDENT=true
termux_step_make_install() {
mkdir -p $TERMUX_PREFIX/etc/apt/sources.list.d
{
echo "# The root termux repository, with cloudflare cache"
echo "deb https://packages-cf.termux.dev/apt/termux-root/ root stable"
echo "# The root termux repository, without cloudflare cache"
echo "# deb https://packages.termux.dev/apt/termux-root/ root stable"
} > $TERMUX_PREFIX/etc/apt/sources.list.d/root.list
}
termux_step_create_debscripts() {
[ "$TERMUX_PACKAGE_FORMAT" = "pacman" ] && return 0
cat <<- EOF > ./postinst
#!$TERMUX_PREFIX/bin/sh
echo "Downloading updated package list ..."
if [ -d "$TERMUX_PREFIX/etc/termux/chosen_mirrors" ] || [ -f "$TERMUX_PREFIX/etc/termux/chosen_mirrors" ]; then
pkg --check-mirror update
else
apt update
fi
exit 0
EOF
}