]>
git.ipfire.org Git - people/ms/pakfire.git/blob - tools/find-provides
4 BASEDIR
=$
(dirname ${0})
5 source ${BASEDIR}/find-common
14 # Walk through all file files and see what we have got here.
17 */usr
/lib
*/python
*/*.so
*)
18 # Do not show python shared objects in provides list.
21 binary_files
="${binary_files} ${file}"
24 # This file is a perl module. We check them later.
25 perl_files
="${perl_files} ${file}"
28 pkgconfig_files
="${pkgconfig_files} ${file}"
33 # Search for SONAMEs in all binary files.
34 for file in ${binary_files}; do
35 [ -L ${file} ] && continue
37 soname
=$
(file_get_soname
${file})
39 # If the files does not have a SONAME, we will
40 # simply use the basename.
41 if [ -z "${soname}" ]; then
42 if [ -L ${file} ]; then
45 soname
=$
(basename ${file})
48 if file_is_64bit
${file}; then
50 echo "${soname}${mark64}"
56 # Find weak symbol provides.
57 objdump
-p ${file} 2>/dev
/null |
awk '
59 /Version definitions:/ { START=1; }
60 /^[0-9]/ && (START==1) { print $4; }
61 /^$/ { START=0; }' | \
63 while read symbol
; do
64 echo "${soname}(${symbol})$(${is_64} && echo ${mark64} | sed 's/()//')"
68 # Search for perl provides.
69 if [ -n "${perl_files}" ] && [ -x /usr
/bin
/perl
]; then
70 perl
${BASEDIR}/perl.prov
${perl_files} |
sort -u
74 pkgconfig
=$
(which pkg-config
)
76 if [ -n "${pkgconfig}" -a -x "${pkgconfig}" ]; then
77 for file in ${pkgconfig_files}; do
78 # Query the dependencies of the package.
79 ${pkgconfig} --print-provides "${file}" 2> /dev
/null |
while read n r v
; do
80 # We have a dependency. Make a note that we need the pkgconfig
81 # tool for this package.
82 echo "pkgconfig(${n}) ${r} ${v}"
84 # The dependency on the pkgconfig package itself.