Make Perl modules use vendor path

Distro-provided Perl modules should use the vendor library path. Add
INSTALLDIRS=vendor or --installdirs=vendor to select it for
ExtUtils::MakeMaker or Module::Build install patterns.
This commit is contained in:
Brett T. Warden
2018-10-11 17:21:51 -07:00
committed by William Douglas
parent 6b14efdd45
commit 4cc3f103a3
+2 -2
View File
@@ -1300,9 +1300,9 @@ class Specfile(object):
file2 = file.replace("/", "_")
self._write_strip("cp " + file + " %{buildroot}/usr/share/package-licenses/" + self.name + "/" + file2 + "\n")
self._write_strip("if test -f Makefile.PL; then")
self._write_strip("make pure_install PERL_INSTALL_ROOT=%{buildroot}")
self._write_strip("make pure_install PERL_INSTALL_ROOT=%{buildroot} INSTALLDIRS=vendor")
self._write_strip("else")
self._write_strip("./Build install --installdirs=site --destdir=%{buildroot}")
self._write_strip("./Build install --installdirs=vendor --destdir=%{buildroot}")
self._write_strip("fi")
self._write_strip("find %{buildroot} -type f -name .packlist -exec rm -f {} ';'")
self._write_strip("find %{buildroot} -depth -type d -exec rmdir {} 2>/dev/null ';'")