aboutsummaryrefslogtreecommitdiffstats
path: root/packaging/svr4/checkinstall.in
blob: e8afe11fb9020e4bba6a6c726523a42f192e632b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#!/bin/sh
# @configure_input@
#
# 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 .
#
# $Id$
#

PKG_CONFIG=@PKG_CONFIG@

gtk_version_needed="2.0"
expected_platform="@host_cpu@"

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 [ ! -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

$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