]> git.pld-linux.org Git - projects/template-specs.git/blame - perl.spec
- rpmbuild(macros) for all macros included
[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
3299adc7 16Summary: -
ce39d734 17Summary(pl.UTF-8): -
02ecf1a7 18Name: perl-PDIR-PNAM
3299adc7
SZ
19Version: -
20Release: -
350c7060 21# note if it is "same as perl"
3f2b9700 22#License: GPL v1+ or Artistic
c38fb6bc 23License: (enter GPL/LGPL/BSD/BSD-like/Artistic/other license name here)
2fd42c2b 24Group: Development/Languages/Perl
abddec0e 25Source0: http://www.cpan.org/modules/by-module/PDIR/%{pdir}-%{pnam}-%{version}.tar.gz
3f2b9700 26# Source0-md5:
02ecf1a7 27Patch0: %{name}-foo.patch
8f218f52 28# most of CPAN modules have generic URL (substitute pdir and pnam here)
8073c682 29URL: http://search.cpan.org/dist/PDIR-PNAM/
a34f5786 30BuildRequires: perl-devel >= 1:5.8.0
107a0f90 31BuildRequires: rpm-perlprov >= 4.1-13
58b78444 32BuildRequires: rpmbuild(macros) >= 1.745
3299adc7 33BuildRequires: -
59b8ae11 34%if %{with autodeps} || %{with tests}
c96533b1 35BuildRequires: perl-
36BuildRequires: perl-
37%endif
3299adc7 38Requires: -
3299adc7
SZ
39Provides: -
40Obsoletes: -
2fd42c2b
SZ
41BuildArch: noarch
42BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
43
cfe7622a 44%define _noautoreq_perl anything_fake_or_conditional
c38fb6bc 45
2fd42c2b 46%description
3299adc7 47
9be49f18 48%description -l pl.UTF-8
3299adc7 49
2fd42c2b 50%prep
9b30721b 51%setup -q -n %{pdir}-%{pnam}-%{version}
2fd42c2b 52%patch0 -p1
2fd42c2b 53
4072b963
ER
54# fix #!/usr/bin/env perl -w -> #!/usr/bin/perl:
55%{__sed} -i -e '1s,^#!.*perl,#!%{__perl},' tofu
56
2fd42c2b 57%build
c38fb6bc 58# Don't use pipes here: they generally don't work. Apply a patch.
193c54ad 59%{__perl} Makefile.PL \
60 INSTALLDIRS=vendor
3e914c93 61
01f000c4
ER
62# Build.PL based packages
63%{__perl} Build.PL \
1da6b4e0 64 perl=%{__perl} \
2c4a7b7b 65 installdirs=vendor
01f000c4
ER
66./Build
67
2fd42c2b 68%{__make}
ede9f904 69# if module isn't noarch, use:
3e914c93 70# %{__make} \
870ecbf3 71# CC="%{__cc}"
3e914c93 72# OPTIMIZE="%{rpmcflags}"
0473ffe6 73
a297c688
ER
74# for C++ programs, use also CC but specify __cxx:
75# NOTE: (this) Perl build system doesn't have CXX, but CC is used
76#%{__make} \
77# CC="%{__cxx}" \
78# OPTIMIZE="%{rpmcflags}"
79
460ed0bf 80%{?with_tests:%{__make} test}
2fd42c2b
SZ
81
82%install
83rm -rf $RPM_BUILD_ROOT
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 1.416903 seconds and 4 git commands to generate.