Commit some spec tweaks that had been kicking around for a while
Sat May 19 2007 Chris Weyl <cweyl@alumni.drew.edu> - spec cleanups, tweaks - add t/ to doc - move away from macroized versioning system - no rebuild at this point
This commit is contained in:
parent
bceaedfb48
commit
23e803bd47
138
perl-POE.spec
138
perl-POE.spec
@ -1,90 +1,92 @@
|
||||
# Note we make a distinction here due to rpm versioning, and keep them both up
|
||||
# here to make things easier
|
||||
%define cpanver 0.9989
|
||||
%define rpmver 0.9989
|
||||
|
||||
Name: perl-POE
|
||||
Version: %{rpmver}
|
||||
Version: 0.9989
|
||||
Release: 1%{?dist}
|
||||
Summary: POE - portable multitasking and networking framework for Perl
|
||||
|
||||
Group: Development/Libraries
|
||||
License: GPL or Artistic
|
||||
URL: http://search.cpan.org/dist/POE/
|
||||
Source0: http://search.cpan.org/CPAN/authors/id/R/RC/RCAPUTO/POE-%{cpanver}.tar.gz
|
||||
Source0: http://search.cpan.org/CPAN/authors/id/R/RC/RCAPUTO/POE-%{version}.tar.gz
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
|
||||
# there's some perl-foo that goes on, automagically translating
|
||||
# POE::Resource::Bar -> POE::Resources::Bar. Let's account for that here.
|
||||
# also nix errant versionless provides.
|
||||
Source98: filter-provides.sh
|
||||
%define __perl_provides %{SOURCE98}
|
||||
|
||||
Source99: filter-requires.sh
|
||||
%define __perl_requires %{SOURCE99}
|
||||
|
||||
|
||||
BuildArch: noarch
|
||||
BuildRequires: perl, perl(ExtUtils::MakeMaker)
|
||||
BuildRequires: perl(Tk) >= 800.027, perl(URI) >= 1.30, perl(Socket6) >= 0.14
|
||||
BuildRequires: perl(LWP) >= 5.79, perl(Curses) >= 1.08
|
||||
BuildRequires: perl(IO::Pty) >= 1.02, perl(Term::ReadKey) >= 2.21
|
||||
# waiting for update BZ#194521
|
||||
#BuildRequires: perl(Gtk) >= 0.7009
|
||||
BuildRequires: perl(IO::Poll) >= 0.01, perl(Term::Cap) >= 1.09,
|
||||
BuildRequires: perl(IO::Pty), perl(Test::Pod), perl(Test::Pod::Coverage)
|
||||
BuildRequires: perl(Compress::Zlib) >= 1.33, perl(Event) >= 1.00
|
||||
BuildArch: noarch
|
||||
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
|
||||
|
||||
# core
|
||||
BuildRequires: perl(ExtUtils::MakeMaker)
|
||||
BuildRequires: perl(Test::More)
|
||||
# cpan
|
||||
BuildRequires: perl(Compress::Zlib) >= 1.33
|
||||
BuildRequires: perl(Curses) >= 1.08
|
||||
BuildRequires: perl(IO::Poll) >= 0.01
|
||||
BuildRequires: perl(IO::Pty)
|
||||
BuildRequires: perl(Event) >= 1.00
|
||||
BuildRequires: perl(IO::Pty) >= 1.02
|
||||
BuildRequires: perl(LWP) >= 5.79
|
||||
BuildRequires: perl(Socket6) >= 0.14
|
||||
BuildRequires: perl(Term::Cap) >= 1.09
|
||||
BuildRequires: perl(Term::ReadKey) >= 2.21
|
||||
BuildRequires: perl(Tk) >= 800.027
|
||||
BuildRequires: perl(URI) >= 1.30
|
||||
# waiting for update BZ#194521
|
||||
#BuildRequires: perl(Gtk) >= 0.7009
|
||||
# test
|
||||
BuildRequires: perl(Test::Pod)
|
||||
BuildRequires: perl(Test::Pod::Coverage)
|
||||
|
||||
# not picked up automatically
|
||||
Requires: perl(Socket6), perl(Event), perl(IO::Pty), perl(Compress::Zlib)
|
||||
Requires: perl(Compress::Zlib)
|
||||
Requires: perl(Event)
|
||||
Requires: perl(IO::Pty)
|
||||
Requires: perl(Socket6)
|
||||
|
||||
%description
|
||||
POE is a framework for cooperative, event driven multitasking in Perl. Other
|
||||
languages have similar frameworks. Python has Twisted. TCL has "the event
|
||||
loop".
|
||||
POE is a framework for cooperative, event driven multitasking in Perl.
|
||||
Other languages have similar frameworks. Python has Twisted. TCL has "the
|
||||
event loop".
|
||||
|
||||
POE originally was developed as the core of a persistent object server and
|
||||
runtime environment. It has evolved into a general purpose multitasking and
|
||||
networking framework, encompassing and providing a consistent interface to
|
||||
other event loops such as Event and the Tk and Gtk toolkits.
|
||||
runtime environment. It has evolved into a general purpose multitasking
|
||||
and networking framework, encompassing and providing a consistent interface
|
||||
to other event loops such as Event and the Tk and Gtk toolkits.
|
||||
|
||||
POE is written in layers, each building upon the previous. It's therefore
|
||||
possible to use POE at varying levels of abstraction.
|
||||
|
||||
The lowest level uses POE::Kernel and POE::Session. The former class acts as
|
||||
POE's event watcher and dispatcher. The latter encapsulates the notion of an
|
||||
event driven task.
|
||||
|
||||
POE::Wheel classes operate at a slightly higher level. They plug into sessions
|
||||
and perform very common, general tasks. For example, POE::Wheel::ReadWrite
|
||||
performs buffered I/O.
|
||||
|
||||
Unlike cheese, wheels do not stand alone. They are customized by POE::Driver
|
||||
and POE::Filter classes. Using the proper filter, a ReadWrite wheel can read
|
||||
and write streams, lines, fixed-length blocks, HTTP requests and responses,
|
||||
and so on.
|
||||
|
||||
The highest level of POE programming uses components. They may perform
|
||||
narrowly defined tasks, such as POE::Component::Child (on the CPAN). Often
|
||||
they encapsulate nearly everything necessary for an entire program.
|
||||
|
||||
Every level eventually boils down to the lowest common
|
||||
denominator---POE::Kernel and POE::Session. Because of this, classes coexist
|
||||
and cooperate at every level of abstraction.
|
||||
|
||||
%prep
|
||||
%setup -q -n POE-%{cpanver}
|
||||
%setup -q -n POE-%{version}
|
||||
|
||||
# execute + doc == bad
|
||||
chmod -x examples/*
|
||||
# make rpmlint happy...
|
||||
chmod -c -x examples/*
|
||||
find t/ -type f -exec chmod -c -x {} +
|
||||
find t/ -type f -name '*.t' -exec perl -pi -e 's|^#!perl|#!/usr/bin/perl|' {} +
|
||||
|
||||
# Filter unwanted Provides:
|
||||
cat << \EOF > %{name}-prov
|
||||
#!/bin/sh
|
||||
%{__perl_provides} $* |\
|
||||
sed -e '/perl(POE::Kernel)/d; /perl(POE::Loop::Tk)/d'
|
||||
EOF
|
||||
|
||||
%define __perl_provides %{_builddir}/POE-%{version}/%{name}-prov
|
||||
chmod +x %{__perl_provides}
|
||||
|
||||
# Filter unwanted Requires:
|
||||
cat << \EOF > %{name}-req
|
||||
#!/bin/sh
|
||||
%{__perl_requires} $* |\
|
||||
sed -e '/perl(Tk)/d; /perl(Test::More)/d; /perl(lib)/d'
|
||||
EOF
|
||||
|
||||
%define __perl_requires %{_builddir}/POE-%{version}/%{name}-req
|
||||
chmod +x %{__perl_requires}
|
||||
|
||||
|
||||
%build
|
||||
%{__perl} Makefile.PL INSTALLDIRS=vendor --default
|
||||
|
||||
# yah. don't do the network tests
|
||||
rm run_network_tests
|
||||
%{?!_with_network_tests: rm run_network_tests }
|
||||
|
||||
make %{?_smp_mflags}
|
||||
|
||||
@ -93,18 +95,16 @@ make %{?_smp_mflags}
|
||||
rm -rf %{buildroot}
|
||||
|
||||
make pure_install PERL_INSTALL_ROOT=%{buildroot}
|
||||
find %{buildroot} -type f -name .packlist -exec rm -f {} ';'
|
||||
find %{buildroot} -type f -name .packlist -exec rm -f {} +
|
||||
find %{buildroot} -type d -depth -exec rmdir {} 2>/dev/null ';'
|
||||
|
||||
%{_fixperms} %{buildroot}/*
|
||||
|
||||
|
||||
%check
|
||||
# this test fails under plague. Not quite sure why....
|
||||
# these tests fails under plague. Not quite sure why....
|
||||
mv t/90_regression/rt1648-tied-stderr.t .
|
||||
|
||||
# ditto here
|
||||
rm t/30_loops/50_tk/wheel_run.t
|
||||
mv t/30_loops/50_tk/wheel_run.t .
|
||||
|
||||
# enable POD tests
|
||||
#export POE_TEST_POD=1
|
||||
@ -115,6 +115,8 @@ rm t/30_loops/50_tk/wheel_run.t
|
||||
# Reported upstream at http://rt.cpan.org/Public/Bug/Display.html?id=19878
|
||||
make test
|
||||
|
||||
mv rt1648-tied-stderr.t t/90_regression/
|
||||
mv wheel_run.t t/30_loops/50_tk/
|
||||
|
||||
%clean
|
||||
rm -rf %{buildroot}
|
||||
@ -122,12 +124,18 @@ rm -rf %{buildroot}
|
||||
|
||||
%files
|
||||
%defattr(-,root,root,-)
|
||||
%doc CHANGES HISTORY README examples/ TODO rt1648-tied-stderr.t
|
||||
%doc CHANGES HISTORY README examples/ TODO t/
|
||||
%{perl_vendorlib}/*
|
||||
%{_mandir}/man3/*.3*
|
||||
|
||||
|
||||
%changelog
|
||||
* Sat May 19 2007 Chris Weyl <cweyl@alumni.drew.edu>
|
||||
- spec cleanups, tweaks
|
||||
- add t/ to doc
|
||||
- move away from macroized versioning system
|
||||
- no rebuild at this point
|
||||
|
||||
* Fri Mar 23 2007 Chris Weyl <cweyl@alumni.drew.edu> 0.9989-1
|
||||
- update to 0.9989
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user