--- /dev/null
+ /NEEDED/ { lib=substr($5,2,length($5)-2); LIBS[lib]=$5 } \
+/.*=>/ {if ( $1 in LIBS ) LIBS[$1]=$3 } \
+match($0,/^\s+(\/[^ ]+\/([^ ]+)) /,m) { if ( m[2] in LIBS ) LIBS[m[2]]=m[1] } \
+END { for (lib in LIBS) print LIBS[lib] }
fi
pkgdir=/usr/src/${pkg}
+pkgawk=/usr/lib/pkgusr/pkgdeps.awk
upd_pkg_deps()
{
for file in $(forall_direntries_from $pkg -type f -executable -readable); do
if readelf -d $file &>/dev/null && ldd $file &>/dev/null; then
(readelf -d $file ; ldd $file ) |
- awk '/NEEDED/ { lib=substr($5,2,length($5)-2); LIBS[lib]=$5 } \
- /.*=>/ {if ( $1 in LIBS ) LIBS[$1]=$3 } END \
- { for (lib in LIBS) print LIBS[lib] }' |
- xargs stat --printf "%U:%G\n"
+ awk -f ${pkgawk} | xargs stat --printf "%U:%G\n"
fi
done|sort -u|tr -s '\n' ' '
}