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: GPL v1+ or Artistic
24 License: (enter GPL/LGPL/BSD/BSD-like/Artistic/other license name here)
25 Group: Development/Languages/Perl
26 Source0: http://www.cpan.org/modules/by-module/PDIR/%{pdir}-%{pnam}-%{version}.tar.gz
28 Patch0: %{name}-foo.patch
29 # most of CPAN modules have generic URL (substitute pdir and pnam here)
30 URL: http://search.cpan.org/dist/PDIR-PNAM/
31 BuildRequires: perl-devel >= 1:5.8.0
32 BuildRequires: rpm-perlprov >= 4.1-13
34 %if %{with autodeps} || %{with tests}
42 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
44 %define _noautoreq 'perl(anything_fake_or_conditional)'
48 %description -l pl.UTF-8
51 %setup -q -n %{pdir}-%{pnam}-%{version}
55 # Don't use pipes here: they generally don't work. Apply a patch.
56 %{__perl} Makefile.PL \
60 # if module isn't noarch, use:
63 # OPTIMIZE="%{rpmcflags}"
65 %{?with_tests:%{__make} test}
68 rm -rf $RPM_BUILD_ROOT
70 %{__make} pure_install \
71 DESTDIR=$RPM_BUILD_ROOT
74 rm -rf $RPM_BUILD_ROOT
77 %defattr(644,root,root,755)
79 # NOTE it's mostly easier to copy unpackaged filelist here, and run adapter over the spec.
81 #%%{perl_vendorlib}/PDIR...
82 #%%{perl_vendorarch}/PDIR...