]>
Commit | Line | Data |
---|---|---|
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 | 17 | Summary: - |
ce39d734 | 18 | Summary(pl.UTF-8): - |
02ecf1a7 | 19 | Name: perl-PDIR-PNAM |
3299adc7 SZ |
20 | Version: - |
21 | Release: - | |
350c7060 | 22 | # note if it is "same as perl" |
3f2b9700 | 23 | #License: GPL v1+ or Artistic |
c38fb6bc | 24 | License: (enter GPL/LGPL/BSD/BSD-like/Artistic/other license name here) |
2fd42c2b | 25 | Group: Development/Languages/Perl |
abddec0e | 26 | Source0: http://www.cpan.org/modules/by-module/PDIR/%{pdir}-%{pnam}-%{version}.tar.gz |
3f2b9700 | 27 | # Source0-md5: |
02ecf1a7 | 28 | Patch0: %{name}-foo.patch |
8f218f52 | 29 | # most of CPAN modules have generic URL (substitute pdir and pnam here) |
8073c682 | 30 | URL: http://search.cpan.org/dist/PDIR-PNAM/ |
cfe7622a ER |
31 | # macros BR if _noautoreq_perl is used |
32 | #BuildRequires: rpmbuild(macros) >= 1.654 | |
a34f5786 | 33 | BuildRequires: perl-devel >= 1:5.8.0 |
107a0f90 | 34 | BuildRequires: rpm-perlprov >= 4.1-13 |
3299adc7 | 35 | BuildRequires: - |
59b8ae11 | 36 | %if %{with autodeps} || %{with tests} |
c96533b1 | 37 | BuildRequires: perl- |
38 | BuildRequires: perl- | |
39 | %endif | |
3299adc7 | 40 | Requires: - |
3299adc7 SZ |
41 | Provides: - |
42 | Obsoletes: - | |
2fd42c2b SZ |
43 | BuildArch: noarch |
44 | BuildRoot: %{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 | |
2fd42c2b | 64 | %{__make} |
ede9f904 | 65 | # if module isn't noarch, use: |
3e914c93 | 66 | # %{__make} \ |
870ecbf3 | 67 | # CC="%{__cc}" |
3e914c93 | 68 | # OPTIMIZE="%{rpmcflags}" |
0473ffe6 | 69 | |
a297c688 ER |
70 | # for C++ programs, use also CC but specify __cxx: |
71 | # NOTE: (this) Perl build system doesn't have CXX, but CC is used | |
72 | #%{__make} \ | |
73 | # CC="%{__cxx}" \ | |
74 | # OPTIMIZE="%{rpmcflags}" | |
75 | ||
460ed0bf | 76 | %{?with_tests:%{__make} test} |
2fd42c2b SZ |
77 | |
78 | %install | |
79 | rm -rf $RPM_BUILD_ROOT | |
80 | ||
b9179971 | 81 | %{__make} pure_install \ |
2fd42c2b | 82 | DESTDIR=$RPM_BUILD_ROOT |
2fd42c2b | 83 | |
2fd42c2b SZ |
84 | %clean |
85 | rm -rf $RPM_BUILD_ROOT | |
86 | ||
87 | %files | |
88 | %defattr(644,root,root,755) | |
ede9f904 | 89 | %doc Changes README |
02ecf1a7 | 90 | # NOTE it's mostly easier to copy unpackaged filelist here, and run adapter over the spec. |
ede9f904 | 91 | # use macros: |
abddec0e JB |
92 | #%%{perl_vendorlib}/PDIR... |
93 | #%%{perl_vendorarch}/PDIR... | |
193c54ad | 94 | %{_mandir}/man3/* |