diff options
author | HyungKyu Song <hk76.song@samsung.com> | 2013-02-16 01:03:32 +0900 |
---|---|---|
committer | HyungKyu Song <hk76.song@samsung.com> | 2013-02-16 01:03:32 +0900 |
commit | 365d51246cf71556ecbb49f1fc6592262d4d4d77 (patch) | |
tree | 79d5c20a494622eb084de831a2a51530cd421e33 /autodeps/darwin.prov | |
parent | b7a3bffb8e0341b7e4ef69def268bca3a7f279ff (diff) | |
download | rpm-tizen_2.0.tar.gz rpm-tizen_2.0.tar.bz2 rpm-tizen_2.0.zip |
Diffstat (limited to 'autodeps/darwin.prov')
-rw-r--r-- | autodeps/darwin.prov | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/autodeps/darwin.prov b/autodeps/darwin.prov new file mode 100644 index 0000000..b068912 --- /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\|i386\)" | 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 |