############################################################
#
# Conditional build:
-%bcond_without autodeps # don't BR packages needed only for resolving deps
%bcond_without tests # do not perform "make test"
#
%define pdir PDIR
%define pnam PNAM
-%include /usr/lib/rpm/macros.perl
Summary: -
Summary(pl.UTF-8): -
Name: perl-PDIR-PNAM
# Source0-md5:
Patch0: %{name}-foo.patch
# most of CPAN modules have generic URL (substitute pdir and pnam here)
-URL: http://search.cpan.org/dist/PDIR-PNAM/
+URL: https://metacpan.org/release/PDIR-PNAM
BuildRequires: perl-devel >= 1:5.8.0
BuildRequires: rpm-perlprov >= 4.1-13
+BuildRequires: rpmbuild(macros) >= 1.745
BuildRequires: -
-%if %{with autodeps} || %{with tests}
+%if %{with tests}
BuildRequires: perl-
BuildRequires: perl-
%endif
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
%{__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} \
%{__make} pure_install \
DESTDIR=$RPM_BUILD_ROOT
+./Build install \
+ destdir=$RPM_BUILD_ROOT
+
%clean
rm -rf $RPM_BUILD_ROOT