diff options
author | jbj <devnull@localhost> | 2005-01-04 17:46:10 +0000 |
---|---|---|
committer | jbj <devnull@localhost> | 2005-01-04 17:46:10 +0000 |
commit | 6da6f7fc0a87818021bb07705450a29f46d7f14b (patch) | |
tree | 0d2626864b6a97cfa2a22659b0dd438a6134e1e7 /autodeps | |
parent | 228d0e350ac2f20ee7ca1f74c46620e219559542 (diff) | |
download | librpm-tizen-6da6f7fc0a87818021bb07705450a29f46d7f14b.tar.gz librpm-tizen-6da6f7fc0a87818021bb07705450a29f46d7f14b.tar.bz2 librpm-tizen-6da6f7fc0a87818021bb07705450a29f46d7f14b.zip |
- mac os x patches (#131943,#131944,#132924,#132926).
CVS patchset: 7671
CVS date: 2005/01/04 17:46:10
Diffstat (limited to 'autodeps')
-rw-r--r-- | autodeps/darwin.prov | 21 | ||||
-rw-r--r-- | autodeps/darwin.req | 26 |
2 files changed, 47 insertions, 0 deletions
diff --git a/autodeps/darwin.prov b/autodeps/darwin.prov new file mode 100644 index 000000000..5064414be --- /dev/null +++ b/autodeps/darwin.prov @@ -0,0 +1,21 @@ +#!/bin/bash +# ---------------------------------------------------------- +# find-provides for Darwin/MacOSX +# ---------------------------------------------------------- +# This script reads filenames from STDIN and outputs any relevant provides +# information that needs to be included in the package. + +filelist=$(sed -n -e '/\.dylib/p' -e '/\.so/p' -e '/\.bundle/p' | sort | uniq | xargs file -L 2>/dev/null | grep "Mach-O.*ppc" | cut -d: -f1) + +for f in $filelist; do + libname=$(basename $f | sed -e 's;\..*;;') + soname=$(otool -l $f | grep $libname | awk '/ name/ {print $2}') + + if [ "$soname" != "" ]; then + if [ ! -L $f ]; then + basename $soname + fi + else + echo ${f##*/} + fi +done | sort -u diff --git a/autodeps/darwin.req b/autodeps/darwin.req new file mode 100644 index 000000000..9bb08b753 --- /dev/null +++ b/autodeps/darwin.req @@ -0,0 +1,26 @@ +#!/bin/sh +# ---------------------------------------------------------------- +# find-requires for Darwin/MacOSX +# ---------------------------------------------------------------- +ulimit -c 0 + +filelist=`sed "s/['\"]/\\\&/g"` +exelist=`echo $filelist | xargs file | fgrep Mach-O | cut -d: -f1 ` +scriptlist=`echo $filelist | xargs file | egrep ":.* (commands|script) " | cut -d: -f1 ` + +for f in $exelist; do + if [ -x $f ]; then + otool -L $f \ + | awk '/^\t/ { print }' \ + | sed -n -e '/ (compatibility version .* current version .*)/p' \ + | sed -e 's/ (compatibility version .* current version .*)//' + fi +done | sort -u | sed "s/['\"]/\\\&/g" | xargs -n 1 basename | sort -u + +for f in $scriptlist; do + if [ -x $f ]; then + head -1 $f | sed -e 's/^\#\![ ]*//' \ + | sed -n -e '/^\/bin/!p' | sed -n -e '/^\/usr\/bin/!p' | uniq \ + | cut -d" " -f1 + fi +done |