2020-07-20 22:51:31 +02:00
|
|
|
TERMUX_PKG_HOMEPAGE=https://github.com/termux/proot-distro
|
|
|
|
TERMUX_PKG_DESCRIPTION="Termux official utility for managing proot'ed Linux distributions"
|
|
|
|
TERMUX_PKG_LICENSE="GPL-3.0"
|
2020-07-25 19:16:34 +02:00
|
|
|
TERMUX_PKG_MAINTAINER="Leonid Pliushch <leonid.pliushch@gmail.com>"
|
2020-10-09 22:47:51 +02:00
|
|
|
TERMUX_PKG_VERSION=0.10
|
2020-07-21 03:28:17 +02:00
|
|
|
TERMUX_PKG_SRCURL=https://github.com/termux/proot-distro/archive/v${TERMUX_PKG_VERSION}.tar.gz
|
2020-10-09 22:47:51 +02:00
|
|
|
TERMUX_PKG_SHA256=305b106b2a580c08e3cf8ef6f4196071933f9d20d299944330f17c9bd84a0ab9
|
2020-07-22 01:40:55 +02:00
|
|
|
TERMUX_PKG_DEPENDS="bash, bzip2, coreutils, curl, findutils, gzip, ncurses-utils, proot, tar, xz-utils"
|
2020-07-20 22:51:31 +02:00
|
|
|
TERMUX_PKG_BUILD_IN_SRC=true
|
|
|
|
TERMUX_PKG_PLATFORM_INDEPENDENT=true
|
|
|
|
|
2020-07-21 03:28:17 +02:00
|
|
|
# Allow to edit distribution plug-ins.
|
|
|
|
TERMUX_PKG_CONFFILES="
|
|
|
|
etc/proot-distro/alpine.sh
|
|
|
|
etc/proot-distro/archlinux.sh
|
2020-07-22 01:40:55 +02:00
|
|
|
etc/proot-distro/nethunter.sh
|
2020-09-03 14:39:56 +02:00
|
|
|
etc/proot-distro/ubuntu-18.04.sh
|
|
|
|
etc/proot-distro/ubuntu-20.04.sh
|
2020-07-21 03:28:17 +02:00
|
|
|
"
|
|
|
|
|
2020-07-20 22:51:31 +02:00
|
|
|
termux_step_make_install() {
|
|
|
|
./install.sh
|
|
|
|
}
|
2020-09-03 14:39:56 +02:00
|
|
|
|
|
|
|
termux_step_create_debscripts() {
|
2020-09-03 14:57:32 +02:00
|
|
|
# Don't break older installations.
|
2020-09-03 14:39:56 +02:00
|
|
|
cat <<- POSTINST_EOF > ./postinst
|
|
|
|
#!$TERMUX_PREFIX/bin/sh
|
2020-09-03 14:51:50 +02:00
|
|
|
if [ -f "$TERMUX_PREFIX/etc/proot-distro/ubuntu.sh" ]; then
|
2020-09-03 14:57:32 +02:00
|
|
|
cp -f "$TERMUX_PREFIX/etc/proot-distro/ubuntu.sh" "$TERMUX_PREFIX/etc/proot-distro/ubuntu-20.04.sh"
|
|
|
|
else
|
|
|
|
cp -f "$TERMUX_PREFIX/etc/proot-distro/ubuntu-20.04.sh" "$TERMUX_PREFIX/etc/proot-distro/ubuntu.sh"
|
2020-09-03 14:39:56 +02:00
|
|
|
fi
|
|
|
|
exit 0
|
|
|
|
POSTINST_EOF
|
|
|
|
|
|
|
|
cat <<- PRERM_EOF > ./prerm
|
|
|
|
#!$TERMUX_PREFIX/bin/sh
|
|
|
|
if [ "\$1" != "remove" ]; then
|
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
rm -f $TERMUX_PREFIX/etc/proot-distro/ubuntu.sh
|
|
|
|
exit 0
|
|
|
|
PRERM_EOF
|
2020-09-03 14:47:26 +02:00
|
|
|
|
|
|
|
chmod 0755 postinst prerm
|
2020-09-03 14:39:56 +02:00
|
|
|
}
|