Ethereal-dev: [Ethereal-dev] patches for make targets solaris-package and svr4-package

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: aferen@xxxxxxxxxxxx (Andrew C. Feren)
Date: 18 Jan 2002 17:20:08 -0500
In addition to the attached patches I think the directory
packaging/svr4/nsis can be deleted?  At least I cann't see why it is
needed under svr4.

-Andrew

Index: Makefile.am
===================================================================
RCS file: /cvsroot/ethereal/Makefile.am,v
retrieving revision 1.404
diff -u -r1.404 Makefile.am
--- Makefile.am	2002/01/10 01:28:43	1.404
+++ Makefile.am	2002/01/18 21:49:31
@@ -954,18 +954,22 @@
 host_os=@host_os@
 
 svr4-package: $(bin_SCRIPTS) $(lib_LTLIBRARIES)
-	if test x$(HAVE_SVR4_PACKAGING) = xyes ; then \
-		rm -rf $(stagedir) ; \
-		$(MAKE) DESTDIR=$(stagedir) install-strip; \
-		$(srcdir)/packaging/svr4/mkpkg \
-			$(PACKAGE) \
-			$(PACKAGE)-$(VERSION)-$(host_os)-$(host_cpu)-local \
-			$(prefix) \
-			$(top_stagedir) ; \
+	@if test x$(HAVE_SVR4_PACKAGING) = xyes ; then \
+		$(MAKE) do-svr4-package ; \
 	else \
 		echo "Error: SVR4 packaging tools not found." ; \
 		echo "Package build abandoned." ; \
 	fi
+
+do-svr4-package:
+	rm -rf $(stagedir)
+	$(MAKE) DESTDIR=$(stagedir) install
+	-find test-exec -type f -exec test -x {} \; -exec strip \;
+	$(srcdir)/packaging/svr4/mkpkg \
+		$(PACKAGE) \
+		$(PACKAGE)-$(VERSION)-$(host_os)-$(host_cpu)-local \
+		$(prefix) \
+		$(top_stagedir)
 
 solaris-package: svr4-package
 
Index: mkpkg
===================================================================
RCS file: /cvsroot/ethereal/packaging/svr4/mkpkg,v
retrieving revision 1.1
diff -u -r1.1 mkpkg
--- mkpkg	2000/07/26 03:38:51	1.1
+++ mkpkg	2002/01/18 21:47:04
@@ -46,7 +46,7 @@
   exit 1
 fi
 
-find $stagedir/$prefix -mindepth 1 -print | \
+find $stagedir/$prefix/* -print | \
   pkgproto $stagedir/$prefix=$prefix >> $prototype
 
 # Make the package installation directory
Index: checkinstall.in
===================================================================
RCS file: /cvsroot/ethereal/packaging/svr4/checkinstall.in,v
retrieving revision 1.2
diff -u -r1.2 checkinstall.in
--- checkinstall.in	2000/11/08 03:54:12	1.2
+++ checkinstall.in	2002/01/18 21:50:55
@@ -5,6 +5,8 @@
 # This is a modified version of a script written by mark@xxxxxxxxxxxxxxx .
 # The original is at http://metalab.unc.edu/pub/packages/solaris/sparc/html/creating.solaris.packages.html .
 
+GTK_CONFIG=@GTK_CONFIG@
+
 gtk_major_needed="1"
 gtk_minor_needed="2"
 
@@ -16,8 +18,17 @@
 
 expected_platform="@host_cpu@"
 
-if [ -x /usr/local/bin/gtk-config ] ; then
-  gtk_installed=`/usr/local/bin/gtk-config --version`
+if [ -x $GTK_CONFIG ] ; then
+  # First try the GTK location that was used to build ethereal.  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 ethereal 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
@@ -39,7 +50,7 @@
 
 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 "\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

-- 
-Andrew Feren
 Cetacean Networks, Inc.
 Portsmouth, NH