File perl-Cairo.spec of Package perl-Cairo

#
# spec file for package perl-Cairo
#
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#



Name:           perl-Cairo
Version:        1.081
Release:        1
License:        LGPLv2.1+
%define cpan_name Cairo
Summary:        Perl interface to the cairo library
Url:            http://search.cpan.org/dist/Cairo/
Group:          Development/Libraries/Perl
#Source:         http://www.cpan.org/authors/id/T/TS/TSCH/Cairo-1.061.tar.gz
Source:         %{cpan_name}-%{version}.tar.gz
BuildRequires:  perl
BuildRequires:  perl(ExtUtils::Depends) >= 0.2
BuildRequires:  perl(ExtUtils::PkgConfig) >= 1
BuildRequires:  perl(Test::Number::Delta) >= 1
BuildRequires:  perl-macros
BuildRequires:  pkgconfig
BuildRequires:  pkgconfig(cairo)
#
Requires:       perl(ExtUtils::Depends) >= 0.2
Requires:       perl(ExtUtils::PkgConfig) >= 1
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%{perl_requires}

%description
Cairo provides Perl bindings for the vector graphics library cairo.
It supports multiple output targets, including PNG, PDF and SVG.
Cairo produces identical output on all those targets.

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

%build
#disable some randomly failing tests
mv t/Cairo.t t/Cairo.tt
mv t/CairoFont.t t/CairoFont.tt
perl Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}"
make %{?_smp_mflags}

%check
make test

%install
%perl_make_install
### since 11.4 perl_process_packlist
### removes .packlist, perllocal.pod files
%if 0%{?suse_version} > 1130
%perl_process_packlist
%else
# do not perl_process_packlist
# remove .packlist file
rm -f %{buildroot}%perl_vendorarch/auto/Cairo/.packlist
# remove perllocal.pod file
rm -f %{buildroot}%perl_archlib/perllocal.pod
%endif
%perl_gen_filelist

%clean
rm -rf %{buildroot}

%files -f %{name}.files
%defattr(-,root,root,-)
%doc LICENSE NEWS README TODO examples

%changelog
openSUSE Build Service is sponsored by