rpm-build/scripts/shlib.req.awk

42 lines
552 B
Awk
Raw Normal View History

2006-01-11 03:39:39 +03:00
#!/bin/awk -f
BEGIN {
shared=0; version=0; name="";
}
/^($)/ {
shared=0; version=0; name="";
next;
}
/^private/ {
shared=0; version=0; name="";
next;
}
/^Dynamic Section:$/ {
shared=1;
next;
}
/^Version References:$/ {
version=1;
next;
}
(version==1) && /^ *required from/ {
sub(/:/, "", $3);
name=$3;
next;
}
(shared==1) && /^ *NEEDED/ {
lib[$2]="";
next;
}
(version==1) && (name!="") && ($4!="") {
if (lib[name]!="")
lib[name]=lib[name] ":";
lib[name]=lib[name] $4;
next;
}
END {
for (name in lib)
print name ":" lib[name];
}