diff options
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 |
commit | c0cfbea9250445eeb90643cb1a46be48165df473 (patch) | |
tree | 582048e60ba44bd4c8348cc72457dea3ced612f6 /gtk-vnc | |
parent | e2cb1c0e57f60fecbca1fc5d39aa6cbbb476435b (diff) | |
download | asb-c0cfbea9250445eeb90643cb1a46be48165df473.tar.gz asb-c0cfbea9250445eeb90643cb1a46be48165df473.tar.xz |
Add check for python version
Diffstat (limited to 'gtk-vnc')
-rwxr-xr-x | gtk-vnc/build/gtk-vnc.SlackBuild | 17 |
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 |