0
0
mirror of https://github.com/termux/termux-packages.git synced 2024-12-04 18:45:52 +00:00
termux-packages/packages/pypy3/pypy3-tkinter.subpackage.sh
Uchiha Kakashi e8b90f4597
pypy{,3}: Bump to 7.3.12 (#17382)
* pypy: bump to 7.3.12

* pypy3: bump to 7.3.12

* @TERMUX_PKG_API_LEVEL@, fix patch filenames

---------

Co-authored-by: Lucy Phipps <landfillbaby69@gmail.com>
2023-07-08 16:43:23 +08:00

24 lines
582 B
Bash

TERMUX_SUBPKG_DESCRIPTION="Tkinter support for PyPy 3"
TERMUX_SUBPKG_DEPENDS="tk"
TERMUX_SUBPKG_INCLUDE="
opt/pypy3/lib/pypy$_MAJOR_VERSION/_tkinter/*
"
termux_step_create_subpkg_debscripts() {
# Pre-rm script to cleanup runtime-generated files.
cat <<- PRERM_EOF > ./prerm
#!$TERMUX_PREFIX/bin/sh
if [ "$TERMUX_PACKAGE_FORMAT" != "pacman" ] && [ "\$1" != "remove" ]; then
exit 0
fi
echo "Deleting *.pyc..."
find $TERMUX_PREFIX/opt/pypy3/lib/pypy$_MAJOR_VERSION/_tkinter/ | grep -E "(__pycache__|\.pyc|\.pyo$)" | xargs rm -rf
exit 0
PRERM_EOF
chmod 0755 prerm
}