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