Conditionalize POE support

This commit is contained in:
Petr Písař 2021-01-26 15:14:52 +01:00
parent c03ab554db
commit ca6f39e9e6

View File

@ -1,5 +1,12 @@
#global subver 1
# Support POE
%if 0%{?rhel} >= 9
%bcond_with perl_AnyEvent_enables_POE
%else
%bcond_without perl_AnyEvent_enables_POE
%endif
# A noarch-turned-arch package should not have debuginfo
%global debug_package %{nil}
@ -8,7 +15,7 @@
Name: perl-AnyEvent
Version: 7.17
Release: 5%{?dist}
Release: 6%{?dist}
Summary: Framework for multiple event loops
License: GPL+ or Artistic
URL: https://metacpan.org/release/AnyEvent
@ -63,7 +70,9 @@ BuildRequires: perl(warnings)
%if 0%{!?perl_bootstrap:1}
BuildRequires: perl(Event)
BuildRequires: perl(Glib) >= 1.210
%if %{with perl_AnyEvent_enables_POE}
BuildRequires: perl(POE) >= 1.312
%endif
BuildRequires: perl(Tk)
%if 0%{?fedora}
BuildRequires: perl(AnyEvent::AIO)
@ -109,7 +118,9 @@ Requires: perl(Unicode::Normalize)
%global optional_deps %{optional_deps}|IO::AIO
%global optional_deps %{optional_deps}|IO::Async::Loop
%global optional_deps %{optional_deps}|Irssi
%if %{with perl_AnyEvent_enables_POE}
%global optional_deps %{optional_deps}|POE
%endif
%global optional_deps %{optional_deps}|Qt
%global optional_deps %{optional_deps}|Qt::isa
%global optional_deps %{optional_deps}|Qt::slots
@ -145,6 +156,10 @@ make %{?_smp_mflags}
make pure_install DESTDIR=%{buildroot}
find %{buildroot} -type f -name .packlist -delete
%{_fixperms} -c %{buildroot}
%if !%{with perl_AnyEvent_enables_POE}
rm %{buildroot}%{perl_vendorarch}/AnyEvent/Impl/POE.pm
rm %{buildroot}%{_mandir}/man3/AnyEvent::Impl::POE.3*
%endif
%check
@ -159,7 +174,42 @@ make test
%doc Changes README
%{perl_vendorarch}/AE.pm
%{perl_vendorarch}/AnyEvent.pm
%{perl_vendorarch}/AnyEvent/
%dir %{perl_vendorarch}/AnyEvent/
%{perl_vendorarch}/AnyEvent/constants.pl
%{perl_vendorarch}/AnyEvent/DNS.pm
%{perl_vendorarch}/AnyEvent/Debug.pm
%{perl_vendorarch}/AnyEvent/FAQ.pod
%{perl_vendorarch}/AnyEvent/Handle.pm
%dir %{perl_vendorarch}/AnyEvent/Impl
%{perl_vendorarch}/AnyEvent/Impl/Cocoa.pm
%{perl_vendorarch}/AnyEvent/Impl/EV.pm
%{perl_vendorarch}/AnyEvent/Impl/Event.pm
%{perl_vendorarch}/AnyEvent/Impl/EventLib.pm
%{perl_vendorarch}/AnyEvent/Impl/FLTK.pm
%{perl_vendorarch}/AnyEvent/Impl/Glib.pm
%{perl_vendorarch}/AnyEvent/Impl/IOAsync.pm
%{perl_vendorarch}/AnyEvent/Impl/Irssi.pm
%{perl_vendorarch}/AnyEvent/Impl/Perl.pm
%if %{with perl_AnyEvent_enables_POE}
%{perl_vendorarch}/AnyEvent/Impl/POE.pm
%endif
%{perl_vendorarch}/AnyEvent/Impl/Qt.pm
%{perl_vendorarch}/AnyEvent/Impl/Tk.pm
%{perl_vendorarch}/AnyEvent/Impl/UV.pm
%{perl_vendorarch}/AnyEvent/Intro.pod
%{perl_vendorarch}/AnyEvent/IO.pm
%dir %{perl_vendorarch}/AnyEvent/IO
%{perl_vendorarch}/AnyEvent/IO/IOAIO.pm
%{perl_vendorarch}/AnyEvent/IO/Perl.pm
%{perl_vendorarch}/AnyEvent/Log.pm
%{perl_vendorarch}/AnyEvent/Loop.pm
%{perl_vendorarch}/AnyEvent/Socket.pm
%{perl_vendorarch}/AnyEvent/Strict.pm
%{perl_vendorarch}/AnyEvent/TLS.pm
%{perl_vendorarch}/AnyEvent/Util.pm
%dir %{perl_vendorarch}/AnyEvent/Util
%{perl_vendorarch}/AnyEvent/Util/idna.pl
%{perl_vendorarch}/AnyEvent/Util/uts46data.pl
%{_mandir}/man3/AE.3*
%{_mandir}/man3/AnyEvent.3*
%{_mandir}/man3/AnyEvent::DNS.3*
@ -174,7 +224,9 @@ make test
%{_mandir}/man3/AnyEvent::Impl::Glib.3*
%{_mandir}/man3/AnyEvent::Impl::IOAsync.3*
%{_mandir}/man3/AnyEvent::Impl::Irssi.3*
%if %{with perl_AnyEvent_enables_POE}
%{_mandir}/man3/AnyEvent::Impl::POE.3*
%endif
%{_mandir}/man3/AnyEvent::Impl::Perl.3*
%{_mandir}/man3/AnyEvent::Impl::Qt.3*
%{_mandir}/man3/AnyEvent::Impl::Tk.3*
@ -192,6 +244,9 @@ make test
%changelog
* Tue Jan 26 2021 Petr Pisar <ppisar@redhat.com> - 7.17-6
- Conditionalize POE support
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 7.17-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild