#
# Rebuild option:
#
# --with testsuite - run the test suite (requires X)
#
Name: perl-Gtk2
Version: 1.144
Release: 1%{?dist}
Summary: Perl interface to the 2.x series of the Gimp Toolkit library
Group: Development/Libraries
License: LGPL
URL: http://search.cpan.org/dist/Gtk2/
Source0: http://www.cpan.org/authors/id/T/TS/TSCH/Gtk2-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: perl >= 2:5.8.0
BuildRequires: gtk2-devel
BuildRequires: perl(ExtUtils::Depends), perl(ExtUtils::PkgConfig)
BuildRequires: perl(Glib) >= 1.140
BuildRequires: perl(Cairo) >= 1.00
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
Requires: perl(Glib) >= 1.140
Requires: perl(Cairo) >= 1.00
%description
This module allows you to write Gtk+ 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. Find out more about Gtk+ at http://www.gtk.org.
%prep
%setup -q -n Gtk2-%{version}
iconv -f iso-8859-1 -t utf-8 -o pm/Helper.pm{.utf8,}
mv pm/Helper.pm{.utf8,}
# Provides: exclude perl(main)
cat <<__EOF__ > %{name}-perl.prov
#!/bin/sh
/usr/lib/rpm/perl.prov \$* | grep -v '^perl(main)$'
__EOF__
%define __perl_provides %{_builddir}/Gtk2-%{version}/%{name}-perl.prov
chmod +x %{__perl_provides}
# Requires: exclude unversioned perl(Glib)
cat <<__EOF__ > %{name}-perl.req
#!/bin/sh
/usr/lib/rpm/perl.req \$* | grep -v '^perl(Glib)$'
__EOF__
%define __perl_requires %{_builddir}/Gtk2-%{version}/%{name}-perl.req
chmod +x %{__perl_requires}
%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 -depth -type d -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 AUTHORS ChangeLog LICENSE NEWS README TODO
%doc examples/ gtk-demo/
%{perl_vendorarch}/auto/Gtk2/
%{perl_vendorarch}/Gtk2*
%{_mandir}/man3/*.3pm*
%changelog
* Sun Mar 18 2007 Jose Pedro Oliveira <jpo at di.uminho.pt> - 1.144-1
- Update to 1.144.
* Mon Feb 26 2007 Jose Pedro Oliveira <jpo at di.uminho.pt> - 1.143-1
- Update to 1.143.
* Sun Jan 21 2007 Jose Pedro Oliveira <jpo at di.uminho.pt> - 1.142-1
- Update to 1.142.
* Wed Nov 22 2006 Jose Pedro Oliveira <jpo at di.uminho.pt> - 1.141-1
- Update to 1.141.
* Wed Sep 6 2006 Jose Pedro Oliveira <jpo at di.uminho.pt> - 1.140-1
- Update to 1.140.
* Mon May 29 2006 Jose Pedro Oliveira <jpo at di.uminho.pt> - 1.122-1
- Update to 1.122.
* Mon May 1 2006 Jose Pedro Oliveira <jpo at di.uminho.pt> - 1.121-2
- Requires perl(Cairo) (distro >= FC-5).
* Tue Apr 11 2006 Jose Pedro Oliveira <jpo at di.uminho.pt> - 1.121-1
- Update to 1.121.
* Tue Mar 14 2006 Jose Pedro Oliveira <jpo at di.uminho.pt> - 1.120-1
- Update to 1.120.
* Mon Feb 20 2006 Jose Pedro Oliveira <jpo at di.uminho.pt> - 1.104-1
- Update to 1.104.
- Requires perl(Glib) >= 1.105 (1.104 had problems with perl 5.8.8).
* Thu Jan 19 2006 Jose Pedro Oliveira <jpo at di.uminho.pt> - 1.103-1
- Update to 1.103.
- Converted the Gtk2::Helper man page to utf8 (#177802).
- Provides list: filtered out perl(main) (#177802).
* Wed Nov 30 2005 Jose Pedro Oliveira <jpo at di.uminho.pt> - 1.102-1
- Update to 1.102.
* Thu Oct 6 2005 Jose Pedro Oliveira <jpo at di.uminho.pt> - 1.101-1
- Update to 1.101.
* Thu Sep 8 2005 Jose Pedro Oliveira <jpo at di.uminho.pt> - 1.100-1
- Update to 1.100.
* Fri Jul 29 2005 Jose Pedro Oliveira <jpo at di.uminho.pt> - 1.083-1
- Update to 1.083.
* Mon Jun 27 2005 Jose Pedro Oliveira <jpo at di.uminho.pt> - 1.082-1
- Update to 1.082.
* Fri Apr 7 2005 Michael Schwendt <mschwendt[AT]users.sf.net>
- rebuilt
* Thu Mar 10 2005 Jose Pedro Oliveira <jpo at di.uminho.pt> - 1.080-2
- Use perl-Glib for versioning control (patch by Ville Skyttä).
* Tue Mar 8 2005 Jose Pedro Oliveira <jpo at di.uminho.pt> - 1.080-1
- Update to 1.080.
* Tue Feb 15 2005 Jose Pedro Oliveira <jpo at di.uminho.pt> - 0:1.062-1
- Update to 1.062.
* Mon Oct 25 2004 Jose Pedro Oliveira <jpo at di.uminho.pt> - 0:1.061-0.fdr.2
- Removed irrelevant or duplicated documentation files.
- Description simplified (as suggested by Ville Skyttä).
* Tue Oct 5 2004 Jose Pedro Oliveira <jpo at di.uminho.pt> - 0:1.061-0.fdr.1
- Update to 1.061.
* Tue Oct 5 2004 Jose Pedro Oliveira <jpo at di.uminho.pt> - 0:1.043-0.fdr.2
- make test commented: needs X.
* Sun Jul 18 2004 Jose Pedro Oliveira <jpo at di.uminho.pt> - 0:1.043-0.fdr.1
- First build.