]> git.pld-linux.org Git - projects/template-specs.git/blob - perl.spec
- update non-opt ocaml packaging
[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  tests   # do not perform "make test"
12 #
13 %define         pdir    PDIR
14 %define         pnam    PNAM
15 Summary:        -
16 Summary(pl.UTF-8):      -
17 Name:           perl-PDIR-PNAM
18 Version:        -
19 Release:        -
20 # note if it is "same as perl"
21 #License:       GPL v1+ or Artistic
22 License:        (enter GPL/LGPL/BSD/BSD-like/Artistic/other license name here)
23 Group:          Development/Languages/Perl
24 Source0:        http://www.cpan.org/modules/by-module/PDIR/%{pdir}-%{pnam}-%{version}.tar.gz
25 # Source0-md5:  
26 Patch0:         %{name}-foo.patch
27 # most of CPAN modules have generic URL (substitute pdir and pnam here)
28 URL:            https://metacpan.org/release/PDIR-PNAM
29 BuildRequires:  perl-devel >= 1:5.8.0
30 BuildRequires:  rpm-perlprov >= 4.1-13
31 BuildRequires:  rpmbuild(macros) >= 1.745
32 BuildRequires:  -
33 %if %{with tests}
34 BuildRequires:  perl-
35 BuildRequires:  perl-
36 %endif
37 Requires:       -
38 Provides:       -
39 Obsoletes:      -
40 BuildArch:      noarch
41 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
42
43 %define         _noautoreq_perl anything_fake_or_conditional
44
45 %description
46
47 %description -l pl.UTF-8
48
49 %prep
50 %setup -q -n %{pdir}-%{pnam}-%{version}
51 %patch0 -p1
52
53 # fix #!/usr/bin/env perl -w -> #!/usr/bin/perl:
54 %{__sed} -i -e '1s,^#!.*perl,#!%{__perl},' tofu
55
56 %build
57 # Don't use pipes here: they generally don't work. Apply a patch.
58 %{__perl} Makefile.PL \
59         INSTALLDIRS=vendor
60
61 # Build.PL based packages
62 %{__perl} Build.PL \
63         perl=%{__perl} \
64         installdirs=vendor
65 ./Build
66
67 %{__make}
68 # if module isn't noarch, use:
69 # %{__make} \
70 #       CC="%{__cc}"
71 #       OPTIMIZE="%{rpmcflags}"
72
73 # for C++ programs, use also CC but specify __cxx:
74 # NOTE: (this) Perl build system doesn't have CXX, but CC is used
75 #%{__make} \
76 #       CC="%{__cxx}" \
77 #       OPTIMIZE="%{rpmcflags}"
78
79 %{?with_tests:%{__make} test}
80
81 %install
82 rm -rf $RPM_BUILD_ROOT
83
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.097421 seconds and 3 git commands to generate.