]>
Commit | Line | Data |
---|---|---|
4269f735 | 1 | # |
2 | # Conditional build: | |
4a43be27 | 3 | %bcond_without tests # do not perform "make test" |
6169852c | 4 | |
9bcbe184 | 5 | %define pdir GD |
6 | %define pnam Graph | |
6169852c | 7 | %include /usr/lib/rpm/macros.perl |
a9d6e414 | 8 | Summary: GD::Graph - graph plotting module for Perl |
cc710a40 | 9 | Summary(pl.UTF-8): GD::Graph - moduł do rysowania grafów dla Perla |
ad2d1a0d | 10 | Name: perl-GD-Graph |
df14bc29 | 11 | Version: 1.54 |
f291b035 AM |
12 | Release: 1 |
13 | Epoch: 1 | |
dbcd9b59 | 14 | # same as perl, but contains GPL v2+ font file required by examples, so |
15 | License: GPL v2+ | |
ad2d1a0d | 16 | Group: Development/Languages/Perl |
b9d6709b | 17 | Source0: http://www.cpan.org/modules/by-module/%{pdir}/%{pdir}%{pnam}-%{version}.tar.gz |
df14bc29 | 18 | # Source0-md5: 38c6a188519e6272e9b2b722b315c3d8 |
a9d6e414 | 19 | Patch0: %{name}-samples.patch |
83b6f53e | 20 | URL: http://search.cpan.org/dist/GDGraph/ |
531accd5 | 21 | BuildRequires: ImageMagick |
ec072cce | 22 | BuildRequires: ImageMagick-coder-png |
6169852c ER |
23 | BuildRequires: perl-devel >= 1:5.8.0 |
24 | BuildRequires: rpm-perlprov >= 4.1-13 | |
4a43be27 | 25 | %if %{with tests} |
b9463b56 | 26 | BuildRequires: perl-GD >= 1.18 |
f651d4c1 | 27 | BuildRequires: perl-GD-TextUtil >= 0.80 |
4269f735 | 28 | %endif |
f651d4c1 JB |
29 | Requires: perl-GD >= 1.18 |
30 | Requires: perl-GD-TextUtil >= 0.80 | |
6169852c | 31 | BuildArch: noarch |
238f504d | 32 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
ad2d1a0d | 33 | |
34 | %description | |
a9d6e414 | 35 | GD::Graph is a Perl module to create charts, using the GD module. |
ad2d1a0d | 36 | |
0f37fc83 JR |
37 | %description -l pl.UTF-8 |
38 | Moduł Perla GD::Graph służy do tworzenia wykresów przy pomocy modułu | |
a9d6e414 | 39 | GD. |
ad2d1a0d | 40 | |
41 | %prep | |
b9463b56 | 42 | %setup -q -n %{pdir}%{pnam}-%{version} |
99b197ea | 43 | %patch0 -p1 |
ad2d1a0d | 44 | |
6169852c ER |
45 | # cleanup backups after patching |
46 | find '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f | |
47 | ||
ad2d1a0d | 48 | %build |
d695ce01 | 49 | %{__perl} Makefile.PL \ |
8b96030f | 50 | INSTALLDIRS=vendor |
d1d0d5b6 | 51 | %{__make} |
ad2d1a0d | 52 | |
4a43be27 | 53 | %{?with_tests:%{__make} test} |
54 | %{?with_tests:%{__make} samples} | |
4269f735 | 55 | |
ad2d1a0d | 56 | %install |
57 | rm -rf $RPM_BUILD_ROOT | |
a9d6e414 | 58 | install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} |
d2efeab6 | 59 | %{__make} install \ |
60 | DESTDIR=$RPM_BUILD_ROOT | |
ad2d1a0d | 61 | |
6169852c | 62 | cp -p samples/*.{dat,pl,png,txt} $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} |
ad2d1a0d | 63 | |
63dee8fe AG |
64 | # get rid of pod documentation |
65 | rm -f $RPM_BUILD_ROOT%{perl_vendorlib}/GD/Graph/*.pod | |
66 | ||
ad2d1a0d | 67 | %clean |
68 | rm -rf $RPM_BUILD_ROOT | |
69 | ||
70 | %files | |
71 | %defattr(644,root,root,755) | |
dbcd9b59 | 72 | %doc CHANGES README |
d695ce01 | 73 | %{perl_vendorlib}/GD/Graph.pm |
74 | %{perl_vendorlib}/GD/Graph | |
ad2d1a0d | 75 | %{_mandir}/man3/* |
2fb1ac28 | 76 | %{_examplesdir}/%{name}-%{version} |