summaryrefslogtreecommitdiffstats
path: root/gtk-vnc
diff options
context:
space:
mode:
author Eric Hameleers <alien@slackware.com>2008-09-26 11:40:21 +0000
committer Eric Hameleers <alien@slackware.com>2008-09-26 11:40:21 +0000
commitc0cfbea9250445eeb90643cb1a46be48165df473 (patch)
tree582048e60ba44bd4c8348cc72457dea3ced612f6 /gtk-vnc
parente2cb1c0e57f60fecbca1fc5d39aa6cbbb476435b (diff)
downloadasb-c0cfbea9250445eeb90643cb1a46be48165df473.tar.gz
asb-c0cfbea9250445eeb90643cb1a46be48165df473.tar.xz
Add check for python version
Diffstat (limited to 'gtk-vnc')
-rwxr-xr-xgtk-vnc/build/gtk-vnc.SlackBuild17
1 files changed, 17 insertions, 0 deletions
diff --git a/gtk-vnc/build/gtk-vnc.SlackBuild b/gtk-vnc/build/gtk-vnc.SlackBuild
index 86bab006..17a67dd8 100755
--- a/gtk-vnc/build/gtk-vnc.SlackBuild
+++ b/gtk-vnc/build/gtk-vnc.SlackBuild
@@ -49,6 +49,9 @@ TAG=${TAG:-alien}
DOCS="AUTHORS COPYING.LIB ChangeLog INSTALL NEWS README"
+# The version of python that the package has module for:
+PYTHONREQ=$(python -V 2>&1 | cut -f 2 -d' ' | cut -f 1-2 -d.)
+
# Where do we look for sources?
SRCDIR=$(cd $(dirname $0); pwd)
@@ -170,6 +173,20 @@ else
make DESTDIR=$PKG install 2>&1 |tee $OUTPUT/install-${PRGNAM}.log
fi
+# Add this to the doinst.sh:
+! [ -d $PKG/install ] && mkdir -p $PKG/install
+cat <<EOINS >> $PKG/install/doinst.sh
+PYTHON=\$(python -V 2>&1 | cut -f 2 -d' ' | cut -f 1-2 -d.)
+# Warn about possible mismatch in python versions:
+if [ "\$PYTHON" != "$PYTHONREQ" ]; then
+ echo ""
+ echo "Your Python is version \$PYTHON but this package contains modules"
+ echo "for python '$PYTHONREQ'. You are warned..."
+ echo ""
+fi
+
+EOINS
+
# Add documentation:
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a $DOCS $PKG/usr/doc/$PRGNAM-$VERSION || true