]> git.pld-linux.org Git - projects/template-specs.git/blob - perl.spec
- unify
[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 BuildRequires:  perl-devel >= 1:5.8.0
32 BuildRequires:  rpm-perlprov >= 4.1-13
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 %{__make}
63 # if module isn't noarch, use:
64 # %{__make} \
65 #       CC="%{__cc}"
66 #       OPTIMIZE="%{rpmcflags}"
67
68 %{?with_tests:%{__make} test}
69
70 %install
71 rm -rf $RPM_BUILD_ROOT
72
73 %{__make} pure_install \
74         DESTDIR=$RPM_BUILD_ROOT
75
76 %clean
77 rm -rf $RPM_BUILD_ROOT
78
79 %files
80 %defattr(644,root,root,755)
81 %doc Changes README
82 # NOTE it's mostly easier to copy unpackaged filelist here, and run adapter over the spec.
83 # use macros:
84 #%%{perl_vendorlib}/PDIR...
85 #%%{perl_vendorarch}/PDIR...
86 %{_mandir}/man3/*
This page took 0.052112 seconds and 4 git commands to generate.