summaryrefslogtreecommitdiff
path: root/brp-clean-perl-files
diff options
context:
space:
mode:
Diffstat (limited to 'brp-clean-perl-files')
-rw-r--r--brp-clean-perl-files10
1 files changed, 7 insertions, 3 deletions
diff --git a/brp-clean-perl-files b/brp-clean-perl-files
index 92c7c7d..c34fdb8 100644
--- a/brp-clean-perl-files
+++ b/brp-clean-perl-files
@@ -1,5 +1,9 @@
#!/bin/sh
-find $RPM_BUILD_ROOT/usr/{lib,lib64,share}/perl5 -type f -name ".packlist" -delete
-find $RPM_BUILD_ROOT/usr/{lib,lib64,share}/perl5 -type f -name "*.bs" -size 0 -delete
-find $RPM_BUILD_ROOT/%{perl_archlib}/perllocal.pod -delete
+for d in $RPM_BUILD_ROOT/usr/{lib,lib64,share}/perl5; do
+ [ -d $d ] || continue
+ find $d -type f -name ".packlist" -delete
+ find $d -type f -name "*.bs" -size 0 -delete
+done
+
+perl -MConfig -e 'unlink "$ENV{RPM_BUILD_ROOT}$Config{installarchlib}/perllocal.pod"'