%define perl_vendorarch %(eval "`%{_bindir}/perl -V:installvendorarch`"; echo $installvendorarch) %define perl_vendorarch64 %(eval "`%{_bindir}/perl_64bit -V:installvendorarch`"; echo $installvendorarch) Name: perl-Net-SSH2 Version: 0.18 Release: 1 Summary: Support for the SSH 2 protocol via libSSH2 License: GPL+ or Artistic Group: Development/Libraries URL: http://search.cpan.org/dist/Net-SSH2/ Source0: http://www.cpan.org/authors/id/D/DB/DBROBINS/Net-SSH2-%{version}.tar.gz # http://rt.cpan.org/Public/Bug/Display.html?id=36614 Patch0: net-ssh2-0.18-perl5.10.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root Requires: perl(:MODULE_COMPAT_%(eval "`%{_bindir}/perl -V:version`"; echo $version)) Requires: perl >= 5.8.8 # non-perl BuildRequires: libssh2-devel >= 0.18, patch Requires: libssh2 >= 0.18 # core # these two are provided by our base perl package #BuildRequires: perl(ExtUtils::MakeMaker) #BuildRequires: perl(Test::More) #BuildRequires: perl(File::Basename) #BuildRequires: perl(IO::File) #BuildRequires: perl(Socket) %description Net::SSH2 is a perl interface to the libssh2 (http://www.libssh2.org) library. It supports the SSH2 protocol (there is no support for SSH1) with all of the key exchanges, ciphers, and compression of libssh2. %prep export PATH=/opt/freeware/bin:$PATH %setup -q -n Net-SSH2-%{version} %patch0 -p1 %{_bindir}/perl -pi -e 's|^#!perl|#!/opt/freeware/bin/perl|' example/* mkdir ../32bit mv * ../32bit mv ../32bit . mkdir 64bit cp -r 32bit/* 64bit/ %build cd 32bit %{_bindir}/perl Makefile.PL INSTALLDIRS="vendor" make cd ../64bit %{_bindir}/perl_64bit Makefile.PL INSTALLDIRS="vendor" make %install [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} cd 32bit make pure_install PERL_INSTALL_ROOT=${RPM_BUILD_ROOT} cd ../64bit make pure_install PERL_INSTALL_ROOT=${RPM_BUILD_ROOT} /opt/freeware/bin/find ${RPM_BUILD_ROOT} -type f -name .packlist -exec rm -f {} ';' /opt/freeware/bin/find ${RPM_BUILD_ROOT} -type f -name '*.bs' -empty -exec rm -f {} ';' /opt/freeware/bin/find ${RPM_BUILD_ROOT} -type d -depth -exec rmdir {} 2>/dev/null ';' chmod -R u+w ${RPM_BUILD_ROOT}/* %clean [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} %files %defattr(-,root,system,-) %doc 32bit/Changes 32bit/README 32bit/example/ 32bit/t/ %{perl_vendorarch}/* %{perl_vendorarch64}/* %{_mandir}/man3/* %changelog * Sun Nov 09 2008 Michael Perzl - 0.18-1 - first version for AIX V5.1 and higher