aboutsummaryrefslogtreecommitdiffstats
path: root/packaging/svr4
diff options
context:
space:
mode:
authorJeff Morriss <jeff.morriss@ulticom.com>2008-04-08 22:38:24 +0000
committerJeff Morriss <jeff.morriss@ulticom.com>2008-04-08 22:38:24 +0000
commit73d406c3f6c16c2443d23d6869dc51dcfcd07e3b (patch)
tree5d9c0be3b70d43ff3637fc17ce88e42c5ecc6215 /packaging/svr4
parentc919e4651139de524f73c2f9dfeda19914eb7db1 (diff)
Make the SVR4 package checkinstall script work with only GTK2+.
svn path=/trunk/; revision=24853
Diffstat (limited to 'packaging/svr4')
-rwxr-xr-xpackaging/svr4/checkinstall.in79
1 files changed, 20 insertions, 59 deletions
diff --git a/packaging/svr4/checkinstall.in b/packaging/svr4/checkinstall.in
index 51625c52ac..a915d1336c 100755
--- a/packaging/svr4/checkinstall.in
+++ b/packaging/svr4/checkinstall.in
@@ -5,76 +5,37 @@
# 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_CONFIG=@GTK_CONFIG@
PKG_CONFIG=@PKG_CONFIG@
-platform=`uname -p`
-
+gtk_version_needed="2.0"
expected_platform="@host_cpu@"
-if [ ${platform} != ${expected_platform} ]; then
+platform=`uname -p`
+
+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 [ -n "$GTK_CONFIG" ]
+if [ ! -x "$PKG_CONFIG" ]
then
- # We were build with GTK1
- gtk_major_needed="1"
- gtk_minor_needed="2"
-
- if [ -x "$GTK_CONFIG" ]
- then
- # First try the GTK location that was used to build wireshark. This
- # is probably the safest bet.
- gtk_installed=`$GTK_CONFIG --version`
- gtk_major_installed=`echo $gtk_installed | cut -f1 -d.`
- gtk_minor_installed=`echo $gtk_installed | cut -f2 -d.`
- elif gtk_installed=`gtk-config --version 2>&-`
- then
- # Punt!
- # If gtk-config is in the $PATH then wireshark should install fine.
- # Some modifications to $LD_LIBRARY_PATH (or non Solaris equivalent)
- # may be required by the user. Should there be a warning here?
- 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
-
- # This if statement should be more complicated but this code is only
- # for GTK1 so the major version is guaranteed to be 1.
- if [ "$gtk_major_installed" -lt "$gtk_major_needed" -o \
- "$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 `dirname ${GTK_CONFIG}`."
- echo "\tAborting installation.\n\n\n"
- exit 1
- fi
-else
- # We were built with GTK2
- gtk_version_needed="2.0"
-
- if [ ! -x "$PKG_CONFIG" ]
- then
- # We couldn't find GTK in the location that was used to build
- # Wireshark.
- # Punt!
- # If gtk-config is in the $PATH then wireshark should install fine.
- # Some modifications to $LD_LIBRARY_PATH (or non Solaris equivalent)
- # may be required by the user. Should there be a warning here?
- PKG_CONFIG=pkg-config
- fi
+ # We couldn't find GTK in the location that was used to build
+ # Wireshark.
+ # Punt!
+ # If gtk-config is in the $PATH then wireshark should install fine.
+ # Some modifications to $LD_LIBRARY_PATH (or non Solaris equivalent)
+ # may be required by the user. Should there be a warning here?
+ PKG_CONFIG=pkg-config
+fi
- $PKG_CONFIG gtk+-2.0 --atleast-version=$gtk_version_needed
- if [ $? != 0 ]
- then
- echo "\n\n\n\tThis package requires gtk+-2 version >= $gtk_version_needed installed in `dirname ${PKG_CONFIG}`."
- echo "\tAborting installation.\n\n\n"
- exit 1
- fi
+$PKG_CONFIG gtk+-2.0 --atleast-version=$gtk_version_needed
+if [ $? != 0 ]
+then
+ echo "\n\n\n\tThis package requires gtk+-2 version >= $gtk_version_needed installed in `dirname @PKG_CONFIG@`."
+ echo "\tAborting installation.\n\n\n"
+ exit 1
fi
exit 0