Browse Source

apt-transport-tor: use APT's built-in methods to access Tor

Replace old package 'apt-transport-tor'.
android-5
Leonid Plyushch 6 years ago
committed by Fredrik Fornwall
parent
commit
e56b286617
  1. 27
      packages/apt-transport-tor/build.sh
  2. 8
      packages/apt/apt-transport-tor.subpackage.sh
  3. 5
      packages/apt/build.sh

27
packages/apt-transport-tor/build.sh

@ -1,27 +0,0 @@
TERMUX_PKG_HOMEPAGE=https://github.com/diocles/apt-transport-tor
TERMUX_PKG_DESCRIPTION="Easily install *.deb packages via Tor"
TERMUX_PKG_MAINTAINER="Leonid Plyushch <leonid.plyushch@gmail.com> @xeffyr"
TERMUX_PKG_VERSION=0.1.1
TERMUX_PKG_SRCURL=https://github.com/diocles/apt-transport-tor/archive/v${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=04fb5467d3335bbb84747b568337ee06e45cb50e5a5058fec3ee4e7d8f9bea37
TERMUX_PKG_DEPENDS="apt, tor"
TERMUX_PKG_BUILD_IN_SRC=true
termux_step_pre_configure() {
## we need apt-pkg headers
if [ -d "${TERMUX_TOPDIR}/apt/build" ]; then
export CPPFLAGS="${CPPFLAGS} -I${TERMUX_TOPDIR}/apt/build/include"
else
echo
echo "Can't access build directory of APT."
echo
exit 1
fi
autoreconf -i
}
termux_step_post_make_install() {
ln -sfr "${TERMUX_PREFIX}/lib/apt/methods/tor" "${TERMUX_PREFIX}/lib/apt/methods/tor+http"
ln -sfr "${TERMUX_PREFIX}/lib/apt/methods/tor" "${TERMUX_PREFIX}/lib/apt/methods/tor+https"
}

8
packages/apt/apt-transport-tor.subpackage.sh

@ -0,0 +1,8 @@
TERMUX_SUBPKG_INCLUDE="
lib/apt/methods/tor
lib/apt/methods/tor+http
lib/apt/methods/tor+https
"
TERMUX_SUBPKG_DESCRIPTION="APT transport for anonymous package downloads via Tor"
TERMUX_SUBPKG_DEPENDS="apt, tor"

5
packages/apt/build.sh

@ -37,4 +37,9 @@ termux_step_post_make_install() {
printf "# The main termux repository:\ndeb https://termux.net stable main\n" > $TERMUX_PREFIX/etc/apt/sources.list
cp $TERMUX_PKG_BUILDER_DIR/trusted.gpg $TERMUX_PREFIX/etc/apt/
rm $TERMUX_PREFIX/include/apt-pkg -r
# apt-transport-tor
ln -sfr $TERMUX_PREFIX/lib/apt/methods/http $TERMUX_PREFIX/lib/apt/methods/tor
ln -sfr $TERMUX_PREFIX/lib/apt/methods/http $TERMUX_PREFIX/lib/apt/methods/tor+http
ln -sfr $TERMUX_PREFIX/lib/apt/methods/https $TERMUX_PREFIX/lib/apt/methods/tor+https
}

Loading…
Cancel
Save