3 %bcond_without autodeps # don't BR packages needed only for resolving deps
4 %bcond_without tests # do not perform "make test"
6 %include /usr/lib/rpm/macros.perl
14 # note if it is "same as perl"
15 License: (enter GPL/LGPL/BSD/BSD-like/Artistic/other license name here)
16 Group: Development/Languages/Perl
17 Source0: http://www.cpan.org/modules/by-module/%{pdir}/%{pdir}-%{pnam}-%{version}.tar.gz
19 # most of CPAN modules have generic URL (substitute pdir and pnam here)
20 #URL: http://search.cpan.org/dist/%{pdir}-%{pnam}
21 BuildRequires: perl-devel >= 1:5.8.0
22 BuildRequires: rpm-perlprov >= 4.1-13
24 %if %{with autodeps} || %{with tests}
32 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
34 %define _noautoreq 'perl(anything_fake_or_conditional)'
41 %setup -q -n %{pdir}-%{pnam}-%{version}
45 # Don't use pipes here: they generally don't work. Apply a patch.
46 %{__perl} Makefile.PL \
50 # if module isn't noarch, use:
52 # OPTIMIZE="%{rpmcflags}"
54 %{?with_tests:%{__make} test}
57 rm -rf $RPM_BUILD_ROOT
59 %{__make} pure_install \
60 DESTDIR=$RPM_BUILD_ROOT
63 rm -rf $RPM_BUILD_ROOT
66 %defattr(644,root,root,755)
68 # note it's mostly easier to copy unpackaged filelist here, and run adapter over the spec.
70 #%%{perl_vendorlib}/...
71 #%%{perl_vendorarch}/...