From cda207b98464e9035742dd7b55cad688d35959bd Mon Sep 17 00:00:00 2001
From: PeiYong Zhang <peiyongz@apache.org>
Date: Wed, 10 Apr 2002 21:05:21 +0000
Subject: [PATCH] Bug#6095: build versioned shared library

git-svn-id: https://svn.apache.org/repos/asf/xerces/c/trunk@173624 13f79535-47bb-0310-9956-ffa450edef68
---
 scripts/packageBinaries.pl | 24 +++++++++++++++++++++++-
 1 file changed, 23 insertions(+), 1 deletion(-)

diff --git a/scripts/packageBinaries.pl b/scripts/packageBinaries.pl
index 702f147b9..db464b328 100644
--- a/scripts/packageBinaries.pl
+++ b/scripts/packageBinaries.pl
@@ -712,7 +712,29 @@ if ( ($platform =~ m/AIX/i)    || ($platform =~ m/HP-UX/i) ||
 
     # Populate the library output directory
     print ("\n\nCopying library outputs ...\n");
-    psystem("cp -f $XERCESCROOT/lib/* $targetdir/lib");
+    pchdir ("$targetdir/lib");
+
+    # for Solaris & Linux
+    psystem("cp -f $XERCESCROOT/lib/libxerces-c.so.17.0 .");
+    psystem("rm -f libxerces-c.so.17");
+    psystem("rm -f libxerces-c.so");       
+    psystem("find . -name 'libxerces-c.so.17.0' -exec ln -s {} libxerces-c.so.17 \\;");
+    psystem("find . -name 'libxerces-c.so.17'   -exec ln -s {} libxerces-c.so \\;");
+
+    # for HP-UX        
+    psystem("cp -f $XERCESCROOT/lib/libxerces-c.sl.17.0 .");
+    psystem("rm -f libxerces-c.sl.17");
+    psystem("rm -f libxerces-c.sl");       
+    psystem("find . -name 'libxerces-c.sl.17.0' -exec ln -s {} libxerces-c.sl.17 \\;");
+    psystem("find . -name 'libxerces-c.sl.17'   -exec ln -s {} libxerces-c.sl \\;");
+
+    # for AIX
+    psystem("cp -f $XERCESCROOT/lib/libxerces-c17.0.so .");
+    psystem("rm -f libxerces-c17.so");
+    psystem("rm -f libxerces-c.so");       
+    psystem("find . -name 'libxerces-c17.0.so' -exec ln -s {} libxerces-c17.so \\;");
+    psystem("find . -name 'libxerces-c17.so'   -exec ln -s {} libxerces-c.so \\;");
+               
     #
     # Create symbolic link for those ICU libraries
     #
-- 
GitLab