perl-ssl.spec 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. ##
  2. ## perl-ssl.spec -- OpenPKG RPM Package Specification
  3. ## Copyright (c) 2000-2005 OpenPKG Foundation e.V. <http://openpkg.net/>
  4. ## Copyright (c) 2000-2005 Ralf S. Engelschall <http://engelschall.com/>
  5. ##
  6. ## Permission to use, copy, modify, and distribute this software for
  7. ## any purpose with or without fee is hereby granted, provided that
  8. ## the above copyright notice and this permission notice appear in all
  9. ## copies.
  10. ##
  11. ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  12. ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  13. ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  14. ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
  15. ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  16. ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  17. ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  18. ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  19. ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  20. ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  21. ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  22. ## SUCH DAMAGE.
  23. ##
  24. # versions of individual parts
  25. %define V_perl 5.8.7
  26. %define V_net_ssleay 1.25
  27. %define V_crypt_ssleay 0.51
  28. %define V_io_socket_ssl 0.97
  29. # package information
  30. Name: perl-ssl
  31. Summary: Perl Modules for use with SSL
  32. URL: http://www.cpan.org/
  33. Vendor: Perl Community
  34. Packager: OpenPKG
  35. Distribution: OpenPKG
  36. Class: BASE
  37. Group: Language
  38. License: GPL/Artistic
  39. Version: %{V_perl}
  40. Release: 20050717
  41. # list of sources
  42. Source0: http://www.cpan.org/modules/by-module/Net/Net_SSLeay.pm-%{V_net_ssleay}.tar.gz
  43. Source1: http://www.cpan.org/modules/by-module/Crypt/Crypt-SSLeay-%{V_crypt_ssleay}.tar.gz
  44. Source2: http://www.cpan.org/modules/by-module/IO/IO-Socket-SSL-%{V_io_socket_ssl}.tar.gz
  45. # build information
  46. Prefix: %{l_prefix}
  47. BuildRoot: %{l_buildroot}
  48. BuildPreReq: OpenPKG, openpkg >= 20040130, perl >= %{V_perl}, perl-openpkg >= %{V_perl}-20040126
  49. PreReq: OpenPKG, openpkg >= 20040130, perl >= %{V_perl}
  50. BuildPreReq: openssl
  51. PreReq: openssl
  52. AutoReq: no
  53. AutoReqProv: no
  54. %description
  55. Various Perl modules for use with SSL/TLS (OpenSSL):
  56. - Net::SSLeay (%{V_net_ssleay})
  57. - Crypt::SSLeay (%{V_crypt_ssleay})
  58. - IO::Socket::SSL (%{V_io_socket_ssl})
  59. %track
  60. prog perl-ssl:Crypt-SSLeay = {
  61. version = %{V_crypt_ssleay}
  62. url = http://www.cpan.org/modules/by-module/Crypt/
  63. regex = Crypt-SSLeay-(__VER__)\.tar\.gz
  64. }
  65. prog perl-ssl:IO-Socket-SSL = {
  66. version = %{V_io_socket_ssl}
  67. url = http://www.cpan.org/modules/by-module/IO/
  68. regex = IO-Socket-SSL-(\d+\.\d\d)\.tar\.gz
  69. }
  70. prog perl-ssl:Net-SSLeay = {
  71. version = %{V_net_ssleay}
  72. url = http://www.cpan.org/modules/by-module/Net/
  73. regex = Net_SSLeay.pm-(__VER__)\.tar\.gz
  74. }
  75. %prep
  76. %setup -q -c
  77. %setup -q -T -D -a 1
  78. %setup -q -T -D -a 2
  79. %build
  80. %install
  81. rm -rf $RPM_BUILD_ROOT
  82. %{l_prefix}/bin/perl-openpkg prepare
  83. %{l_prefix}/bin/perl-openpkg -d %{SOURCE0} \
  84. --args "%{l_prefix} -- #" \
  85. configure build install
  86. ( cd Crypt-SSLeay-%{V_crypt_ssleay}
  87. %{l_shtool} subst \
  88. -e 's;^\(my @POSSIBLE_SSL_DIRS = qw(\)[^)]*\().*\)$;\1%{l_prefix}\2;' \
  89. Makefile.PL
  90. ) || exit $?
  91. %{l_prefix}/bin/perl-openpkg -d %{SOURCE1} configure build install
  92. %{l_prefix}/bin/perl-openpkg -d %{SOURCE2} configure build install
  93. %{l_prefix}/bin/perl-openpkg -F perl-openpkg-files fixate cleanup
  94. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} `cat perl-openpkg-files`
  95. %files -f files
  96. %clean
  97. rm -rf $RPM_BUILD_ROOT