]> git.pld-linux.org Git - projects/template-specs.git/blob - perl.spec
rpm5 autodep generator defines
[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 %define         pdir    PDIR
15 %define         pnam    PNAM
16 %include        /usr/lib/rpm/macros.perl
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:       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
27 # Source0-md5:  
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 # macros BR if _noautoreq_perl is used
32 #BuildRequires: rpmbuild(macros) >= 1.654
33 BuildRequires:  perl-devel >= 1:5.8.0
34 BuildRequires:  rpm-perlprov >= 4.1-13
35 BuildRequires:  -
36 %if %{with autodeps} || %{with tests}
37 BuildRequires:  perl-
38 BuildRequires:  perl-
39 %endif
40 Requires:       -
41 Provides:       -
42 Obsoletes:      -
43 BuildArch:      noarch
44 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
45
46 %define         _noautoreq_perl anything_fake_or_conditional
47
48 %description
49
50 %description -l pl.UTF-8
51
52 %prep
53 %setup -q -n %{pdir}-%{pnam}-%{version}
54 %patch0 -p1
55
56 # fix #!/usr/bin/env perl -w -> #!/usr/bin/perl:
57 %{__sed} -i -e '1s,^#!.*perl,#!%{__perl},' tofu
58
59 %build
60 # Don't use pipes here: they generally don't work. Apply a patch.
61 %{__perl} Makefile.PL \
62         INSTALLDIRS=vendor
63
64 %{__make}
65 # if module isn't noarch, use:
66 # %{__make} \
67 #       CC="%{__cc}"
68 #       OPTIMIZE="%{rpmcflags}"
69
70 # for C++ programs, use also CC but specify __cxx:
71 # NOTE: (this) Perl build system doesn't have CXX, but CC is used
72 #%{__make} \
73 #       CC="%{__cxx}" \
74 #       OPTIMIZE="%{rpmcflags}"
75
76 %{?with_tests:%{__make} test}
77
78 %install
79 rm -rf $RPM_BUILD_ROOT
80
81 %{__make} pure_install \
82         DESTDIR=$RPM_BUILD_ROOT
83
84 %clean
85 rm -rf $RPM_BUILD_ROOT
86
87 %files
88 %defattr(644,root,root,755)
89 %doc Changes README
90 # NOTE it's mostly easier to copy unpackaged filelist here, and run adapter over the spec.
91 # use macros:
92 #%%{perl_vendorlib}/PDIR...
93 #%%{perl_vendorarch}/PDIR...
94 %{_mandir}/man3/*
This page took 0.091825 seconds and 4 git commands to generate.