perl-ssh.spec 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  1. ##
  2. ## perl-ssh.spec -- OpenPKG RPM Package Specification
  3. ## Copyright (c) 2000-2009 OpenPKG Foundation e.V. <http://openpkg.net/>
  4. ##
  5. ## Permission to use, copy, modify, and distribute this software for
  6. ## any purpose with or without fee is hereby granted, provided that
  7. ## the above copyright notice and this permission notice appear in all
  8. ## copies.
  9. ##
  10. ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  11. ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  12. ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  13. ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
  14. ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  15. ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  16. ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  17. ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  18. ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  19. ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  20. ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  21. ## SUCH DAMAGE.
  22. ##
  23. # versions of individual parts
  24. %define V_perl 5.10
  25. %define V_net_ssh2 0.28
  26. %define V_net_ssh 0.09
  27. %define V_net_ssh_expect 1.09
  28. %define V_net_scp 0.08
  29. %define V_net_scp_expect 0.16
  30. %define V_net_sftp_foreign 1.55
  31. %define V_net_openssh 0.42
  32. # package information
  33. Name: perl-ssh
  34. Summary: Perl Modules for use with SSH
  35. URL: http://www.cpan.org/
  36. Vendor: Perl Community
  37. Packager: OpenPKG Foundation e.V.
  38. Distribution: OpenPKG Community
  39. Class: PLUS
  40. Group: Perl
  41. License: GPL/Artistic
  42. Version: %{V_perl}
  43. Release: 20091212
  44. # list of sources
  45. Source0: http://www.cpan.org/modules/by-module/Net/Net-SSH2-%{V_net_ssh2}.tar.gz
  46. Source1: http://www.cpan.org/modules/by-module/Net/Net-SSH-%{V_net_ssh}.tar.gz
  47. Source2: http://www.cpan.org/modules/by-module/Net/Net-SSH-Expect-%{V_net_ssh_expect}.tar.gz
  48. Source3: http://www.cpan.org/modules/by-module/Net/Net-SCP-%{V_net_scp}.tar.gz
  49. Source4: http://www.cpan.org/modules/by-module/Net/Net-SCP-Expect-%{V_net_scp_expect}.tar.gz
  50. Source5: http://www.cpan.org/modules/by-module/Net/Net-SFTP-Foreign-%{V_net_sftp_foreign}.tar.gz
  51. Source6: http://www.cpan.org/authors/id/S/SA/SALVA/Net-OpenSSH-%{V_net_openssh}.tar.gz
  52. # build information
  53. Prefix: %{l_prefix}
  54. BuildRoot: %{l_buildroot}
  55. BuildPreReq: OpenPKG, openpkg >= 20040130, perl >= %{V_perl}, perl-openpkg >= %{V_perl}
  56. PreReq: OpenPKG, openpkg >= 20040130, perl >= %{V_perl}
  57. BuildPreReq: perl-sys, perl-term, libssh2
  58. PreReq: perl-sys, perl-term, libssh2, openssh
  59. AutoReq: no
  60. AutoReqProv: no
  61. %description
  62. Various Perl modules for use with Secure Shell (SSH):
  63. - Net::SSH2 (%{V_net_ssh2})
  64. - Net::SSH (%{V_net_ssh})
  65. - Net::SSH::Expect (%{V_net_ssh_expect})
  66. - Net::SCP (%{V_net_scp})
  67. - Net::SCP::Expect (%{V_net_scp_expect})
  68. - Net::SFTP::Foreign (%{V_net_sftp_foreign})
  69. - Net::OpenSSH (%{V_net_openssh})
  70. %track
  71. prog perl-ssh:Net-SSH2 = {
  72. version = %{V_net_ssh2}
  73. url = http://www.cpan.org/modules/by-module/Net/
  74. regex = Net-SSH2-(__VER__)\.tar\.gz
  75. }
  76. prog perl-ssh:Net-SSH = {
  77. version = %{V_net_ssh}
  78. url = http://www.cpan.org/modules/by-module/Net/
  79. regex = Net-SSH-(__VER__)\.tar\.gz
  80. }
  81. prog perl-ssh:Net-SSH-Expect = {
  82. version = %{V_net_ssh_expect}
  83. url = http://www.cpan.org/modules/by-module/Net/
  84. regex = Net-SSH-Expect-(__VER__)\.tar\.gz
  85. }
  86. prog perl-ssh:Net-SCP = {
  87. version = %{V_net_scp}
  88. url = http://www.cpan.org/modules/by-module/Net/
  89. regex = Net-SCP-(__VER__)\.tar\.gz
  90. }
  91. prog perl-ssh:Net-SCP-Expect = {
  92. version = %{V_net_scp_expect}
  93. url = http://www.cpan.org/modules/by-module/Net/
  94. regex = Net-SCP-Expect-(__VER__)\.tar\.gz
  95. }
  96. prog perl-ssh:Net-SFTP-Foreign = {
  97. version = %{V_net_sftp_foreign}
  98. url = http://www.cpan.org/modules/by-module/Net/
  99. regex = Net-SFTP-Foreign-(__VER__)\.tar\.gz
  100. }
  101. prog perl-ssh:Net-OpenSSH = {
  102. version = %{V_net_openssh}
  103. url = http://www.cpan.org/authors/id/S/SA/SALVA/
  104. regex = Net-OpenSSH-(__VER__)\.tar\.gz
  105. }
  106. %prep
  107. %setup -q -c
  108. %setup -q -T -D -a 1
  109. %setup -q -T -D -a 2
  110. %setup -q -T -D -a 3
  111. %setup -q -T -D -a 4
  112. %setup -q -T -D -a 5
  113. %setup -q -T -D -a 6
  114. %build
  115. %install
  116. rm -rf $RPM_BUILD_ROOT
  117. %{l_shtool} subst \
  118. -e 's:inc = \(.\)\(.;\):inc = \1%{l_prefix}/include\2:' \
  119. -e 's:lib = \(.\)\(.;\):lib = \1%{l_prefix}/lib\2:' \
  120. -e 's:-lssh2:-lssh2 -lcrypto -lz -lm:' \
  121. Net-SSH2-%{V_net_ssh2}/Makefile.PL
  122. %{l_prefix}/bin/perl-openpkg prepare
  123. %{l_prefix}/bin/perl-openpkg -d %{SOURCE0} configure build install
  124. %{l_prefix}/bin/perl-openpkg -d %{SOURCE1} configure build install
  125. %{l_prefix}/bin/perl-openpkg -d %{SOURCE2} configure build install
  126. %{l_prefix}/bin/perl-openpkg -d %{SOURCE3} configure build install
  127. %{l_prefix}/bin/perl-openpkg -d %{SOURCE4} configure build install
  128. %{l_prefix}/bin/perl-openpkg -d %{SOURCE5} configure build install
  129. %{l_prefix}/bin/perl-openpkg -d %{SOURCE6} configure build install
  130. %{l_prefix}/bin/perl-openpkg -F perl-openpkg-files fixate cleanup
  131. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} `cat perl-openpkg-files`
  132. %files -f files
  133. %clean
  134. rm -rf $RPM_BUILD_ROOT