Update to 7.0
- Update to 7.0
- Package generates no debuginfo, so avoid creation of debuginfo sub-package
- Add explicit build requirements for the module's needs
- Add build requirements for as much event loop testing as is possible in
  Fedora, breaking potential build dependency cycles by use of the
  %{perl_bootstrap} macro
- Clean up spec for modern rpmbuild:
  - Drop %defattr, redundant since rpm 4.4
  - Use DESTDIR rather than PERL_INSTALL_ROOT
  - Drop buildroot definition and cleaning
  - Drop requires/provides filters for rpm versions prior to 4.9
- Simplify requires/provides filtering
- Explicitly require perl(Task::Weaken) as per upstream recommendation
			
			
This commit is contained in:
		
							parent
							
								
									e58dcc0ba8
								
							
						
					
					
						commit
						9ee0873160
					
				
							
								
								
									
										6
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										6
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							| @ -1,5 +1 @@ | ||||
| AnyEvent-5.261.tar.gz | ||||
| /AnyEvent-5.271.tar.gz | ||||
| /AnyEvent-5.34.tar.gz | ||||
| /AnyEvent-6.13.tar.gz | ||||
| /AnyEvent-6.14.tar.gz | ||||
| /AnyEvent-[0-9.]*.tar.gz | ||||
|  | ||||
| @ -1,48 +1,92 @@ | ||||
| #global subver 1 | ||||
| 
 | ||||
| Name:           perl-AnyEvent | ||||
| Version:        6.14 | ||||
| Release:        2%{?dist} | ||||
| Summary:        Framework for multiple event loops | ||||
| # A noarch-turned-arch package should not have debuginfo | ||||
| %global debug_package %{nil} | ||||
| 
 | ||||
| Name:           perl-AnyEvent | ||||
| Version:        7.0 | ||||
| Release:        1%{?dist} | ||||
| Summary:        Framework for multiple event loops | ||||
| Group:          Development/Libraries | ||||
| License:        GPL+ or Artistic | ||||
| URL:            http://search.cpan.org/dist/AnyEvent/ | ||||
| Source0:        http://search.cpan.org/CPAN/authors/id/M/ML/MLEHMANN/AnyEvent-%{version}%{?subver}.tar.gz | ||||
| BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) | ||||
| 
 | ||||
| #FYI this went arch specific since 6.14 | ||||
| #BuildArch:      noarch | ||||
| # Build requirements | ||||
| BuildRequires:  perl(ExtUtils::MakeMaker) | ||||
| #Default recommanded loop | ||||
| 
 | ||||
| # Module requirements | ||||
| BuildRequires:  perl >= 3:5.8.1 | ||||
| BuildRequires:  perl(base) | ||||
| BuildRequires:  perl(Carp) | ||||
| BuildRequires:  perl(Exporter) | ||||
| BuildRequires:  perl(List::Util) | ||||
| BuildRequires:  perl(Scalar::Util) | ||||
| BuildRequires:  perl(Socket) | ||||
| BuildRequires:  perl(Task::Weaken) | ||||
| BuildRequires:  perl(Time::HiRes) | ||||
| 
 | ||||
| # Test suite requirements | ||||
| BuildRequires:  perl(Net::SSLeay) | ||||
| BuildRequires:  perl(Test::More) | ||||
| 
 | ||||
| # Event loop testing | ||||
| # | ||||
| # Many of these modules require or build-require AnyEvent themselves, | ||||
| # so don't do event loop testing when bootstrapping | ||||
| # | ||||
| # Cocoa and FLTK are not in Fedora/EPEL | ||||
| # Version of IO::Async::Loop in Fedora is too old | ||||
| # TODO: BuildRequires: perl(IO::Async::Loop) >= 0.33 | ||||
| # Test suite does not currently test the Qt event loop | ||||
| %if 0%{!?perl_bootstrap:1} | ||||
| BuildRequires:  perl(AnyEvent::AIO) | ||||
| BuildRequires:  perl(EV) | ||||
| # Needed for test | ||||
| BuildRequires:  perl(Test::Simple) | ||||
| BuildRequires:  perl(Event) | ||||
| BuildRequires:  perl(Event::Lib) | ||||
| BuildRequires:  perl(Glib) >= 1.210 | ||||
| BuildRequires:  perl(IO::AIO) >= 4.13 | ||||
| BuildRequires:  perl(POE) >= 1.312 | ||||
| BuildRequires:  perl(Tk) | ||||
| %endif | ||||
| 
 | ||||
