]> git.pld-linux.org Git - packages/rpm.git/blobdiff - rpm-php-provides
- adapterized, partial files update
[packages/rpm.git] / rpm-php-provides
index ebbab977b4b2545425080cfff9a9403cc6d04e94..a094cba8805a5a7b0ccafc482f7d14c63f2110e2 100644 (file)
@@ -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 <adamg@pld-linux.org>                            #
-#                                                                   #
-# Somehow based on previous work by:                                #
-# Pawe³ Go³aszewski <blues@pld-linux.org>                           #
+# Pawe³ Go³aszewski <blues@ds.pg.gda.pl>                            #
 # Micha³ Moskal <malekith@pld-linux.org>                            #
+# ------------------------------------------------------------------#
+# 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+\<name\>([a-zA-Z0-9\_]+)\<\/name\>$/ and print "php-pear-$1" while (<F>);
+foreach (@ARGV ? @ARGV : <>) {
+       chomp;
+       $f = $_;
+       next unless ($f =~ /$pear.*\.php$/);
+       $f =~ s/.*$pear\///;
+       print "pear($f)\n";
+}
This page took 0.030962 seconds and 4 git commands to generate.