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