X-Git-Url: http://git.pld-linux.org/?a=blobdiff_plain;f=rpm-php-provides;h=ebbab977b4b2545425080cfff9a9403cc6d04e94;hb=19de623d966290f012dd43ffa3fe06a369355448;hp=2750cbd6065b6842c1fc8c0dad5b8affb963ce6a;hpb=ff0f018969319ea8e9a4fe9bc2778379e19b3585;p=packages%2Frpm.git diff --git a/rpm-php-provides b/rpm-php-provides index 2750cbd..ebbab97 100644 --- a/rpm-php-provides +++ b/rpm-php-provides @@ -1,21 +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: # ##################################################################### -die "You have to specify input files" if (@ARGV < 1); - -$pear = "/usr/share/pear"; +# Contest: shrink this one to oneliner +# Bonus : and fit in 80 columns ;) -while (@ARGV > 0) { - $f = shift; - 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 ();