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"
21 # note if it is "same as perl"
22 #License: GPL v1+ or Artistic
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
27 Patch0: %{name}-foo.patch
28 # most of CPAN modules have generic URL (substitute pdir and pnam here)
29 URL: http://search.cpan.org/dist/PDIR-PNAM/
30 # macros BR if _noautoreq_perl is used
31 #BuildRequires: rpmbuild(macros) >= 1.654
32 BuildRequires: perl-devel >= 1:5.8.0
33 BuildRequires: rpm-perlprov >= 4.1-13
35 %if %{with autodeps} || %{with tests}
43 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
45 %define _noautoreq_perl anything_fake_or_conditional
49 %description -l pl.UTF-8
52 %setup -q -n %{pdir}-%{pnam}-%{version}
55 # fix #!/usr/bin/env perl -w -> #!/usr/bin/perl:
56 %{__sed} -i -e '1s,^#!.*perl,#!%{__perl},' tofu
59 # Don't use pipes here: they generally don't work. Apply a patch.
60 %{__perl} Makefile.PL \
63 # Build.PL based packages
70 # if module isn't noarch, use:
73 # OPTIMIZE="%{rpmcflags}"
75 # for C++ programs, use also CC but specify __cxx:
76 # NOTE: (this) Perl build system doesn't have CXX, but CC is used
79 # OPTIMIZE="%{rpmcflags}"
81 %{?with_tests:%{__make} test}
84 rm -rf $RPM_BUILD_ROOT
85 %{__make} pure_install \
86 DESTDIR=$RPM_BUILD_ROOT
89 destdir=$RPM_BUILD_ROOT
92 rm -rf $RPM_BUILD_ROOT
95 %defattr(644,root,root,755)
97 # NOTE it's mostly easier to copy unpackaged filelist here, and run adapter over the spec.
99 #%%{perl_vendorlib}/PDIR...
100 #%%{perl_vendorarch}/PDIR...