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