]> git.pld-linux.org Git - projects/template-specs.git/blame - perl.spec
Add rust template with crate vendoring example
[projects/template-specs.git] / perl.spec
CommitLineData
76919b8f 1#
2############################################################
3#
02ecf1a7 4# NOTE
76919b8f 5# - use the SOURCES/pldcpan.pl script for new perl packages
c060e1e5 6# also available in pldcpan package.
76919b8f 7#
8############################################################
654cb390 9#
26510aed 10# Conditional build:
460ed0bf 11%bcond_without tests # do not perform "make test"
654cb390 12#
02ecf1a7
ER
13%define pdir PDIR
14%define pnam PNAM
3299adc7 15Summary: -
ce39d734 16Summary(pl.UTF-8): -
02ecf1a7 17Name: perl-PDIR-PNAM
3299adc7
SZ
18Version: -
19Release: -
350c7060 20# note if it is "same as perl"
3f2b9700 21#License: GPL v1+ or Artistic
c38fb6bc 22License: (enter GPL/LGPL/BSD/BSD-like/Artistic/other license name here)
2fd42c2b 23Group: Development/Languages/Perl
abddec0e 24Source0: http://www.cpan.org/modules/by-module/PDIR/%{pdir}-%{pnam}-%{version}.tar.gz
3f2b9700 25# Source0-md5:
02ecf1a7 26Patch0: %{name}-foo.patch
8f218f52 27# most of CPAN modules have generic URL (substitute pdir and pnam here)
9a2350ae 28URL: https://metacpan.org/release/PDIR-PNAM
a34f5786 29BuildRequires: perl-devel >= 1:5.8.0
107a0f90 30BuildRequires: rpm-perlprov >= 4.1-13
58b78444 31BuildRequires: rpmbuild(macros) >= 1.745
3299adc7 32BuildRequires: -
9a2350ae 33%if %{with tests}
c96533b1 34BuildRequires: perl-
35BuildRequires: perl-
36%endif
3299adc7 37Requires: -
3299adc7
SZ
38Provides: -
39Obsoletes: -
2fd42c2b
SZ
40BuildArch: noarch
41BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
42
cfe7622a 43%define _noautoreq_perl anything_fake_or_conditional
c38fb6bc 44
2fd42c2b 45%description
3299adc7 46
9be49f18 47%description -l pl.UTF-8
3299adc7 48
2fd42c2b 49%prep
9b30721b 50%setup -q -n %{pdir}-%{pnam}-%{version}
2fd42c2b 51%patch0 -p1
2fd42c2b 52
4072b963
ER
53# fix #!/usr/bin/env perl -w -> #!/usr/bin/perl:
54%{__sed} -i -e '1s,^#!.*perl,#!%{__perl},' tofu
55
2fd42c2b 56%build
c38fb6bc 57# Don't use pipes here: they generally don't work. Apply a patch.
193c54ad 58%{__perl} Makefile.PL \
59 INSTALLDIRS=vendor
3e914c93 60
01f000c4
ER
61# Build.PL based packages
62%{__perl} Build.PL \
1da6b4e0 63 perl=%{__perl} \
2c4a7b7b 64 installdirs=vendor
01f000c4
ER
65./Build
66
2fd42c2b 67%{__make}
ede9f904 68# if module isn't noarch, use:
3e914c93 69# %{__make} \
870ecbf3 70# CC="%{__cc}"
3e914c93 71# OPTIMIZE="%{rpmcflags}"
0473ffe6 72
a297c688
ER
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
460ed0bf 79%{?with_tests:%{__make} test}
2fd42c2b
SZ
80
81%install
82rm -rf $RPM_BUILD_ROOT
9a2350ae 83
b9179971 84%{__make} pure_install \
2fd42c2b 85 DESTDIR=$RPM_BUILD_ROOT
2fd42c2b 86
2c4a7b7b
ER
87./Build install \
88 destdir=$RPM_BUILD_ROOT
89
2fd42c2b
SZ
90%clean
91rm -rf $RPM_BUILD_ROOT
92
93%files
94%defattr(644,root,root,755)
ede9f904 95%doc Changes README
02ecf1a7 96# NOTE it's mostly easier to copy unpackaged filelist here, and run adapter over the spec.
ede9f904 97# use macros:
abddec0e
JB
98#%%{perl_vendorlib}/PDIR...
99#%%{perl_vendorarch}/PDIR...
193c54ad 100%{_mandir}/man3/*
This page took 0.931454 seconds and 4 git commands to generate.