3 %bcond_without tests # do not perform "make test"
7 Summary: GD::Graph - graph plotting module for Perl
8 Summary(pl.UTF-8): GD::Graph - moduł do rysowania grafów dla Perla
13 # same as perl, but contains GPL v2+ font file required by examples, so
15 Group: Development/Languages/Perl
16 Source0: http://www.cpan.org/modules/by-module/%{pdir}/%{pdir}%{pnam}-%{version}.tar.gz
17 # Source0-md5: 38c6a188519e6272e9b2b722b315c3d8
18 Patch0: %{name}-samples.patch
19 URL: http://search.cpan.org/dist/GDGraph/
20 BuildRequires: ImageMagick
21 BuildRequires: ImageMagick-coder-png
22 BuildRequires: perl-devel >= 1:5.8.0
23 BuildRequires: rpm-perlprov >= 4.1-13
25 BuildRequires: perl-GD >= 1.18
26 BuildRequires: perl-GD-TextUtil >= 0.80
28 Requires: perl-GD >= 1.18
29 Requires: perl-GD-TextUtil >= 0.80
31 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
34 GD::Graph is a Perl module to create charts, using the GD module.
36 %description -l pl.UTF-8
37 Moduł Perla GD::Graph służy do tworzenia wykresów przy pomocy modułu
41 %setup -q -n %{pdir}%{pnam}-%{version}
44 # cleanup backups after patching
45 find '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f
48 %{__perl} Makefile.PL \
52 %{?with_tests:%{__make} test}
53 %{?with_tests:%{__make} samples}
56 rm -rf $RPM_BUILD_ROOT
57 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
59 DESTDIR=$RPM_BUILD_ROOT
61 cp -p samples/*.{dat,pl,png,txt} $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
63 # get rid of pod documentation
64 rm -f $RPM_BUILD_ROOT%{perl_vendorlib}/GD/Graph/*.pod
67 rm -rf $RPM_BUILD_ROOT
70 %defattr(644,root,root,755)
72 %{perl_vendorlib}/GD/Graph.pm
73 %{perl_vendorlib}/GD/Graph
75 %{_examplesdir}/%{name}-%{version}