c8b4d7
# Run optional test
c8b4d7
%if ! (0%{?rhel})
c8b4d7
%bcond_without perl_libnet_enables_optional_test
c8b4d7
%else
c8b4d7
%bcond_with perl_libnet_enables_optional_test
c8b4d7
%endif
c8b4d7
# SASL support
c8b4d7
%bcond_without perl_libnet_enables_sasl
c8b4d7
# SSL support
c8b4d7
%bcond_without perl_libnet_enables_ssl
c8b4d7
c8b4d7
Name:           perl-libnet
c8b4d7
Version:        3.11
c8b4d7
Release:        4%{?dist}
c8b4d7
Summary:        Perl clients for various network protocols
c8b4d7
# other files:  GPL+ or Artistic
c8b4d7
## Not in binary packages
c8b4d7
# repackage.sh: GPLv2+
c8b4d7
## Removed from upstream sources:
c8b4d7
# lib/Net/libnetFAQ.pod:    Artistic    (CPAN RT#117888)
c8b4d7
License:        GPL+ or Artistic
c8b4d7
URL:            http://search.cpan.org/dist/libnet/
c8b4d7
# Origin source archive contains Artistic only files, CPAN RT#117888.
c8b4d7
# Local archive produced by "./repackage.sh %%{version}" command.
c8b4d7
# http://www.cpan.org/authors/id/S/SH/SHAY/libnet-%%{version}.tar.gz
c8b4d7
Source0:        libnet-%{version}_repackaged.tar.gz
c8b4d7
# Replacement for the Artistic only file, CPAN RT#117888.
c8b4d7
Source1:        libnetFAQ.pod
c8b4d7
# Convert Changes to UTF-8
c8b4d7
Patch0:         libnet-3.09-Normalize-Changes-encoding.patch
c8b4d7
# Do not create Net/libnet.cfg, bug #1238689
c8b4d7
Patch1:         libnet-3.08-Do-not-create-Net-libnet.cfg.patch
c8b4d7
BuildArch:      noarch
c8b4d7
BuildRequires:  coreutils
c8b4d7
BuildRequires:  make
c8b4d7
BuildRequires:  perl-generators
c8b4d7
BuildRequires:  perl-interpreter
c8b4d7
BuildRequires:  perl(ExtUtils::MakeMaker) >= 6.76
c8b4d7
# Getopt::Std not used because of Do-not-create-Net-libnet.cfg.patch
c8b4d7
# IO::File not used because of Do-not-create-Net-libnet.cfg.patch
c8b4d7
BuildRequires:  perl(strict)
c8b4d7
BuildRequires:  perl(warnings)
c8b4d7
# Run-time:
c8b4d7
BuildRequires:  perl(Carp)
c8b4d7
BuildRequires:  perl(constant)
c8b4d7
# Convert::EBCDIC not used
c8b4d7
BuildRequires:  perl(Errno)
c8b4d7
BuildRequires:  perl(Exporter)
c8b4d7
BuildRequires:  perl(Fcntl)
c8b4d7
# File::Basename not used at tests
c8b4d7
BuildRequires:  perl(FileHandle)
c8b4d7
BuildRequires:  perl(IO::Select)
c8b4d7
BuildRequires:  perl(IO::Socket) >= 1.05
c8b4d7
# Prefer IO::Socket::IP over IO::Socket::INET6 and IO::Socket::INET
c8b4d7
# IO::Socket::INET6 not used
c8b4d7
BuildRequires:  perl(IO::Socket::IP) >= 0.25
c8b4d7
BuildRequires:  perl(POSIX)
c8b4d7
BuildRequires:  perl(Socket) >= 2.016
c8b4d7
BuildRequires:  perl(Symbol)
c8b4d7
BuildRequires:  perl(Time::Local)
c8b4d7
# Optional run-time:
c8b4d7
# Authen::SASL not used at tests
c8b4d7
# Digest::MD5 not used at tests
c8b4d7
%if %{with perl_libnet_enables_ssl} && !%{defined perl_bootstrap}
c8b4d7
# Core modules must be built without non-core dependencies
c8b4d7
BuildRequires:  perl(IO::Socket::SSL) >= 2.007
c8b4d7
%endif
c8b4d7
# MD5 not used because we prefer Digest::MD5
c8b4d7
# MIME::Base64 not used at tests
c8b4d7
# Tests:
c8b4d7
BuildRequires:  perl(Config)
c8b4d7
BuildRequires:  perl(Cwd)
c8b4d7
BuildRequires:  perl(File::Temp)
c8b4d7
BuildRequires:  perl(IO::File)
c8b4d7
BuildRequires:  perl(Test::More)
c8b4d7
%if %{with perl_libnet_enables_optional_test}
c8b4d7
# Optional tests:
c8b4d7
%if %{with perl_libnet_enables_ssl} && !%{defined perl_bootstrap}
c8b4d7
# Core modules must be built without non-core dependencies
c8b4d7
BuildRequires:  perl(IO::Socket::SSL::Utils)
c8b4d7
%endif
c8b4d7
# Test::CPAN::Changes not used
c8b4d7
# Test::Perl::Critic not used
c8b4d7
# Test::Pod 1.00 not used
c8b4d7
# Test::Pod::Coverage 0.08 not used
c8b4d7
%endif
c8b4d7
Requires:       perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
c8b4d7
Requires:       perl(File::Basename)
c8b4d7
Requires:       perl(IO::Socket) >= 1.05
c8b4d7
# Prefer IO::Socket::IP over IO::Socket::INET6 and IO::Socket::INET
c8b4d7
Requires:       perl(IO::Socket::IP) >= 0.25
c8b4d7
Requires:       perl(POSIX)
c8b4d7
Requires:       perl(Socket) >= 2.016
c8b4d7
# Optional run-time:
c8b4d7
# Core modules must be built without non-core dependencies
c8b4d7
%if %{with perl_libnet_enables_sasl} && !%{defined perl_bootstrap}
c8b4d7
Suggests:       perl(Authen::SASL)
c8b4d7
Suggests:       perl(MIME::Base64)
c8b4d7
%endif
c8b4d7
# Digest::MD5 or MD5
c8b4d7
Requires:       perl(Digest::MD5)
c8b4d7
%if %{with perl_libnet_enables_ssl} && !%{defined perl_bootstrap}
c8b4d7
Suggests:       perl(IO::Socket::SSL) >= 2.007
c8b4d7
%endif
c8b4d7
Conflicts:      perl < 4:5.22.0-347
c8b4d7
c8b4d7
# Filter under-specified dependencies
c8b4d7
%global __requires_exclude %{?__requires_exclude:%__requires_exclude|}^perl\\((IO::Socket|Socket)\\)$
c8b4d7
c8b4d7
%description
c8b4d7
This is a collection of Perl modules which provides a simple and
c8b4d7
consistent programming interface (API) to the client side of various
c8b4d7
protocols used in the internet community.
c8b4d7
c8b4d7
%prep
c8b4d7
%setup -q -n libnet-%{version}
c8b4d7
# Provide dummy Net::libnetFAQ document, CPAN RT#117888
c8b4d7
install -m 0644 %{SOURCE1} lib/Net
c8b4d7
%patch0 -p1
c8b4d7
%patch1 -p1
c8b4d7
c8b4d7
%build
c8b4d7
perl Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1 
c8b4d7
make %{?_smp_mflags}
c8b4d7
c8b4d7
%install
c8b4d7
make pure_install DESTDIR=$RPM_BUILD_ROOT
c8b4d7
%{_fixperms} $RPM_BUILD_ROOT/*
c8b4d7
c8b4d7
%check
c8b4d7
make test
c8b4d7
c8b4d7
%files
c8b4d7
%license Artistic Copying LICENCE
c8b4d7
%doc Changes README
c8b4d7
%{perl_vendorlib}/*
c8b4d7
%{_mandir}/man3/*
c8b4d7
c8b4d7
%changelog
c8b4d7
* Fri Mar 29 2019 Jitka Plesnikova <jplesnik@redhat.com> - 3.11-4
c8b4d7
- Rebuild with enable hardening (bug #1636329)
c8b4d7
c8b4d7
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.11-3
c8b4d7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
c8b4d7
c8b4d7
* Tue Dec 12 2017 Petr Pisar <ppisar@redhat.com> - 3.11-2
c8b4d7
- Require Digest::MD5 for APOP login method
c8b4d7
c8b4d7
* Wed Nov 15 2017 Petr Pisar <ppisar@redhat.com> - 3.11-1
c8b4d7
- 3.11 bump
c8b4d7
c8b4d7
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.10-395
c8b4d7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
c8b4d7
c8b4d7
* Wed Jun 07 2017 Jitka Plesnikova <jplesnik@redhat.com> - 3.10-394
c8b4d7
- Perl 5.26 re-rebuild of bootstrapped packages
c8b4d7
c8b4d7
* Sat Jun 03 2017 Jitka Plesnikova <jplesnik@redhat.com> - 3.10-393
c8b4d7
- Perl 5.26 rebuild
c8b4d7
c8b4d7
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.10-3
c8b4d7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
c8b4d7
c8b4d7
* Fri Sep 16 2016 Petr Pisar <ppisar@redhat.com> - 3.10-2
c8b4d7
- Net::libnetFAQ document replaced with a hyper link because of the Artistic
c8b4d7
  license (CPAN RT#117888)
c8b4d7
c8b4d7
* Mon Aug 01 2016 Jitka Plesnikova <jplesnik@redhat.com> - 3.10-1
c8b4d7
- 3.10 bump
c8b4d7
c8b4d7
* Wed Jul 27 2016 Petr Pisar <ppisar@redhat.com> - 3.09-2
c8b4d7
- Fix blocking in Net::FTP and other subclasses (bug #1360610)
c8b4d7
c8b4d7
* Wed Jul 20 2016 Petr Pisar <ppisar@redhat.com> - 3.09-1
c8b4d7
- 3.09 bump
c8b4d7
c8b4d7
* Wed May 18 2016 Jitka Plesnikova <jplesnik@redhat.com> - 3.08-366
c8b4d7
- Perl 5.24 re-rebuild of bootstrapped packages
c8b4d7
c8b4d7
* Sat May 14 2016 Jitka Plesnikova <jplesnik@redhat.com> - 3.08-365
c8b4d7
- Increase release to favour standalone package
c8b4d7
c8b4d7
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 3.08-2
c8b4d7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
c8b4d7
c8b4d7
* Wed Jan 06 2016 Petr Pisar <ppisar@redhat.com> - 3.08-1
c8b4d7
- 8.08 bump
c8b4d7
c8b4d7
* Mon Jul 20 2015 Petr Pisar <ppisar@redhat.com> - 3.07-1
c8b4d7
- 3.07 bump
c8b4d7
c8b4d7
* Wed Jul 01 2015 Petr Pisar <ppisar@redhat.com> 3.06-1
c8b4d7
- Specfile autogenerated by cpanspec 1.78.
c8b4d7
- Do not create Net/libnet.cfg (bug #1238689)