mirror of
https://github.com/termux/termux-packages.git
synced 2025-01-31 21:22:27 +00:00
0fba803b10
This commit has been automatically submitted by Github Actions.
35 lines
1.4 KiB
Bash
35 lines
1.4 KiB
Bash
TERMUX_PKG_HOMEPAGE=https://apt-team.pages.debian.net/python-apt/
|
|
TERMUX_PKG_DESCRIPTION="Python bindings for APT"
|
|
TERMUX_PKG_LICENSE="GPL-2.0"
|
|
TERMUX_PKG_MAINTAINER="@termux"
|
|
TERMUX_PKG_VERSION="2.9.6"
|
|
TERMUX_PKG_SRCURL=https://ftp.debian.org/debian/pool/main/p/python-apt/python-apt_${TERMUX_PKG_VERSION}.tar.xz
|
|
TERMUX_PKG_SHA256=d7189e884b07967a9c48015970f4184d8a7d41e35cad8765f5e0cfc7bbae6ded
|
|
TERMUX_PKG_DEPENDS="apt, libandroid-support, libc++, python"
|
|
TERMUX_PKG_BUILD_IN_SRC=true
|
|
TERMUX_PKG_AUTO_UPDATE=true
|
|
TERMUX_PKG_PYTHON_COMMON_DEPS="wheel"
|
|
|
|
termux_pkg_auto_update() {
|
|
# based on scripts/updates/api/termux_repology_api_get_latest_version.sh
|
|
local TERMUX_REPOLOGY_DATA_FILE=$(mktemp)
|
|
python3 "${TERMUX_SCRIPTDIR}"/scripts/updates/api/dump-repology-data \
|
|
"${TERMUX_REPOLOGY_DATA_FILE}" "${TERMUX_PKG_NAME}" >/dev/null || \
|
|
echo "{}" > "${TERMUX_REPOLOGY_DATA_FILE}"
|
|
local latest_version=$(jq -r --arg packageName "${TERMUX_PKG_NAME}" '.[$packageName]' < "${TERMUX_REPOLOGY_DATA_FILE}")
|
|
if [[ "${latest_version}" == "null" ]]; then
|
|
latest_version="${TERMUX_PKG_VERSION}"
|
|
fi
|
|
if [[ "${latest_version}" == "${TERMUX_PKG_VERSION}" ]]; then
|
|
echo "INFO: No update needed. Already at version '${TERMUX_PKG_VERSION}'."
|
|
rm -f "${TERMUX_REPOLOGY_DATA_FILE}"
|
|
return
|
|
fi
|
|
rm -f "${TERMUX_REPOLOGY_DATA_FILE}"
|
|
termux_pkg_upgrade_version "${latest_version}"
|
|
}
|
|
|
|
termux_step_pre_configure() {
|
|
export DEBVER="${TERMUX_PKG_VERSION#*:}"
|
|
}
|