]>
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/ |
a34f5786 | 31 | BuildRequires: perl-devel >= 1:5.8.0 |
107a0f90 | 32 | BuildRequires: rpm-perlprov >= 4.1-13 |
3299adc7 | 33 | BuildRequires: - |
59b8ae11 | 34 | %if %{with autodeps} || %{with tests} |
c96533b1 | 35 | BuildRequires: perl- |
36 | BuildRequires: perl- | |
37 | %endif | |
3299adc7 | 38 | Requires: - |
3299adc7 SZ |
39 | Provides: - |
40 | Obsoletes: - | |
2fd42c2b SZ |
41 | BuildArch: noarch |
42 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
43 | ||
0a7131e1 | 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 | |
2fd42c2b | 62 | %{__make} |
ede9f904 | 63 | # if module isn't noarch, use: |
3e914c93 | 64 | # %{__make} \ |
870ecbf3 | 65 | # CC="%{__cc}" |
3e914c93 | 66 | # OPTIMIZE="%{rpmcflags}" |
0473ffe6 | 67 | |
460ed0bf | 68 | %{?with_tests:%{__make} test} |
2fd42c2b SZ |
69 | |
70 | %install | |
71 | rm -rf $RPM_BUILD_ROOT | |
72 | ||
b9179971 | 73 | %{__make} pure_install \ |
2fd42c2b | 74 | DESTDIR=$RPM_BUILD_ROOT |
2fd42c2b | 75 | |
2fd42c2b SZ |
76 | %clean |
77 | rm -rf $RPM_BUILD_ROOT | |
78 | ||
79 | %files | |
80 | %defattr(644,root,root,755) | |
ede9f904 | 81 | %doc Changes README |
02ecf1a7 | 82 | # NOTE it's mostly easier to copy unpackaged filelist here, and run adapter over the spec. |
ede9f904 | 83 | # use macros: |
abddec0e JB |
84 | #%%{perl_vendorlib}/PDIR... |
85 | #%%{perl_vendorarch}/PDIR... | |
193c54ad | 86 | %{_mandir}/man3/* |