post_install() {
echo "Installing dependencies through pip..."
pip3 install 'msgpack==1.0.8', packaging
echo "Installing dependencies for borgbackup through pip..."
LD_PRELOAD='' LDFLAGS="-lpython3.13" MATHLIB="m" "/data/data/com.termux/files/usr/bin/pip3" install  'msgpack==1.0.8' packaging borgbackup
if [ -f "/data/data/com.termux/files/usr/bin/py3compile" ]; then
LD_PRELOAD='' "/data/data/com.termux/files/usr/bin/py3compile" -p "borgbackup" "/data/data/com.termux/files/usr/lib/python3.13/"
fi
exit 0
}
post_upgrade() {
post_install
}
pre_remove() {
if [ -f "/data/data/com.termux/files/usr/bin/py3clean" ]; then
LD_PRELOAD='' "/data/data/com.termux/files/usr/bin/py3clean" -p "borgbackup"
fi
exit 0
}
