summaryrefslogtreecommitdiff
path: root/autodeps/aix.req
diff options
context:
space:
mode:
authorewt <devnull@localhost>1998-05-26 13:26:09 +0000
committerewt <devnull@localhost>1998-05-26 13:26:09 +0000
commit7d24769a3365676ddeed076b6e5db296cca1e85a (patch)
tree5ed2f9adcf3a540250418fe488919f4a91771564 /autodeps/aix.req
parent3e1560b060467de0cc92b72ed77a227cf41b8c16 (diff)
downloadrpm-7d24769a3365676ddeed076b6e5db296cca1e85a.tar.gz
rpm-7d24769a3365676ddeed076b6e5db296cca1e85a.tar.bz2
rpm-7d24769a3365676ddeed076b6e5db296cca1e85a.zip
aix.req
CVS patchset: 2133 CVS date: 1998/05/26 13:26:09
Diffstat (limited to 'autodeps/aix.req')
-rwxr-xr-xautodeps/aix.req68
1 files changed, 68 insertions, 0 deletions
diff --git a/autodeps/aix.req b/autodeps/aix.req
new file mode 100755
index 000000000..31a6c8538
--- /dev/null
+++ b/autodeps/aix.req
@@ -0,0 +1,68 @@
+#! /usr/bin/ksh
+
+# Original Author: Ralph Goers(rgoer@Candle.Com)
+# Borrowed heavily from Tim Mooney's HP version.
+# This file is distributed under the terms of the GNU Public License
+#
+# find-requires is part of RPM, the RedHat Package Manager. find-requires
+# reads a list of full pathnames (in a package) on stdin, and outputs all
+# shared libraries the package requires to run correctly.
+#
+# On AIX, use `dump -H' to find the library dependencies for an executable
+#
+# Example dump output:
+#
+#$dump -H /usr/bin/dump
+#
+#/usr/bin/dump:
+#
+# ***Loader Section***
+# Loader Header Information
+#VERSION# #SYMtableENT #RELOCent LENidSTR
+#0x00000001 0x00000021 0x0000006c 0x0000002f
+#
+##IMPfilID OFFidSTR LENstrTBL OFFstrTBL
+#0x00000002 0x00000848 0x00000049 0x00000877
+#
+#
+# ***Import File Strings***
+#INDEX PATH BASE MEMBER
+#0 /usr/lib:/lib:/usr/lpp/xlC/lib
+#1 libc.a shr.o
+
+#
+#
+filelist=`sed "s/['\"]/\\\&/g" | xargs file | grep -e executable -e archive
+ | cut -d: -f1`
+
+for f in $filelist
+do
+ dump -H $f | awk '
+
+ #
+ # For you non-awk-ers, no single quotes in comments -- the
+shell
+ # sees them and things get hosed.
+ #
+
+ BEGIN {
+ in_shlib_list = 0;
+ in_file_strings = 0;
+ FS = " ";
+ RS = "\n";
+ }
+
+ in_shlib_list == 1 {
+ print $2
+ }
+
+ in_file_strings == 1 && $1 == "0" {
+ in_shlib_list = 1
+ }
+
+ /\*Import File Strings\*/ {
+ in_file_strings = 1
+ }
+
+ ' # end of awk
+done | sort -u