Blob Blame History Raw
Name:           perl-Event
Version:        1.09
Release:        1%{?dist}
Summary:        Event loop processing

Group:          Development/Libraries
License:        Artistic or GPL
URL:            http://search.cpan.org/dist/Event/ 
Source0:        http://search.cpan.org/CPAN/authors/id/J/JP/JPRIT/Event-%{version}.tar.gz
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Requires:  perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))

# non-perl
BuildRequires:  /usr/bin/iconv
# core
BuildRequires:  perl(ExtUtils::MakeMaker)
BuildRequires:  perl(Time::HiRes)

Requires:       perl(Time::HiRes)

%description
The Event module provide a central facility to watch for various types of
events and invoke a callback when these events occur. The idea is to delay the
handling of events so that they may be dispatched in priority order when it is
safe for callbacks to execute.


%prep
%setup -q -n Event-%{version} 

# generate our two licenses...
perldoc perlgpl      > LICENSE.GPL
perldoc perlartistic > LICENSE.Artistic

# appease rpmlint :) 
find . -type f -exec chmod -c -x {} +
%{_fixperms} demo util
find t/ -type f -exec perl -pi -e 's|^#!\./perl|#!/usr/bin/perl|' {} +

# fix some other interperter issues..
cd demo
perl -pi -e 's|#!./perl|#!/usr/bin/perl|' *.t ../util/bench.pl


%build
%{__perl} Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}"
make %{?_smp_mflags}

# not implemented yet, so lets avoid deps
cd demo
for i in *.pm ; do
    mv $i $i.unimplemented
done

# make sure the man page is UTF-8...
cd ../blib/man3 
iconv --from=ISO-8859-1 --to=UTF-8 Event.3pm > Event.3pm.new
mv Event.3pm.new Event.3pm

%install
rm -rf %{buildroot}

make pure_install PERL_INSTALL_ROOT=%{buildroot}
find %{buildroot} -type f -name .packlist -exec rm -f {} +
find %{buildroot} -type f -name '*.bs' -a -size 0 -exec rm -f {} +
find %{buildroot} -type d -depth -exec rmdir --ignore-fail-on-non-empty {} +

%{_fixperms} %{buildroot}/*


%check
make test


%clean
rm -rf %{buildroot}


%files
%defattr(-,root,root,-)
%doc ANNOUNCE TODO README Tutorial.pdf ChangeLog demo/ util/ LICENSE* INSTALL
%doc t/
%{perl_vendorarch}/auto/Event
%{perl_vendorarch}/Event*
%{_mandir}/man3/*.3*


%changelog
* Fri Jun 01 2007 Chris Weyl <cweyl@alumni.drew.edu> 1.09-1
- update to 1.09
- add t/ to doc

* Sat Nov 04 2006 Chris Weyl <cweyl@alumni.drew.edu> 1.08-1
- update to 1.08

* Sun Oct 15 2006 Chris Weyl <cweyl@alumni.drew.edu> 1.07-1
- update to 1.07

* Thu Aug 31 2006 Chris Weyl <cweyl@alumni.drew.edu> 1.06-2
- bump for mass rebuild

* Wed Jun 14 2006 Chris Weyl <cweyl@alumni.drew.edu> 1.06-1
- add explicit provides: perl(Event) = version...  wasn't being picked up
  automagically for some reason
- Tweaked summary line
- Bumped release

* Thu Jun 08 2006 Chris Weyl <cweyl@alumni.drew.edu> 1.06-0
- initial spec file for F-E