From 9de35134298d3534ceb8e4a5982366d3d061fcba Mon Sep 17 00:00:00 2001 From: root Date: Wed, 14 Aug 1996 21:02:31 +0000 Subject: [PATCH] Initial revision CVS patchset: 953 CVS date: 1996/08/14 21:02:31 --- autodeps/linux.prov | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 autodeps/linux.prov diff --git a/autodeps/linux.prov b/autodeps/linux.prov new file mode 100644 index 0000000..294c58e --- /dev/null +++ b/autodeps/linux.prov @@ -0,0 +1,18 @@ +#!/bin/sh + +# This script reads filenames from STDIN and outputs any relevant provides +# information that needs to be included in the package. + +filelist=$(grep "\\.so" | grep -v "^/lib/ld.so" | xargs file | grep "ELF.*shared object" | cut -d: -f1) + +for f in $filelist; do + soname=$(objdump --raw $f --section=.dynstr 2> /dev/null | tr '\\0' '\\n' | tail -1) + + if [ "$soname" != "" ]; then + if [ "$soname" != "_end" ]; then + echo $soname + else + echo ${f##*/} + fi + fi +done | sort -u -- 2.7.4