| # RPM 4.8 style | ||||
| %{?filter_setup: | ||||
| %filter_from_requires /perl(Tk)/d; /perl(EV)/d; /perl(Irssi)/d; /perl(Qt/d; /perl(IO::Async::Loop/d; /perl(AnyEvent::Impl::Qt/d; /perl(FLTK/d; /perl(Cocoa/d; | ||||
| %filter_from_provides /perl(AnyEvent::Impl::Cocoa/d | ||||
| %filter_setup | ||||
| } | ||||
| # RPM 4.9 style | ||||
| %global __requires_exclude %{?__requires_exclude:__requires_exclude|}perl(Tk) | ||||
| %global __requires_exclude %__requires_exclude|perl(EV) | ||||
| %global __requires_exclude %__requires_exclude|perl(Irssi) | ||||
| %global __requires_exclude %__requires_exclude|perl(Qt | ||||
| %global __requires_exclude %__requires_exclude|perl(AnyEvent::Impl::Cocoa | ||||
| %global __requires_exclude %__requires_exclude|perl(Cocoa | ||||
| %global __requires_exclude %__requires_exclude|perl(FLTK | ||||
| %global __requires_exclude %__requires_exclude|perl(IO::Async::Loop | ||||
| %global __provides_exclude %{?__provides_exclude:__provides_exclude|}perl(AnyEvent::Impl::Cocoa | ||||
| # Runtime requires | ||||
| Requires:       perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version)) | ||||
| # Optional but recommended | ||||
| Requires:       perl(Task::Weaken) | ||||
| 
 | ||||
| # Optional dependencies we don't want to require | ||||
| %global optional_deps                  AnyEvent::AIO | ||||
| %global optional_deps %{optional_deps}|Cocoa::EventLoop | ||||
| %global optional_deps %{optional_deps}|EV | ||||
| %global optional_deps %{optional_deps}|Event | ||||
| %global optional_deps %{optional_deps}|Event::Lib | ||||
| %global optional_deps %{optional_deps}|EventLoop | ||||
| %global optional_deps %{optional_deps}|FLTK | ||||
| %global optional_deps %{optional_deps}|Glib | ||||
| %global optional_deps %{optional_deps}|IO::AIO | ||||
| %global optional_deps %{optional_deps}|IO::Async::Loop | ||||
| %global optional_deps %{optional_deps}|Irssi | ||||
| %global optional_deps %{optional_deps}|POE | ||||
| %global optional_deps %{optional_deps}|Qt | ||||
| %global optional_deps %{optional_deps}|Qt::isa | ||||
| %global optional_deps %{optional_deps}|Qt::slots | ||||
| %global optional_deps %{optional_deps}|Tk | ||||
| 
 | ||||
| # Don't include optional dependencies | ||||
| %global __requires_exclude ^perl[(](%{optional_deps})[)] | ||||
| 
 | ||||
| # Filter unversioned and bogus provides | ||||
| # AnyEvent::Impl::Cocoa and AnyEvent::Impl::FLTK are filtered as the required | ||||
| # underlying modules are not currently available in Fedora | ||||
| %global __provides_exclude ^perl[(](AnyEvent(::Impl::(Cocoa|FLTK))?|DB)[)]$ | ||||
| 
 | ||||
| Requires:  perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) | ||||
| 
 | ||||
| %description | ||||
| AnyEvent provides an identical interface to multiple event loops. This | ||||
| allows module authors to utilise an event loop without forcing module users | ||||
| to use the same event loop (as only a single event loop can coexist | ||||
| peacefully at any one time). | ||||
| AnyEvent provides an identical interface to multiple event loops. This allows | ||||
| module authors to utilize an event loop without forcing module users to use the | ||||
| same event loop (as multiple event loops cannot coexist peacefully at any one | ||||
| time). | ||||
| 
 | ||||
| 
 | ||||
| %prep | ||||
| @ -50,29 +94,23 @@ peacefully at any one time). | ||||
| 
 | ||||
| 
 | ||||
| %build | ||||
| %{__perl} Makefile.PL INSTALLDIRS=vendor | ||||
| perl Makefile.PL INSTALLDIRS=vendor | ||||
| make %{?_smp_mflags} | ||||
| 
 | ||||
| 
 | ||||
| %install | ||||
| rm -rf $RPM_BUILD_ROOT | ||||
| make pure_install PERL_INSTALL_ROOT=$RPM_BUILD_ROOT | ||||
| make pure_install DESTDIR=$RPM_BUILD_ROOT | ||||
| find $RPM_BUILD_ROOT -type f -name .packlist -exec rm -f {} ';' | ||||
| 
 | ||||
| 
 | ||||
| %check | ||||
| # PERL_ANYEVENT_NET_TESTS shoudn't be set to avoid network tests | ||||
| # PERL_ANYEVENT_NET_TESTS shouldn't be set to avoid network tests | ||||
| # on our builder. | ||||
| export PERL_ANYEVENT_LOOP_TESTS=1 | ||||
| make test | ||||
| 
 | ||||
| 
 | ||||
| %clean | ||||
| rm -rf $RPM_BUILD_ROOT | ||||
| 
 | ||||
| 
 | ||||
| %files | ||||
| %defattr(-,root,root,-) | ||||
| %doc Changes COPYING README | ||||
| %{perl_vendorarch}/AE.pm | ||||
| %{perl_vendorarch}/AnyEvent* | ||||
| @ -80,6 +118,21 @@ rm -rf $RPM_BUILD_ROOT | ||||
| 
 | ||||
| 
 | ||||
| %changelog | ||||
| * Thu Apr 26 2012 Paul Howarth <paul@city-fan.org> - 7.0-1 | ||||
| - Update to 7.0 | ||||
| - Package generates no debuginfo, so avoid creation of debuginfo sub-package | ||||
| - Add explicit build requirements for the module's needs | ||||
| - Add build requirements for as much event loop testing as is possible in | ||||
|   Fedora, breaking potential build dependency cycles by use of the | ||||
|   %%{perl_bootstrap} macro | ||||
| - Clean up spec for modern rpmbuild: | ||||
|   - Drop %%defattr, redundant since rpm 4.4 | ||||
|   - Use DESTDIR rather than PERL_INSTALL_ROOT | ||||
|   - Drop buildroot definition and cleaning | ||||
|   - Drop requires/provides filters for rpm versions prior to 4.9 | ||||
| - Simplify requires/provides filtering | ||||
| - Explicitly require perl(Task::Weaken) as per upstream recommendation | ||||
| 
 | ||||
| * Mon Apr 23 2012 Nicolas Chauvet <kwizart@gmail.com> - 6.14-2 | ||||
| - Filter requires perl(FLTK) perl(Cocoa) - rhbz#815496 | ||||
| - Filter perl(IO::Async::Loop) to reintroduce later. | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user