#
# Rebuild option:
#
# --with testsuite - run the test suite
#
Name: perl-Cairo
Version: 0.91
Release: 1%{?dist}
Summary: Perl interface to the cairo library
Group: Development/Libraries
License: LGPL
URL: http://search.cpan.org/dist/Cairo/
Source0: http://www.cpan.org/authors/id/T/TS/TSCH/Cairo-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: perl(ExtUtils::Depends), perl(ExtUtils::PkgConfig)
BuildRequires: cairo-devel >= 1.0.0
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
%description
Cairo provides Perl bindings for the vector graphics library cairo.
It supports multiple output targets, including the X Window Systems,
PDF, and PNG. Cairo produces identical output on all those targets
and makes use of hardware acceleration wherever possible.
%prep
%setup -q -n Cairo-%{version}
chmod 644 examples/simple.pl
%build
%{__perl} Makefile.PL INSTALLDIRS=vendor OPTIMIZE="$RPM_OPT_FLAGS"
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 f -name '*.bs' -empty -exec rm -f {} ';'
find $RPM_BUILD_ROOT -type d -depth -exec rmdir {} 2>/dev/null ';'
chmod -R u+w $RPM_BUILD_ROOT/*
%check
%{?_with_testsuite:make test}
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root,-)
%doc ChangeLog LICENSE NEWS README TODO examples/
%{perl_vendorarch}/Cairo*
%{perl_vendorarch}/auto/Cairo/
%{_mandir}/man3/*.3*
%changelog
* Sat Aug 12 2006 Jose Pedro Oliveira <jpo at di.uminho.pt> - 0.91-1
- Update to 0.91.
* Sun Jul 16 2006 Jose Pedro Oliveira <jpo at di.uminho.pt> - 0.90-1
- Update to 0.90.
* Tue Apr 18 2006 Jose Pedro Oliveira <jpo at di.uminho.pt> - 0.03-2
- Disabled the test suite as it fails in mock.
* Sun Mar 19 2006 Jose Pedro Oliveira <jpo at di.uminho.pt> - 0.03-1
- First build.