2015-06-13 01:03:31 +02:00
|
|
|
TERMUX_PKG_HOMEPAGE=https://packages.debian.org/apt
|
|
|
|
TERMUX_PKG_DESCRIPTION="Front-end for the dpkg package manager"
|
2019-01-20 22:39:59 +01:00
|
|
|
TERMUX_PKG_LICENSE="GPL-2.0"
|
2020-12-20 14:16:34 +01:00
|
|
|
TERMUX_PKG_MAINTAINER="@termux"
|
2022-03-10 16:10:21 +01:00
|
|
|
TERMUX_PKG_VERSION=2.4.1
|
2022-03-23 00:08:46 +01:00
|
|
|
TERMUX_PKG_REVISION=2
|
2021-08-15 15:36:56 +02:00
|
|
|
TERMUX_PKG_SRCURL=https://deb.debian.org/debian/pool/main/a/apt/apt_${TERMUX_PKG_VERSION}.tar.xz
|
2022-03-10 16:10:21 +01:00
|
|
|
TERMUX_PKG_SHA256=4a2bb326b6ab5ca35a7a6e7bee5fe3f41d32fe98e464b4ba32f93d3835aac7e7
|
2019-07-22 00:51:28 +02:00
|
|
|
# apt-key requires utilities from coreutils, findutils, gpgv, grep, sed.
|
2022-01-07 20:03:58 +01:00
|
|
|
TERMUX_PKG_DEPENDS="coreutils, dpkg, findutils, gpgv, grep, libandroid-glob, libbz2, libc++, libcurl, libgnutls, liblz4, liblzma, sed, termux-keyring, termux-licenses, xxhash, zlib"
|
2021-08-08 17:10:49 +02:00
|
|
|
TERMUX_PKG_BUILD_DEPENDS="docbook-xsl"
|
2022-03-13 10:37:24 +01:00
|
|
|
TERMUX_PKG_CONFLICTS="apt-transport-https, libapt-pkg, unstable-repo, game-repo, science-repo"
|
2021-12-04 14:58:39 +01:00
|
|
|
TERMUX_PKG_REPLACES="apt-transport-https, libapt-pkg, unstable-repo, game-repo, science-repo"
|
|
|
|
TERMUX_PKG_PROVIDES="unstable-repo, game-repo, science-repo"
|
2021-10-25 19:11:28 +02:00
|
|
|
TERMUX_PKG_SUGGESTS="gnupg, x11-repo"
|
2019-08-12 17:28:41 +02:00
|
|
|
TERMUX_PKG_ESSENTIAL=true
|
2019-07-22 00:51:28 +02:00
|
|
|
|
|
|
|
TERMUX_PKG_CONFFILES="
|
|
|
|
etc/apt/sources.list
|
|
|
|
etc/apt/trusted.gpg
|
|
|
|
"
|
|
|
|
|
2017-09-17 20:51:20 +02:00
|
|
|
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
|
2020-07-31 17:42:03 +02:00
|
|
|
-DPERL_EXECUTABLE=$(command -v perl)
|
2017-09-17 20:51:20 +02:00
|
|
|
-DCMAKE_INSTALL_FULL_LOCALSTATEDIR=$TERMUX_PREFIX
|
2020-10-30 21:32:52 +01:00
|
|
|
-DCACHE_DIR=${TERMUX_CACHE_DIR}/apt
|
2017-09-17 20:51:20 +02:00
|
|
|
-DCOMMON_ARCH=$TERMUX_ARCH
|
|
|
|
-DDPKG_DATADIR=$TERMUX_PREFIX/share/dpkg
|
|
|
|
-DUSE_NLS=OFF
|
|
|
|
-DWITH_DOC=OFF
|
|
|
|
"
|
2019-07-22 00:51:28 +02:00
|
|
|
|
2018-12-17 08:21:40 +01:00
|
|
|
# ubuntu uses instead $PREFIX/lib instead of $PREFIX/libexec to
|
|
|
|
# "Work around bug in GNUInstallDirs" (from apt 1.4.8 CMakeLists.txt).
|
|
|
|
# Archlinux uses $PREFIX/libexec though, so let's force libexec->lib to
|
|
|
|
# get same build result on ubuntu and archlinux.
|
|
|
|
TERMUX_PKG_EXTRA_CONFIGURE_ARGS+="-DCMAKE_INSTALL_LIBEXECDIR=lib"
|
|
|
|
|
2017-09-17 20:51:20 +02:00
|
|
|
TERMUX_PKG_RM_AFTER_INSTALL="
|
|
|
|
bin/apt-cdrom
|
|
|
|
bin/apt-extracttemplates
|
|
|
|
bin/apt-sortpkgs
|
|
|
|
etc/apt/apt.conf.d
|
|
|
|
lib/apt/methods/cdrom
|
2021-07-09 23:35:39 +02:00
|
|
|
lib/apt/methods/mirror*
|
2017-09-17 20:51:20 +02:00
|
|
|
lib/apt/methods/rred
|
|
|
|
lib/apt/planners/
|
|
|
|
lib/apt/solvers/
|
|
|
|
lib/dpkg/
|
2021-08-07 20:15:42 +02:00
|
|
|
share/man/man1/apt-extracttemplates.1
|
|
|
|
share/man/man1/apt-sortpkgs.1
|
|
|
|
share/man/man1/apt-transport-mirror.1
|
|
|
|
share/man/man8/apt-cdrom.8
|
2017-09-17 20:51:20 +02:00
|
|
|
"
|
|
|
|
|
2019-08-08 14:25:54 +02:00
|
|
|
termux_step_pre_configure() {
|
|
|
|
# Certain packages are not safe to build on device because their
|
|
|
|
# build.sh script deletes specific files in $TERMUX_PREFIX.
|
2019-08-12 17:28:41 +02:00
|
|
|
if $TERMUX_ON_DEVICE_BUILD; then
|
2019-08-08 14:25:54 +02:00
|
|
|
termux_error_exit "Package '$TERMUX_PKG_NAME' is not safe for on-device builds."
|
|
|
|
fi
|
2020-09-28 01:33:44 +02:00
|
|
|
|
2020-11-05 17:11:03 +01:00
|
|
|
# Fix i686 builds.
|
|
|
|
CXXFLAGS+=" -Wno-c++11-narrowing"
|
2020-11-05 18:16:52 +01:00
|
|
|
# Fix glob() on Android 7.
|
|
|
|
LDFLAGS+=" -Wl,--no-as-needed -landroid-glob"
|
2021-08-08 17:10:49 +02:00
|
|
|
|
|
|
|
# for manpage build
|
|
|
|
local docbook_xsl_version=$(. $TERMUX_SCRIPTDIR/packages/docbook-xsl/build.sh; echo $TERMUX_PKG_VERSION)
|
|
|
|
TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" -DDOCBOOK_XSL=$TERMUX_PREFIX/share/xml/docbook/xsl-stylesheets-$docbook_xsl_version-nons"
|
2019-08-08 14:25:54 +02:00
|
|
|
}
|
|
|
|
|
2017-09-17 20:51:20 +02:00
|
|
|
termux_step_post_make_install() {
|
2022-02-28 22:28:23 +01:00
|
|
|
{
|
|
|
|
echo "# The main termux repository, behind cloudflare cache:"
|
|
|
|
echo "deb https://packages-cf.termux.org/apt/termux-main/ stable main"
|
|
|
|
echo "# The main termux repository:"
|
|
|
|
echo "# deb https://packages.termux.org/apt/termux-main/ stable main"
|
|
|
|
} > $TERMUX_PREFIX/etc/apt/sources.list
|
2017-11-16 23:37:17 +01:00
|
|
|
cp $TERMUX_PKG_BUILDER_DIR/trusted.gpg $TERMUX_PREFIX/etc/apt/
|
2018-08-03 12:42:07 +02:00
|
|
|
|
|
|
|
# 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
|
2015-06-13 01:03:31 +02:00
|
|
|
}
|