perl-ssl.spec 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. ##
  2. ## perl-ssl.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_ssleay 1.35
  26. %define V_crypt_ssleay 0.57
  27. %define V_io_socket_ssl 1.30
  28. # package information
  29. Name: perl-ssl
  30. Summary: Perl Modules for use with SSL
  31. URL: http://www.cpan.org/
  32. Vendor: Perl Community
  33. Packager: OpenPKG Foundation e.V.
  34. Distribution: OpenPKG Community
  35. Class: BASE
  36. Group: Perl
  37. License: GPL/Artistic
  38. Version: %{V_perl}
  39. Release: 20090904
  40. # list of sources
  41. Source0: http://www.cpan.org/modules/by-module/Net/Net-SSLeay-%{V_net_ssleay}.tar.gz
  42. Source1: http://www.cpan.org/modules/by-module/Crypt/Crypt-SSLeay-%{V_crypt_ssleay}.tar.gz
  43. Source2: http://www.cpan.org/modules/by-module/IO/IO-Socket-SSL-%{V_io_socket_ssl}.tar.gz
  44. Patch0: perl-ssl.patch
  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, perl-ds, perl-mail
  51. PreReq: openssl, perl-ds, perl-mail
  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-(__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. %patch -p0
  80. %build
  81. %install
  82. rm -rf $RPM_BUILD_ROOT
  83. OPENSSL_PREFIX="%{l_prefix}"
  84. export OPENSSL_PREFIX
  85. %{l_prefix}/bin/perl-openpkg prepare
  86. %{l_prefix}/bin/perl-openpkg -d %{SOURCE0} \
  87. --args "%{l_prefix} -- #" \
  88. configure build install
  89. ( cd Crypt-SSLeay-%{V_crypt_ssleay}
  90. %{l_shtool} subst \
  91. -e 's;\(@POSSIBLE_SSL_DIRS = qw(\)[^)]*\().*\)$;\1%{l_prefix}\2;' \
  92. Makefile.PL
  93. ) || exit $?
  94. %{l_prefix}/bin/perl-openpkg -d %{SOURCE1} configure build install
  95. %{l_prefix}/bin/perl-openpkg -d %{SOURCE2} configure build install
  96. %{l_prefix}/bin/perl-openpkg -F perl-openpkg-files fixate cleanup
  97. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} `cat perl-openpkg-files`
  98. %files -f files
  99. %clean
  100. rm -rf $RPM_BUILD_ROOT