File perl-GD.spec of Package perl-GD

#
# spec file for package perl-GD
#
# Copyright (c) 2015 SUSE LINUX 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-GD
Version:        2.56
Release:        0
%define cpan_name GD
Summary:        Interface to Gd Graphics Library
License:        Artistic-1.0 or GPL-1.0+
Group:          Development/Libraries/Perl
Url:            http://search.cpan.org/dist/GD/
Source0:        http://www.cpan.org/authors/id/L/LD/LDS/%{cpan_name}-%{version}.tar.gz
Source1:        cpanspec.yml
Patch0:         GD-cflags.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  perl
BuildRequires:  perl-macros
BuildRequires:  perl(ExtUtils::CBuilder)
BuildRequires:  perl(Module::Build) >= 0.420000
%{perl_requires}
# MANUAL BEGIN
BuildRequires:  freetype2-devel
BuildRequires:  gd-devel >= 2.0.28
BuildRequires:  libjpeg-devel
BuildRequires:  libpng-devel
BuildRequires:  libtiff-devel
BuildRequires:  libvpx-devel
BuildRequires:  xorg-x11-devel
Requires:       gd
# MANUAL END

%description
*GD.pm* is a Perl interface to Thomas Boutell's gd graphics library
(version 2.01 or higher; see below). GD allows you to create color drawings
using a large number of graphics primitives, and emit the drawings as PNG
files.

%prep
%setup -q -n %{cpan_name}-%{version}
find . -type f -print0 | xargs -0 chmod 644
%patch0 -p1

%build
%{__perl} Build.PL installdirs=vendor optimize="%{optflags}"
./Build build flags=%{?_smp_mflags}

%check
# MANUAL no testing (see https://rt.cpan.org/Public/Bug/Display.html?id=85789)
#./Build test

%install
./Build install destdir=%{buildroot} create_packlist=0
# MANUAL BEGIN
mv %{buildroot}%{_bindir}/bdftogd{,.perl-gd}
#sed on %{name}.files
# MANUAL END
%perl_gen_filelist

%files -f %{name}.files
%defattr(-,root,root,755)
%doc bdf_scripts ChangeLog demos LICENSE Makefile.old README README.QUICKDRAW

%changelog
openSUSE Build Service is sponsored by