X-Git-Url: http://git.pld-linux.org/?p=packages%2Frpm.git;a=blobdiff_plain;f=rpm-php-provides;h=a094cba8805a5a7b0ccafc482f7d14c63f2110e2;hp=ebbab977b4b2545425080cfff9a9403cc6d04e94;hb=7feffaab205d050cea93f684d48b7b5e68a16051;hpb=801bbd4e0ea07c2d7a3dad085492c879455de02d diff --git a/rpm-php-provides b/rpm-php-provides index ebbab97..a094cba 100644 --- a/rpm-php-provides +++ b/rpm-php-provides @@ -1,17 +1,20 @@ #!/usr/bin/perl ##################################################################### # # -# Small script to generate provides for php-pear/php-pecl # +# Check system dependences between php-pear modules # # # -# Adam Go³êbiowski # -# # -# Somehow based on previous work by: # -# Pawe³ Go³aszewski # +# Pawe³ Go³aszewski # # Micha³ Moskal # +# ------------------------------------------------------------------# +# TODO: # ##################################################################### -# Contest: shrink this one to oneliner -# Bonus : and fit in 80 columns ;) +$pear = "/usr/share/pear"; -/package.xml/ and open(F, $_) foreach (@ARGV ? @ARGV : <> ); -/^\s+\([a-zA-Z0-9\_]+)\<\/name\>$/ and print "php-pear-$1" while (); +foreach (@ARGV ? @ARGV : <>) { + chomp; + $f = $_; + next unless ($f =~ /$pear.*\.php$/); + $f =~ s/.*$pear\///; + print "pear($f)\n"; +}