2 ############################################################
5 # - use the SOURCES/pldcpan.pl script for new perl packages
6 # also available in pldcpan package.
8 ############################################################
11 %bcond_without autodeps # don't BR packages needed only for resolving deps
12 %bcond_without tests # do not perform "make test"
14 %include /usr/lib/rpm/macros.perl
22 # note if it is "same as perl"
23 License: (enter GPL/LGPL/BSD/BSD-like/Artistic/other license name here)
24 Group: Development/Languages/Perl
25 Source0: http://www.cpan.org/modules/by-module/PDIR/%{pdir}-%{pnam}-%{version}.tar.gz
26 Patch0: %{name}-foo.patch
27 # most of CPAN modules have generic URL (substitute pdir and pnam here)
28 URL: http://search.cpan.org/dist/PDIR-PNAM/
29 BuildRequires: perl-devel >= 1:5.8.0
30 BuildRequires: rpm-perlprov >= 4.1-13
32 %if %{with autodeps} || %{with tests}
40 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
42 %define _noautoreq 'perl(anything_fake_or_conditional)'
46 %description -l pl.UTF-8
49 %setup -q -n %{pdir}-%{pnam}-%{version}
53 # Don't use pipes here: they generally don't work. Apply a patch.
54 %{__perl} Makefile.PL \
58 # if module isn't noarch, use:
60 # OPTIMIZE="%{rpmcflags}"
62 %{?with_tests:%{__make} test}
65 rm -rf $RPM_BUILD_ROOT
67 %{__make} pure_install \
68 DESTDIR=$RPM_BUILD_ROOT
71 rm -rf $RPM_BUILD_ROOT
74 %defattr(644,root,root,755)
76 # NOTE it's mostly easier to copy unpackaged filelist here, and run adapter over the spec.
78 #%%{perl_vendorlib}/PDIR...
79 #%%{perl_vendorarch}/PDIR...