19b2813
# IDEA is a patent-encumbered alogorithm so default to not supporting it
19b2813
# To include support for the IDEA algorithm, use: rpmbuild --with IDEA
19b2813
0f176d5
# Noarch package doesn't provide debuginfo but the default script
0f176d5
# interferes with signature checking so disable it completely
0f176d5
%define debug_package %{nil}
0f176d5
19b2813
Summary:	SSH (Secure Shell) client
19b2813
Name:		perl-Net-SSH-Perl
3074768
Version:	1.34
f5c6209
Release:	1%{?dist}
9c36545
License:	GPL+ or Artistic
19b2813
Group:		Development/Libraries
19b2813
Url:		http://search.cpan.org/dist/Net-SSH-Perl/
0f176d5
Source0:	http://search.cpan.org/CPAN/authors/id/T/TU/TURNSTEP/Net-SSH-Perl-%{version}.tar.gz
275c93b
Source1:	14964AC8.asc
19b2813
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
19b2813
Requires:	perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
0f176d5
Requires:	perl(Term::ReadKey)
19b2813
BuildArch:	noarch
af0f670
BuildRequires:	perl(String::CRC32)		>= 1.2
af0f670
BuildRequires:	perl(Convert::PEM)		>= 0.05
19b2813
BuildRequires:	perl(Crypt::Blowfish)
af0f670
BuildRequires:	perl(Crypt::DH)			>= 0.01
af0f670
BuildRequires:	perl(Crypt::DSA)		>= 0.11
19b2813
BuildRequires:	perl(Crypt::RSA)
19b2813
BuildRequires:	perl(Digest::BubbleBabble)
19b2813
BuildRequires:	perl(Digest::HMAC_MD5)
19b2813
BuildRequires:	perl(Digest::HMAC_SHA1)
19b2813
BuildRequires:	perl(Digest::MD5)
f5c6209
BuildRequires:	perl(Digest::SHA1)
35156fa
BuildRequires:	perl(ExtUtils::MakeMaker)
af0f670
BuildRequires:	perl(Math::GMP)			>= 1.04
af0f670
BuildRequires:	perl(Math::Pari)		>= 2.001804
19b2813
BuildRequires:	perl(MIME::Base64)
9c36545
BuildRequires:	perl(Test::More)
0f176d5
# Additional test coverage
0f176d5
BuildRequires:	perl(Module::Signature)
0f176d5
BuildRequires:	perl(Test::Pod)			>= 0.95
0f176d5
BuildRequires:	perl(Test::Pod::Coverage)	>= 1.04
f5c6209
#BuildRequires:	perl(Test::YAML::Meta)		>= 0.03
19b2813
19b2813
%{?_with_IDEA:BuildRequires: perl(Crypt::IDEA)}
19b2813
4aba462
# Make sure the installed package has blowfish support
4aba462
Requires:	perl(Crypt::Blowfish)
4aba462
19b2813
%description
19b2813
Net::SSH::Perl is an all-Perl module implementing an SSH (Secure Shell)
19b2813
client. It is compatible with both the SSH-1 and SSH-2 protocols.
19b2813
19b2813
%prep
19b2813
%setup -q -n Net-SSH-Perl-%{version}
19b2813
19b2813
# Avoid extra deps from examples
19b2813
%{__chmod} -x eg/*
19b2813
19b2813
# Remove Crypt::IDEA dep if we're not supporting the IDEA algorithm
19b2813
%define bogusreq 'perl(Crypt::IDEA)'
19b2813
%global reqfilt /bin/sh -c "%{__perl_requires} | %{__grep} -Fvx %{bogusreq}"
19b2813
%{!?_with_IDEA:%define __perl_requires %{reqfilt}}
19b2813
19b2813
%build
19b2813
(
19b2813
	# Protocol support (select one)
19b2813
	# 1=SSH1 2=SSH2 3=Both
19b2813
	echo 3
19b2813
19b2813
	# Algorithm selection (select all required)
19b2813
	# 1=IDEA 2=DES 3=DES3 4=Blowfish 5=RC4
19b2813
	echo %{?_with_IDEA:1 }2 3 4 5
19b2813
) |
19b2813
%{__perl} Makefile.PL INSTALLDIRS=vendor
19b2813
%{__make} %{?_smp_mflags}
19b2813
19b2813
%check
0f176d5
# Critic and POD tests currently fail
f5c6209
%{__gpg} --import %{SOURCE1} || :
f5c6209
LC_ALL=en_US %{__make} test TEST_AUTHOR=1 TEST_CRITIC=0 TEST_SIGNATURE=1 TEST_SPELL=0
19b2813
19b2813
%install
19b2813
%{__rm} -rf %{buildroot}
19b2813
%{__make} pure_install PERL_INSTALL_ROOT=%{buildroot}
19b2813
/usr/bin/find %{buildroot} -type f -name .packlist -exec %{__rm} -f {} ';'
af0f670
/usr/bin/find %{buildroot} -depth -type d -exec /bin/rmdir {} 2>/dev/null ';'
19b2813
%{__chmod} -R u+w %{buildroot}/*
19b2813
19b2813
%clean
19b2813
%{__rm} -rf %{buildroot}
19b2813
19b2813
%files
af0f670
%defattr(-,root,root,-)
19b2813
%doc Changes README LICENSE eg ToDo
19b2813
%{perl_vendorlib}/Net/
19b2813
%{_mandir}/man3/Net::SSH::Perl*.3pm*
19b2813
19b2813
%changelog
3074768
* Mon Feb  2 2009 Paul Howarth <paul@city-fan.org> 1.34-1
3074768
- Update to 1.34, fixes various upstream bugs:
3074768
  * Rekey properly after 1 GB of data (rt.cpan.org #25044)
3074768
  * Don't try to process nonexistent or empty auth file (rt.cpan.org #41877)
3074768
  * Fix typo in croak message (rt.cpan.org #42056)
3074768
  * Move 'use base' call after Crypt module loading (rt.cpan.org #42051)
3074768
  * Only apply stdin if defined in SSH1 (rt.cpan.org #42583)
f5c6209
- Remove perl(Test::YAML::Meta) buildreq (not yet in EPEL)
f5c6209
- Remove perl(Perl::Critic) buildreq (not yet in EPEL-4)
f5c6209
- Remove perl(Digest::SHA1) version requirement (not satisfied in EL-4)
f5c6209
- Remove perl(Text::SpellChecker) buildreq (dictionary coverage in EL-4
f5c6209
  not sufficient to pass tests)
3074768
dea1b7d
* Tue Nov  4 2008 Paul Howarth <paul@city-fan.org> 1.33-2
dea1b7d
- Run tests in en_US locale, so spell checker doesn't complain about the use of
dea1b7d
  American English when the host is in a non-US locale
dea1b7d
0f176d5
* Mon Nov  3 2008 Paul Howarth <paul@city-fan.org> 1.33-1
0f176d5
- Update to 1.33 (#469612), fixes various upstream bugs:
275c93b
  * Fix open() calls (rt.cpan.org #40020)
275c93b
  * Fix non-shell problem (rt.cpan.org #39980)
275c93b
  * Allow full agent forwarding (rt.cpan.org #32190)
275c93b
  * Handle hashed known_hosts files (rt.cpan.org #25175)
275c93b
  * Add IO::Handle to Perl.pm (rt.cpan.org #40057, #35985)
275c93b
  * Prevent t/03-packet.t from hanging due to high file descriptor
275c93b
  | (rt.cpan.org #6101)
275c93b
  * If ENV{HOME} is not set, use getpwuid. If both fail and the dir 
275c93b
  | is needed, we croak (rt.cpan.org #25174)
275c93b
  * Fix incorrect logical/bitwise AND mixup (rt.cpan.org #31490)
275c93b
  * Allow empty stdin for SSH2 (rt.cpan.org #32730)
275c93b
  * Adjust terminal dimensions dynamically if Term::ReadKey is available
275c93b
  | (rt.cpan.org #34874)
0f176d5
- New upstream (co-)maintainer, new source URL
0f176d5
- t/03-packet.t re-enabled as it should no longer hang
0f176d5
- Add buildreqs Module::Signature, Test::Pod, Test::Pod::Coverage,
0f176d5
  Perl::Critic, Test::YAML::Meta, Text::SpellChecker for additional test
0f176d5
  coverage
0f176d5
- Add dependency on Term::ReadKey to provide dynamic terminal resizing
275c93b
- Include upstream maintainer's GPG key for signature checking
0f176d5
b7a43fe
* Thu Mar  6 2008 Tom "spot" Callaway <tcallawa@redhat.com> 1.30-6
0f176d5
- Rebuild for new perl
b7a43fe
9c36545
* Mon Aug 13 2007 Paul Howarth <paul@city-fan.org> 1.30-5
9c36545
- Clarify license as GPL v1 or later, or Artistic (same as perl)
9c36545
- Add buildreq perl(Test::More)
9c36545
35156fa
* Wed Apr 18 2007 Paul Howarth <paul@city-fan.org> 1.30-4
35156fa
- Buildrequire perl(ExtUtils::MakeMaker)
af0f670
- Fix argument order for find with -depth
af0f670
4aba462
* Wed Aug 30 2006 Paul Howarth <paul@city-fan.org> 1.30-3
4aba462
- Skip test 03-packet, which can sometimes hang (cpan rt#6101)
4aba462
- Add manual Crypt::Blowfish dep to ensure we have blowfish support
4aba462
313ee9c
* Wed Aug 30 2006 Paul Howarth <paul@city-fan.org> 1.30-2
313ee9c
- FE6 mass rebuild
313ee9c
19b2813
* Mon Mar 20 2006 Paul Howarth <paul@city-fan.org> 1.30-1
19b2813
- Update to 1.30
19b2813
- Patch for cpan rt#11674 no longer needed, fixed upstream
19b2813
19b2813
* Thu Mar  2 2006 Paul Howarth <paul@city-fan.org> 1.29-1
19b2813
- Initial build