# IDEA is a patent-encumbered alogorithm so default to not supporting it
# To include support for the IDEA algorithm, use: rpmbuild --with IDEA
Summary: SSH (Secure Shell) client
Name: perl-Net-SSH-Perl
Version: 1.30
Release: 1%{?dist}
License: GPL or Artistic
Group: Development/Libraries
Url: http://search.cpan.org/dist/Net-SSH-Perl/
Source0: http://search.cpan.org/CPAN/authors/id/D/DB/DBROBINS/Net-SSH-Perl-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
BuildArch: noarch
BuildRequires: perl(String::CRC32) >= 1.2
BuildRequires: perl(Convert::PEM) >= 0.05
BuildRequires: perl(Crypt::Blowfish)
BuildRequires: perl(Crypt::DH) >= 0.01
BuildRequires: perl(Crypt::DSA) >= 0.11
BuildRequires: perl(Crypt::RSA)
BuildRequires: perl(Digest::BubbleBabble)
BuildRequires: perl(Digest::HMAC_MD5)
BuildRequires: perl(Digest::HMAC_SHA1)
BuildRequires: perl(Digest::MD5)
BuildRequires: perl(Digest::SHA1) >= 2.10
BuildRequires: perl(Math::GMP) >= 1.04
BuildRequires: perl(Math::Pari) >= 2.001804
BuildRequires: perl(MIME::Base64)
%{?_with_IDEA:BuildRequires: perl(Crypt::IDEA)}
%description
Net::SSH::Perl is an all-Perl module implementing an SSH (Secure Shell)
client. It is compatible with both the SSH-1 and SSH-2 protocols.
%prep
%setup -q -n Net-SSH-Perl-%{version}
# Avoid extra deps from examples
%{__chmod} -x eg/*
# Remove Crypt::IDEA dep if we're not supporting the IDEA algorithm
%define bogusreq 'perl(Crypt::IDEA)'
%global reqfilt /bin/sh -c "%{__perl_requires} | %{__grep} -Fvx %{bogusreq}"
%{!?_with_IDEA:%define __perl_requires %{reqfilt}}
%build
(
# Protocol support (select one)
# 1=SSH1 2=SSH2 3=Both
echo 3
# Algorithm selection (select all required)
# 1=IDEA 2=DES 3=DES3 4=Blowfish 5=RC4
echo %{?_with_IDEA:1 }2 3 4 5
) |
%{__perl} Makefile.PL INSTALLDIRS=vendor
%{__make} %{?_smp_mflags}
%check
%{__make} test
%install
%{__rm} -rf %{buildroot}
%{__make} pure_install PERL_INSTALL_ROOT=%{buildroot}
/usr/bin/find %{buildroot} -type f -name .packlist -exec %{__rm} -f {} ';'
/usr/bin/find %{buildroot} -type d -depth -exec /bin/rmdir {} 2>/dev/null ';'
%{__chmod} -R u+w %{buildroot}/*
%clean
%{__rm} -rf %{buildroot}
%files
%defattr(-,root,root,0755)
%doc Changes README LICENSE eg ToDo
%{perl_vendorlib}/Net/
%{_mandir}/man3/Net::SSH::Perl*.3pm*
%changelog
* Mon Mar 20 2006 Paul Howarth <paul@city-fan.org> 1.30-1
- Update to 1.30
- Patch for cpan rt#11674 no longer needed, fixed upstream
* Thu Mar 2 2006 Paul Howarth <paul@city-fan.org> 1.29-1
- Initial build