aboutsummaryrefslogtreecommitdiffstats
path: root/devel.req
diff options
context:
space:
mode:
authorThierry Vignaud <thierry.vignaud@gmail.com>2014-09-08 17:49:24 +0200
committerThierry Vignaud <thierry.vignaud@gmail.com>2014-09-12 22:31:08 +0200
commitca5b97da228627efcc4be82eaae016f68535f6d9 (patch)
treeedf4b93d62d8f4cd9238c66acfd1aaea92668a7f /devel.req
parent562b734c42ca3dc181f5f4cf4b9dff4a4e1265b0 (diff)
downloadrpm-setup-ca5b97da228627efcc4be82eaae016f68535f6d9.tar
rpm-setup-ca5b97da228627efcc4be82eaae016f68535f6d9.tar.gz
rpm-setup-ca5b97da228627efcc4be82eaae016f68535f6d9.tar.bz2
rpm-setup-ca5b97da228627efcc4be82eaae016f68535f6d9.tar.xz
rpm-setup-ca5b97da228627efcc4be82eaae016f68535f6d9.zip
convert devel(foo) deps to internal generator
also kill X11R6 path btw (killed years ago)
Diffstat (limited to 'devel.req')
-rw-r--r--devel.req39
1 files changed, 39 insertions, 0 deletions
diff --git a/devel.req b/devel.req
new file mode 100644
index 0000000..43863c4
--- /dev/null
+++ b/devel.req
@@ -0,0 +1,39 @@
+#/bin/sh
+# .so files.
+#
+filelist=
+while read instfile ; do
+ filelist="$filelist $instfile"
+done
+
+# for objdump:
+export LC_ALL=C
+
+# --- Set needed to 0 for traditional find-requires behavior.
+needed=1
+
+for i in `echo $filelist | tr '[:blank:]' "\n" | egrep "(/usr)?/lib(|64)/[^/]+\.so$"`; do
+ objd=`objdump -p ${i} | grep SONAME`
+ lib64=`if file -L $i 2>/dev/null | grep "ELF 64-bit" >/dev/null; then echo "(64bit)"; fi` && \
+ if [ -h ${i} -a -n "${objd}" ]; then
+ if [ "$needed" -eq 0 ]; then
+ ldd ${i} \
+ | grep -v "statically linked" \
+ | grep -v "/\(lib\|lib64\)/\(ld\|ld64\|ld-linux.*\)\.so" \
+ | perl -p -e "s/\s+(\S+)\.so.*/devel(\1$lib64)/g"
+ else
+ objdump -p $i | grep -v "\(ld\|ld64\|ld-linux.*\)\.so" \
+ | awk 'BEGIN { START=0; }
+ /^$/ { START=0; }
+ /^Dynamic Section:$/ { START=1; }
+ (START==1) && /NEEDED/ {
+ sub(/^/, "devel(", $2) ;
+ sub(/\.so.*$/, "'$lib64')", $2) ;
+ print $2 ;
+ }
+ '
+ fi
+ fi
+done | egrep -v 'devel\(linux-gate|linux-vdso32|linux-vdso64|lib(c|pthread|rt)(\(64bit\))?\)' | sort -u
+
+