From 501ce516cd65a7f6730a2cbd24ae2c5d54f89821 Mon Sep 17 00:00:00 2001 From: Leonid Pliushch Date: Fri, 30 Oct 2020 22:48:55 +0200 Subject: [PATCH] misc hardcoded home/prefix fixes --- build-package.sh | 2 +- disabled-packages/apt-updated/build.sh | 2 +- disabled-packages/checkinstall/checkinstall.patch | 4 ++-- disabled-packages/checkinstall/checkinstallrc-dist.patch | 4 ++-- disabled-packages/man-db/build.sh | 4 ++-- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/build-package.sh b/build-package.sh index 135d720ab..b80bed093 100755 --- a/build-package.sh +++ b/build-package.sh @@ -252,7 +252,7 @@ _show_usage() { echo " -D Build a disabled package in disabled-packages/." echo " -f Force build even if package has already been built." [ "$TERMUX_ON_DEVICE_BUILD" = "false" ] && echo " -i Download and extract dependencies instead of building them." - echo " -I Download and extract dependencies instead of building them, keep existing /data/data/com.termux files." + echo " -I Download and extract dependencies instead of building them, keep existing $TERMUX_BASE_DIR files." echo " -q Quiet build." echo " -s Skip dependency check." echo " -o Specify deb directory. Default: debs/." diff --git a/disabled-packages/apt-updated/build.sh b/disabled-packages/apt-updated/build.sh index 3251aafb9..d3003bcac 100644 --- a/disabled-packages/apt-updated/build.sh +++ b/disabled-packages/apt-updated/build.sh @@ -35,5 +35,5 @@ lib/libapt-inst.so termux_step_post_make_install() { printf "# The main termux repository:\ndeb [arch=all,${TERMUX_ARCH}] https://termux.net stable main\n" > $TERMUX_PREFIX/etc/apt/sources.list cp $TERMUX_PKG_BUILDER_DIR/trusted.gpg $TERMUX_PREFIX/etc/apt/ - rm /data/data/com.termux/files/usr/include/apt-pkg -r + rm $TERMUX_PREFIX/include/apt-pkg -r } diff --git a/disabled-packages/checkinstall/checkinstall.patch b/disabled-packages/checkinstall/checkinstall.patch index ddb14d462..2a6c70b55 100644 --- a/disabled-packages/checkinstall/checkinstall.patch +++ b/disabled-packages/checkinstall/checkinstall.patch @@ -15,7 +15,7 @@ diff -u -r ../checkinstall-1.6.2/checkinstall ./checkinstall # The place where we will be storing the temp files -! [ "$BASE_TMP_DIR" ] && BASE_TMP_DIR=/var/tmp -+! [ "$BASE_TMP_DIR" ] && BASE_TMP_DIR=/data/data/com.termux/files/usr/tmp ++! [ "$BASE_TMP_DIR" ] && BASE_TMP_DIR=@TERMUX_PREFIX@/tmp # Default RPM FLAGS ! [ "$RPM_FLAGS" ] && RPM_FLAGS=" --force --nodeps --replacepkgs " @@ -42,7 +42,7 @@ diff -u -r ../checkinstall-1.6.2/checkinstall ./checkinstall # to be explicit. # -IEXCLUDE="${DIRECTORIO_FUENTE},/dev,/proc,/tmp,/var/tmp" -+IEXCLUDE="${DIRECTORIO_FUENTE},/dev,/proc,/tmp,/var/tmp,/data/data/com.termux/files/usr/tmp" ++IEXCLUDE="${DIRECTORIO_FUENTE},/dev,/proc,/tmp,/var/tmp,@TERMUX_PREFIX@/tmp" # Run the install command, showing the results interactively if we were asked diff --git a/disabled-packages/checkinstall/checkinstallrc-dist.patch b/disabled-packages/checkinstall/checkinstallrc-dist.patch index f6f0a2fb7..d94cf11ed 100644 --- a/disabled-packages/checkinstall/checkinstallrc-dist.patch +++ b/disabled-packages/checkinstall/checkinstallrc-dist.patch @@ -6,7 +6,7 @@ diff -u -r ../checkinstall-1.6.2/checkinstallrc-dist ./checkinstallrc-dist # Location of the "installwatch" program -INSTALLWATCH_PREFIX="/usr/local" -+INSTALLWATCH_PREFIX="/data/data/com.termux/files/usr" ++INSTALLWATCH_PREFIX="@TERMUX_PREFIX@" INSTALLWATCH=${INSTALLWATCH_PREFIX}/bin/installwatch # Location of the makepkg program. "makepak" is the default, and is @@ -14,7 +14,7 @@ diff -u -r ../checkinstall-1.6.2/checkinstallrc-dist ./checkinstallrc-dist # then set this to "makepkg" -MAKEPKG=/sbin/makepkg -+MAKEPKG=/data/data/com.termux/files/usr/bin/makepkg ++MAKEPKG=@TERMUX_PREFIX@/bin/makepkg # makepkg optional flags. These are recommended if running a newer Slackware # version: "-l y -c n" diff --git a/disabled-packages/man-db/build.sh b/disabled-packages/man-db/build.sh index c882b276a..5aaf39156 100644 --- a/disabled-packages/man-db/build.sh +++ b/disabled-packages/man-db/build.sh @@ -3,7 +3,7 @@ TERMUX_PKG_DESCRIPTION="Utilities for examining on-line help files (manual pages TERMUX_PKG_VERSION=2.7.5 TERMUX_PKG_REVISION=1 TERMUX_PKG_SRCURL=http://mirror.csclub.uwaterloo.ca/nongnu/man-db/man-db-${TERMUX_PKG_VERSION}.tar.xz -TERMUX_PKG_EXTRA_CONFIGURE_ARGS="--with-db=gdbm --with-pager=less --with-config-file=/data/data/com.termux/files/usr/etc/man_db.conf --disable-setuid --with-browser=lynx --with-gzip=gzip --with-systemdtmpfilesdir=/data/data/com.termux/files/usr/lib/tmpfiles.d" +TERMUX_PKG_EXTRA_CONFIGURE_ARGS="--with-db=gdbm --with-pager=less --with-config-file=${TERMUX_PREFIX}/etc/man_db.conf --disable-setuid --with-browser=lynx --with-gzip=gzip --with-systemdtmpfilesdir=${TERMUX_PREFIX}/lib/tmpfiles.d" TERMUX_PKG_DEPENDS="flex, gdbm, groff, less, libandroid-support, libpipeline, lynx" -export GROFF_TMAC_PATH="/data/data/com.termux/files/usr/lib/groff/site-tmac:/data/data/com.termux/files/usr/share/groff/site-tmac:/data/data/com.termux/files/usr/share/groff/current/tmac" +export GROFF_TMAC_PATH="${TERMUX_PREFIX}/lib/groff/site-tmac:${TERMUX_PREFIX}/share/groff/site-tmac:${TERMUX_PREFIX}/share/groff/current/tmac"