aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <thierry.vignaud@gmail.com>2014-10-01 16:09:09 +0200
committerThierry Vignaud <thierry.vignaud@gmail.com>2014-10-01 16:09:09 +0200
commit973836a968782ec21ba39685f40f6a7a305779e5 (patch)
tree2e36cef30e4e6af32432c39a978512c45a1f999f
parent1467ddeab2ff145761ac7092ca0ab3cfa7906138 (diff)
downloadrpm-setup-973836a968782ec21ba39685f40f6a7a305779e5.tar
rpm-setup-973836a968782ec21ba39685f40f6a7a305779e5.tar.gz
rpm-setup-973836a968782ec21ba39685f40f6a7a305779e5.tar.bz2
rpm-setup-973836a968782ec21ba39685f40f6a7a305779e5.tar.xz
rpm-setup-973836a968782ec21ba39685f40f6a7a305779e5.zip
do not emit PHP requires for package's own files
-rw-r--r--NEWS2
-rwxr-xr-xphp.req9
2 files changed, 11 insertions, 0 deletions
diff --git a/NEWS b/NEWS
index 8425857..025e19d 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,5 @@
+- do not emit PHP requires for package's own files
+
Version 2.4 - 24 September 2014, by Thierry Vignaud
- emit pythonegg requires/provides back
diff --git a/php.req b/php.req
index c8209aa..5f2f79d 100755
--- a/php.req
+++ b/php.req
@@ -75,6 +75,15 @@ foreach (@ARGV ? $ARGV : <> ) {
}
}
+sub cat_ { my @l = map { my $F; open($F, '<', $_) ? <$F> : () } @_; wantarray() ? @l : join '', @l }
+
+my $cache = "$ENV{RPM_BUILD_ROOT}.php.req.file.cache";
+if (-f $cache) {
+ @files = cat_($cache);
+} else {
+ qx(find $ENV{RPM_BUILD_ROOT} -name "*php"|grep -v /usr/share/doc |sed -e 's!$ENV{RPM_BUILD_ROOT}!!' > $cache);
+}
+
f: for $f (keys %req) {
for $g (@files) { next f if ($g =~ /\Q$f\E$/); }
print "pear($f)\n";