]> git.pld-linux.org Git - projects/template-specs.git/blob - perl.spec
- there exists pldcpan package which is preffered due automatic deps
[projects/template-specs.git] / perl.spec
1 #
2 ############################################################
3 #
4 # NOTE
5 # - use the SOURCES/pldcpan.pl script for new perl packages
6 #   also available in pldcpan package.
7 #
8 ############################################################
9 #
10 # Conditional build:
11 %bcond_without  autodeps        # don't BR packages needed only for resolving deps
12 %bcond_without  tests   # do not perform "make test"
13 #
14 %include        /usr/lib/rpm/macros.perl
15 %define         pdir    PDIR
16 %define         pnam    PNAM
17 Summary:        -
18 Summary(pl.UTF-8):      -
19 Name:           perl-PDIR-PNAM
20 Version:        -
21 Release:        -
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
31 BuildRequires:  -
32 %if %{with autodeps} || %{with tests}
33 BuildRequires:  perl-
34 BuildRequires:  perl-
35 %endif
36 Requires:       -
37 Provides:       -
38 Obsoletes:      -
39 BuildArch:      noarch
40 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
41
42 %define         _noautoreq      'perl(anything_fake_or_conditional)'
43
44 %description
45
46 %description -l pl.UTF-8
47
48 %prep
49 %setup -q -n %{pdir}-%{pnam}-%{version}
50 %patch0 -p1
51
52 %build
53 # Don't use pipes here: they generally don't work. Apply a patch.
54 %{__perl} Makefile.PL \
55         INSTALLDIRS=vendor
56
57 %{__make}
58 # if module isn't noarch, use:
59 # %{__make} \
60 #       OPTIMIZE="%{rpmcflags}"
61
62 %{?with_tests:%{__make} test}
63
64 %install
65 rm -rf $RPM_BUILD_ROOT
66
67 %{__make} pure_install \
68         DESTDIR=$RPM_BUILD_ROOT
69
70 %clean
71 rm -rf $RPM_BUILD_ROOT
72
73 %files
74 %defattr(644,root,root,755)
75 %doc Changes README
76 # NOTE it's mostly easier to copy unpackaged filelist here, and run adapter over the spec.
77 # use macros:
78 #%%{perl_vendorlib}/PDIR...
79 #%%{perl_vendorarch}/PDIR...
80 %{_mandir}/man3/*
This page took 0.041088 seconds and 4 git commands to generate.