]> git.pld-linux.org Git - projects/template-specs.git/blobdiff - perl.spec
adapter
[projects/template-specs.git] / perl.spec
index 5a3a5ae7210c79cd5778fb8091e24956203583b7..9113daefaff0b0cf19cf76fd0d1a5a89dd963cba 100644 (file)
--- a/perl.spec
+++ b/perl.spec
@@ -28,6 +28,8 @@ Source0:      http://www.cpan.org/modules/by-module/PDIR/%{pdir}-%{pnam}-%{version}.t
 Patch0:                %{name}-foo.patch
 # most of CPAN modules have generic URL (substitute pdir and pnam here)
 URL:           http://search.cpan.org/dist/PDIR-PNAM/
+# macros BR if _noautoreq_perl is used
+#BuildRequires:        rpmbuild(macros) >= 1.654
 BuildRequires: perl-devel >= 1:5.8.0
 BuildRequires: rpm-perlprov >= 4.1-13
 BuildRequires: -
@@ -41,7 +43,7 @@ Obsoletes:    -
 BuildArch:     noarch
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
-%define                _noautoreq      'perl(anything_fake_or_conditional)'
+%define                _noautoreq_perl anything_fake_or_conditional
 
 %description
 
@@ -59,20 +61,34 @@ BuildRoot:  %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 %{__perl} Makefile.PL \
        INSTALLDIRS=vendor
 
+# Build.PL based packages
+%{__perl} Build.PL \
+       perl=%{__perl} \
+       installdirs=vendor
+./Build
+
 %{__make}
 # if module isn't noarch, use:
 # %{__make} \
 #      CC="%{__cc}"
 #      OPTIMIZE="%{rpmcflags}"
 
+# for C++ programs, use also CC but specify __cxx:
+# NOTE: (this) Perl build system doesn't have CXX, but CC is used
+#%{__make} \
+#      CC="%{__cxx}" \
+#      OPTIMIZE="%{rpmcflags}"
+
 %{?with_tests:%{__make} test}
 
 %install
 rm -rf $RPM_BUILD_ROOT
-
 %{__make} pure_install \
        DESTDIR=$RPM_BUILD_ROOT
 
+./Build install \
+       destdir=$RPM_BUILD_ROOT
+
 %clean
 rm -rf $RPM_BUILD_ROOT
 
This page took 0.035105 seconds and 4 git commands to generate.