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