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