perl-ssl.spec 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. ##
  2. ## perl-ssl.spec -- OpenPKG RPM Package Specification
  3. ## Copyright (c) 2000-2011 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.12
  25. %define V_net_ssleay 1.36
  26. %define V_crypt_ssleay 0.58_01
  27. %define V_io_socket_ssl 1.44
  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: 20110528
  40. # list of sources
  41. Source0: http://www.cpan.org/authors/id/F/FL/FLORA/Net-SSLeay-%{V_net_ssleay}.tar.gz
  42. Source1: http://www.cpan.org/authors/id/N/NA/NANIS/Crypt-SSLeay-%{V_crypt_ssleay}.tar.gz
  43. Source2: http://www.cpan.org/authors/id/S/SU/SULLR/IO-Socket-SSL-%{V_io_socket_ssl}.tar.gz
  44. Patch0: perl-ssl.patch
  45. # build information
  46. BuildPreReq: OpenPKG, openpkg >= 20100101, perl >= %{V_perl}, perl-openpkg >= %{V_perl}-20040126
  47. PreReq: OpenPKG, openpkg >= 20100101, perl >= %{V_perl}
  48. BuildPreReq: openssl, perl-ds, perl-mail
  49. PreReq: openssl, perl-ds, perl-mail
  50. %description
  51. Various Perl modules for use with SSL/TLS (OpenSSL):
  52. - Net::SSLeay (%{V_net_ssleay})
  53. - Crypt::SSLeay (%{V_crypt_ssleay})
  54. - IO::Socket::SSL (%{V_io_socket_ssl})
  55. %track
  56. prog perl-ssl:Crypt-SSLeay = {
  57. version = %{V_crypt_ssleay}
  58. url = http://www.cpan.org/authors/id/N/NA/NANIS/
  59. regex = Crypt-SSLeay-(__VER__)\.tar\.gz
  60. }
  61. prog perl-ssl:IO-Socket-SSL = {
  62. version = %{V_io_socket_ssl}
  63. url = http://www.cpan.org/authors/id/S/SU/SULLR/
  64. regex = IO-Socket-SSL-(\d+\.\d\d)\.tar\.gz
  65. }
  66. prog perl-ssl:Net-SSLeay = {
  67. version = %{V_net_ssleay}
  68. url = http://www.cpan.org/authors/id/F/FL/FLORA/
  69. regex = Net-SSLeay-(__VER__)\.tar\.gz
  70. }
  71. %prep
  72. %setup -q -c
  73. %setup -q -T -D -a 1
  74. %setup -q -T -D -a 2
  75. %patch -p0
  76. %build
  77. %install
  78. OPENSSL_PREFIX="%{l_prefix}"
  79. export OPENSSL_PREFIX
  80. %{l_prefix}/bin/perl-openpkg prepare
  81. %{l_prefix}/bin/perl-openpkg -d %{SOURCE0} \
  82. --args "%{l_prefix} -- #" \
  83. configure build install
  84. ( cd Crypt-SSLeay-%{V_crypt_ssleay}
  85. %{l_shtool} subst \
  86. -e 's;qw(/usr);qw(%{l_prefix});' \
  87. Makefile.PL
  88. ) || exit $?
  89. %{l_prefix}/bin/perl-openpkg -d %{SOURCE1} configure build install
  90. %{l_prefix}/bin/perl-openpkg -d %{SOURCE2} configure build install
  91. %{l_prefix}/bin/perl-openpkg -F perl-openpkg-files fixate cleanup
  92. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} `cat perl-openpkg-files`
  93. %files -f files
  94. %clean