Add basic checks to libmali-sunxi package

This commit is contained in:
zador-blood-stained 2016-08-10 19:53:57 +03:00
parent 06dc09291b
commit 5bbbecd5e9
2 changed files with 24 additions and 0 deletions

View File

@ -10,6 +10,7 @@ Homepage: https://github.com/linux-sunxi/sunxi-mali/
Package: libmali-sunxi-r3p0
Architecture: any
Pre-Depends: armbian-bsp
Depends: ${shlibs:Depends}, ${misc:Depends}
Replaces: libegl1-mesa, libgles1-mesa, libgles2-mesa
Provides: sunxi-mali

View File

@ -0,0 +1,23 @@
#!/bin/sh
BRANCH=""
LINUXFAMILY=""
[ -f "/etc/armbian-release" ] && . /etc/armbian-release
case "$1" in
install)
if [ -z "$BRANCH" ] || [ "$BRANCH" != "default" ]; then
echo "Mali binary driver can be used only with legacy kernel" 1>&2
exit 1
fi
if [ -z "$LINUXFAMILY" ] || ! ( [ "$LINUXFAMILY" = "sun4i" ] || [ "$LINUXFAMILY" = "sun7i" ] || [ "$LINUXFAMILY" = "sun8i" ] ); then
echo "Mali binary driver can be used only on sunxi hardware" 1>&2
exit 1
fi
;;
esac
#DEBHELPER#
exit 0