2 # - you should consider using pldcpan for new perl packages
5 %bcond_without autodeps # don't BR packages needed only for resolving deps
6 %bcond_without tests # do not perform "make test"
8 %include /usr/lib/rpm/macros.perl
16 # note if it is "same as perl"
17 License: (enter GPL/LGPL/BSD/BSD-like/Artistic/other license name here)
18 Group: Development/Languages/Perl
19 Source0: http://www.cpan.org/modules/by-module/PDIR/%{pdir}-%{pnam}-%{version}.tar.gz
20 Patch0: %{name}-foo.patch
21 # most of CPAN modules have generic URL (substitute pdir and pnam here)
22 URL: http://search.cpan.org/dist/PDIR-PNAM/
23 BuildRequires: perl-devel >= 1:5.8.0
24 BuildRequires: rpm-perlprov >= 4.1-13
26 %if %{with autodeps} || %{with tests}
34 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
36 %define _noautoreq 'perl(anything_fake_or_conditional)'
40 %description -l pl.UTF-8
43 %setup -q -n %{pdir}-%{pnam}-%{version}
47 # Don't use pipes here: they generally don't work. Apply a patch.
48 %{__perl} Makefile.PL \
52 # if module isn't noarch, use:
54 # OPTIMIZE="%{rpmcflags}"
56 %{?with_tests:%{__make} test}
59 rm -rf $RPM_BUILD_ROOT
61 %{__make} pure_install \
62 DESTDIR=$RPM_BUILD_ROOT
65 rm -rf $RPM_BUILD_ROOT
68 %defattr(644,root,root,755)
70 # NOTE it's mostly easier to copy unpackaged filelist here, and run adapter over the spec.
72 #%%{perl_vendorlib}/PDIR...
73 #%%{perl_vendorarch}/PDIR...