%define perl_vendorlib %(eval "`perl -V:installvendorlib`"; echo $installvendorlib)

Name:           perl-GDGraph
Version:        1.43
Release:        5%{?_dist_release}

Summary:        Graph generation package for Perl
Summary(ja):    Perl によるグラフ生成パッケージ

Group:          Development/Libraries
License:        GPL or Artistic
URL:            http://search.cpan.org/dist/GDGraph/
Source0:        http://www.cpan.org/authors/id/M/MV/MVERB/GDGraph-%{version}.tar.gz

BuildRoot:      %{_tmppath}/%{name}-%{version}-root
BuildArch:      noarch
BuildRequires:  perl >= 5.6.1, perl-GD, perl-GDTextUtil
Requires:  perl >= 5.6.1, perl-GD, perl-GDTextUtil

%description
%{summary}.

%prep
%setup -q -n GDGraph-%{version}

%build
perl Makefile.PL INSTALLDIRS=vendor
make %{?_smp_mflags}

%install
rm -rf $RPM_BUILD_ROOT
make pure_install PERL_INSTALL_ROOT=$RPM_BUILD_ROOT
find $RPM_BUILD_ROOT -type f -name .packlist -exec rm -f {} ';'
find $RPM_BUILD_ROOT -type d -depth -exec rmdir {} 2>/dev/null ';'
chmod -R u+w $RPM_BUILD_ROOT/*

%check || :
make test

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root,-)
%doc CHANGES README samples/
%{perl_vendorlib}/GD/*
%{_mandir}/man3/*.3*

%changelog
* Wed Jun 24 2009 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.43-5
- applied new versioning policy, spec in UTF-8
- rebuilt with perl-5.10.0

* Sun Sep  3 2006 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.43-4vl2
- changed Group to Development/Libraries

* Sat Sep 17 2005 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.43-4vl1
- rebuild for Vine Linux
- added Japanese summary

* Fri Apr  7 2005 Michael Schwendt <mschwendt[AT]users.sf.net>
- rebuilt

* Sun Jul 11 2004 Jose Pedro Oliveira <jpo@di.uminho.pt> - 0:1.43-0.fdr.3
- Unowned directory: %%{perl_vendorlib}/GD (see bug 1800 comment #1).

* Wed Jun 30 2004 Jose Pedro Oliveira <jpo@di.uminho.pt> - 0:1.43-0.fdr.2
- Bring up to date with current fedora.us perl spec template.
- Added the samples directory to the documentation files.

* Sun Oct 12 2003 Ville Skytt辰 <ville.skytta at iki.fi> - 0:1.43-0.fdr.1
- First build.