summaryrefslogtreecommitdiff
path: root/brp-clean-perl-files
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2024-10-26 04:12:57 +0000
committerCoprDistGit <infra@openeuler.org>2024-10-26 04:12:57 +0000
commit25bf05bdeb0aec7bd9117d059d6f0cd0ef265bb9 (patch)
tree8a946f8818080ab5bc88e2405140ddf23465a007 /brp-clean-perl-files
parent86d9b1ad9616e0e4057bb6b7105747185fd85474 (diff)
automatic import of openEuler-rpm-config
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"'