2020-11-18 19:44:49 +01:00
|
|
|
TERMUX_PKG_HOMEPAGE=https://github.com/termux/whatprovides
|
2020-11-20 01:52:00 +01:00
|
|
|
TERMUX_PKG_DESCRIPTION="Find out packages using specific files"
|
2020-11-18 19:44:49 +01:00
|
|
|
TERMUX_PKG_LICENSE="Apache-2.0"
|
|
|
|
TERMUX_PKG_MAINTAINER="Krishna kanhaiya @kcubeterm"
|
2021-06-26 17:38:44 +02:00
|
|
|
TERMUX_PKG_VERSION=2.2.2
|
2020-11-18 19:44:49 +01:00
|
|
|
TERMUX_PKG_SRCURL=https://github.com/termux/whatprovides/archive/${TERMUX_PKG_VERSION}.tar.gz
|
2021-06-26 17:38:44 +02:00
|
|
|
TERMUX_PKG_SHA256=bbe2e2bca5a1d43f09404378d9e9194cb18ebce8f68051090f21230c4f021862
|
2020-11-20 01:35:22 +01:00
|
|
|
TERMUX_PKG_DEPENDS="bash, coreutils, curl, gawk, gzip, sqlite"
|
2020-11-18 19:44:49 +01:00
|
|
|
TERMUX_PKG_BUILD_IN_SRC=true
|
2020-11-20 01:35:22 +01:00
|
|
|
TERMUX_PKG_PLATFORM_INDEPENDENT=true
|
|
|
|
|
|
|
|
termux_step_create_debscripts() {
|
|
|
|
cat <<- EOF > ./postinst
|
|
|
|
#!${TERMUX_PREFIX}/bin/sh
|
|
|
|
mkdir -p "${TERMUX_PREFIX}/var/lib/whatprovides"
|
|
|
|
if [ ! -e "${TERMUX_PREFIX}/var/lib/whatprovides/whatprovides.db" ]; then
|
|
|
|
whatprovides -u || {
|
|
|
|
echo
|
|
|
|
echo "Failed to download database."
|
|
|
|
echo "Please run 'whatprovides -u' manually."
|
|
|
|
echo
|
|
|
|
}
|
|
|
|
fi
|
|
|
|
EOF
|
|
|
|
|
|
|
|
cat <<- EOF > ./prerm
|
|
|
|
#!${TERMUX_PREFIX}/bin/sh
|
|
|
|
if [ "\$1" != "remove" ]; then
|
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
rm -rf "${TERMUX_PREFIX}/var/lib/whatprovides"
|
|
|
|
EOF
|
|
|
|
}
|