#
# Rebuild option:
#
# --with testsuite - run the test suite (requires X)
#
Name: perl-Wx
Version: 0.80
Release: 2%{?dist}
Summary: Interface to the wxWidgets cross-platform GUI toolkit
Group: Development/Libraries
License: GPL+ or Artistic
URL: http://search.cpan.org/dist/Wx/
Source0: http://www.cpan.org/authors/id/M/MB/MBARBON/Wx-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: wxGTK-devel
BuildRequires: perl(Alien::wxWidgets) >= 0.25
BuildRequires: perl(Module::Info)
BuildRequires: perl(Test::Pod)
BuildRequires: perl(YAML) >= 0.35
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
%description
The Wx module is a wrapper for the wxWidgets (formerly known as
wxWindows) GUI toolkit.
This module comes with extensive documentation in HTML format;
you can download it from http://wxperl.sourceforge.net/.
%prep
%setup -q -n Wx-%{version}
chmod -c a-x README.txt docs/todo.txt samples/*/*.pl
find . -type f -name "*.pm" -o -name "*.h" -o -name "*.cpp" |
xargs chmod -c a-x
# Provides: exclude perl(Wx)
cat <<__EOF__ > %{name}-perl.prov
#!/bin/sh
/usr/lib/rpm/perl.prov \$* | grep -v '^perl(Wx)$' | grep -v '^perl(MY)$' | grep -v '^perl(Parse::Yapp::Driver)'
__EOF__
%define __perl_provides %{_builddir}/Wx-%{version}/%{name}-perl.prov
chmod +x %{__perl_provides}
# Requires: exclude unversioned perl(Wx::Wx_Exp)
cat <<__EOF__ > %{name}-perl.req
#!/bin/sh
/usr/lib/rpm/perl.req \$* | grep -v '^perl(Wx::Wx_Exp)$'
__EOF__
%define __perl_requires %{_builddir}/Wx-%{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 Changes README.txt docs/todo.txt wxpl.ico wxpl.xpm
%doc run samples/
%{_bindir}/*
%{perl_vendorarch}/Wx*
%{perl_vendorarch}/auto/Wx/
%{_mandir}/man1/*.1*
%{_mandir}/man3/*.3pm*
%changelog
* Fri Nov 30 2007 Tom "spot" Callaway <tcallawa@redhat.com> - 0.80-2
- fix bogus requires
* Wed Nov 28 2007 Tom "spot" Callaway <tcallawa@redhat.com> - 0.80-1
- bump to 0.80
* Thu Jun 7 2007 Jose Pedro Oliveira <jpo at di.uminho.pt> - 0.74-1
- Update to 0.74.
* Sun Apr 22 2007 Jose Pedro Oliveira <jpo at di.uminho.pt> - 0.73-1
- Update to 0.73.
* Sun Apr 1 2007 Jose Pedro Oliveira <jpo at di.uminho.pt> - 0.72-1
- Update to 0.72.
* Sat Mar 31 2007 Jose Pedro Oliveira <jpo at di.uminho.pt> - 0.71-1
- Update to 0.71.
* Fri Mar 23 2007 Jose Pedro Oliveira <jpo at di.uminho.pt> - 0.70-1
- Update to 0.70.
* Sun Mar 18 2007 Jose Pedro Oliveira <jpo at di.uminho.pt> - 0.69-1
- Update to 0.69.
* Thu Jan 25 2007 Jose Pedro Oliveira <jpo at di.uminho.pt> - 0.67-2
- Filtering out perl(Parse::Yapp::Driver) from the provides list (#224238).
- Filtering out perl(MY) from the provides list.
* Sat Dec 16 2006 Jose Pedro Oliveira <jpo at di.uminho.pt> - 0.67-1
- Update to 0.67.
* Sat Dec 16 2006 Jose Pedro Oliveira <jpo at di.uminho.pt> - 0.66-1
- Update to 0.66.
* Fri Dec 15 2006 Jose Pedro Oliveira <jpo at di.uminho.pt> - 0.65-2
- Rebuild (wxGTK 2.8.0).
* Thu Dec 7 2006 Jose Pedro Oliveira <jpo at di.uminho.pt> - 0.65-1
- Update to 0.65.
* Fri Dec 1 2006 Jose Pedro Oliveira <jpo at di.uminho.pt> - 0.64-1
- Update to 0.64.
* Wed Nov 22 2006 Jose Pedro Oliveira <jpo at di.uminho.pt> - 0.63-1
- Update to 0.63.
* Tue Nov 14 2006 Jose Pedro Oliveira <jpo at di.uminho.pt> - 0.62-1
- Update to 0.62.
* Sat Nov 11 2006 Jose Pedro Oliveira <jpo at di.uminho.pt> - 0.60-1
- Update to 0.60.
* Sat Oct 21 2006 Jose Pedro Oliveira <jpo at di.uminho.pt> - 0.59-1
- Update to 0.59.
* Fri Oct 20 2006 Jose Pedro Oliveira <jpo at di.uminho.pt> - 0.58-1
- Update to 0.58.
* Sun Oct 1 2006 Jose Pedro Oliveira <jpo at di.uminho.pt> - 0.57-2
- Filtered perl(Wx) duplicate provide.
- Corrected several file permission.
* Sun Sep 24 2006 Jose Pedro Oliveira <jpo at di.uminho.pt> - 0.57-1
- Update to 0.57.
* Sun May 14 2006 Jose Pedro Oliveira <jpo at di.uminho.pt> - 0.27-1
- First build.