File perl-Gtk2.spec of Package perl-Gtk2
#
# spec file for package perl-Gtk2
#
# 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/
#
# norootforbuild
Name: perl-Gtk2
%define cpan_name Gtk2
Summary: Perl interface to the 2.x series of the Gimp Toolkit library
Version: 1.222
Release: 5
License: LGPLv2.1+
Group: Development/Libraries/Perl
Url: http://search.cpan.org/dist/Gtk2/
#Source: http://www.cpan.org/modules/by-module/Gtk2/Gtk2-%{version}.tar.gz
Source: %{cpan_name}-%{version}.tar.bz2
Patch0: takeouttests.diff
Patch1: builder_test_disable.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%{perl_requires}
BuildRequires: gtk2-devel update-desktop-files
BuildRequires: xorg-x11
BuildRequires: xorg-x11-Xvfb
BuildRequires: xorg-x11-server
BuildRequires: perl
BuildRequires: perl-macros
BuildRequires: perl(Cairo) >= 1.000
BuildRequires: perl(ExtUtils::Depends) >= 0.300
BuildRequires: perl(ExtUtils::PkgConfig) >= 1.03
BuildRequires: perl(Glib) >= 1.220
BuildRequires: perl(Pango) >= 1.220
Requires: perl(Cairo) >= 1.000
Requires: perl(ExtUtils::Depends) >= 0.300
Requires: perl(ExtUtils::PkgConfig) >= 1.03
Requires: perl(Glib) >= 1.220
Requires: perl(Pango) >= 1.220
%description
Perl bindings to the 2.x series of the Gtk+ widget set. This module
allows you to write graphical user interfaces in a perlish and
object-oriented way, freeing you from the casting and memory management
in C, yet remaining very close in spirit to original API.
%prep
%setup -q -n %{cpan_name}-%{version}
%patch0 -p1
%patch1 -p0
%build
%{__perl} Makefile.PL INSTALLDIRS=vendor OPTIMIZE="$RPM_OPT_FLAGS"
%{__make} %{?_smp_mflags}
%check
Xvfb :95 &
trap "kill $! || true" EXIT
sleep 5
DISPLAY=:95 %{__make} test
%install
%perl_make_install
%perl_process_packlist
%perl_gen_filelist
%clean
%{__rm} -rf $RPM_BUILD_ROOT
%files -f %{name}.files
%defattr(-,root,root,-)
%doc AUTHORS LICENSE NEWS README TODO examples gtk-demo tools
%changelog