2022-03-11 17:21:07 +00:00
TERMUX_SUBPKG_INCLUDE = "lib/python*"
TERMUX_SUBPKG_DESCRIPTION = "Python bindings for OpenCV"
2022-12-16 02:27:04 +00:00
TERMUX_SUBPKG_DEPENDS = "python, python-numpy"
2022-03-11 17:21:07 +00:00
termux_step_create_subpkg_debscripts( ) {
2022-10-30 14:09:32 +00:00
_NUMPY_VERSION = $( . $TERMUX_SCRIPTDIR /packages/python-numpy/build.sh; echo $TERMUX_PKG_VERSION )
cat <<- EOF > ./postinst
#!$TERMUX_PREFIX/bin/sh
INSTALLED_NUMPY_VERSION = \$ ( dpkg --list python-numpy | grep python-numpy | awk '{print \$3; exit;}' )
2022-11-09 15:59:31 +00:00
if [ "\${INSTALLED_NUMPY_VERSION%%-*}" != " $_NUMPY_VERSION " ] ; then
echo " WARNING: opencv-python is compiled with numpy $_NUMPY_VERSION , but numpy \${INSTALLED_NUMPY_VERSION%%-*} is installed. Please report it to https://github.com/termux/termux-packages if any bug happens. "
2022-10-30 14:09:32 +00:00
fi
EOF
2022-03-11 17:21:07 +00:00
}