b43394c
Name:           perl-Gtk2-Ex-FormFactory
b43394c
Version:        0.65
b43394c
Release:        3%{?dist}
b43394c
Summary:        Framework for Gtk2 perl applications
b43394c
b43394c
Group:          Development/Libraries
b43394c
License:        LGPLv2+
b43394c
URL:            http://www.exit1.org/Gtk2-Ex-FormFactory/
b43394c
Source0:        http://www.exit1.org/packages/Gtk2-Ex-FormFactory/dist/Gtk2-Ex-FormFactory-%{version}.tar.gz
b43394c
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
b43394c
b43394c
BuildArch:      noarch
b43394c
BuildRequires:  perl(ExtUtils::MakeMaker)
b43394c
BuildRequires:  perl(Gtk2)
b43394c
b43394c
Requires:  perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
b43394c
b43394c
%description
b43394c
Gtk2::Ex::FormFactory is a framework for Perl Gtk2 developers.
b43394c
b43394c
%prep
b43394c
%setup -q -n Gtk2-Ex-FormFactory-%{version}
b43394c
# Make it so that the .pl scripts in %%doc don't add bogus requirements
b43394c
chmod -x examples/* tutorial/*
b43394c
# Convert encoding
b43394c
for f in $(find lib/ -name *.pm) README tutorial/README; do
b43394c
cp -p ${f} ${f}.noutf8
b43394c
iconv -f ISO-8859-1 -t UTF-8 ${f}.noutf8 > ${f}
b43394c
touch -r ${f}.noutf8 ${f}
b43394c
rm ${f}.noutf8
b43394c
done
b43394c
b43394c
# Filter unwanted Provides:
b43394c
cat << \EOF > %{name}-prov
b43394c
#!/bin/sh
b43394c
%{__perl_provides} $* |\
b43394c
  sed -e '/^perl(Music/d'
b43394c
b43394c
EOF
b43394c
b43394c
%define __perl_provides %{_builddir}/Gtk2-Ex-FormFactory-%{version}/%{name}-prov
b43394c
chmod +x %{name}-prov
b43394c
b43394c
b43394c
%build
b43394c
%{__perl} Makefile.PL INSTALLDIRS=vendor
b43394c
make %{?_smp_mflags}
b43394c
b43394c
b43394c
%install
b43394c
rm -rf $RPM_BUILD_ROOT
b43394c
make pure_install PERL_INSTALL_ROOT=$RPM_BUILD_ROOT
b43394c
find $RPM_BUILD_ROOT -type f -name .packlist -exec rm -f {} ';'
b43394c
b43394c
chmod 644 $RPM_BUILD_ROOT%{_mandir}/man3/*
b43394c
b43394c
b43394c
%check
b43394c
make test
b43394c
b43394c
b43394c
%clean
b43394c
rm -rf $RPM_BUILD_ROOT
b43394c
b43394c
b43394c
%files
b43394c
%defattr(-,root,root,-)
b43394c
%doc Changes examples/ LICENSE README tutorial/
b43394c
%{perl_vendorlib}/Gtk2/
b43394c
%{_mandir}/man3/*.3*
b43394c
b43394c
b43394c
%changelog
b43394c
* Thu May 29 2008 kwizart < kwizart at gmail.com > - 0.65-3
b43394c
- Fix non-utf8 encoding at source.
b43394c
b43394c
* Wed May 28 2008 kwizart < kwizart at gmail.com > - 0.65-2
b43394c
- Fix man3 encoding
b43394c
- Fix unwanted perl provides (Music::*)
b43394c
b43394c
* Wed Apr 30 2008 kwizart < kwizart at gmail.com > - 0.65-1
b43394c
- Update to 0.65
b43394c
- Fix encoding
b43394c
b43394c
* Mon Jan  9 2006 Matthias Saou <http://freshrpms.net/> 0.59-1
b43394c
- Initial RPM package.