aboutsummaryrefslogtreecommitdiffstats
path: root/packaging/svr4/checkinstall.in
diff options
context:
space:
mode:
Diffstat (limited to 'packaging/svr4/checkinstall.in')
-rwxr-xr-xpackaging/svr4/checkinstall.in53
1 files changed, 53 insertions, 0 deletions
diff --git a/packaging/svr4/checkinstall.in b/packaging/svr4/checkinstall.in
new file mode 100755
index 0000000000..0aafb6fbb1
--- /dev/null
+++ b/packaging/svr4/checkinstall.in
@@ -0,0 +1,53 @@
+#!/bin/sh
+#
+# Checkinstall - perform preinstallation install checks.
+#
+# This is a modified version of a script written by mark@metalab.unc.edu .
+# The original is at http://metalab.unc.edu/pub/packages/solaris/sparc/html/creating.solaris.packages.html .
+
+gtk_major_needed="1"
+gtk_minor_needed="2"
+
+host_cpu="@host_cpu@"
+host_os="@host_os@"
+
+release=`uname -r`
+platform=`uname -p`
+
+# GNU autoconf translates "i86pc" to "i386".
+if [ "$host_cpu" = "i386" ] ; then
+ expected_platform="i86pc"
+else
+ expected_platform="@host_cpu@"
+fi
+#
+
+if [ -x /usr/local/bin/gtk-config ] ; then
+ gtk_installed=`/usr/local/bin/gtk-config --version`
+ gtk_major_installed=`echo $gtk_installed | cut -f1 -d.`
+ gtk_minor_installed=`echo $gtk_installed | cut -f2 -d.`
+else
+ gtk_major_installed="0"
+ gtk_minor_installed="0"
+fi
+
+#
+if [ ${platform} != ${expected_platform} ]; then
+ echo "\n\n\n\tThis package must be installed on a ${expected_platform} architecture\n"
+ echo "\tAborting installation.\n\n\n"
+ exit 1
+fi
+# if [ ${release} != ${expected_release} ]; then
+# echo "\n\n\n\tThis package must be installed on a ${expected_release} machine\n"
+# echo "\tAborting installation.\n\n\n"
+# exit 1
+# fi
+
+if [ "$gtk_major_installed" -lt "$gtk_major_needed" -a \
+ "$gtk_minor_installed" -lt "$gtk_minor_needed" ] ; then
+ echo "\n\n\n\tThis package requires gtk+ version >= $gtk_major_needed.$gtk_minor_needed installed in /usr/local."
+ echo "\tAborting installation.\n\n\n"
+ exit 1
+fi
+
+exit 0