openssl.spec 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  1. ##
  2. ## openssl.spec -- OpenPKG RPM Specification
  3. ## Copyright (c) 2000-2005 The OpenPKG Project <http://www.openpkg.org/>
  4. ## Copyright (c) 2000-2005 Ralf S. Engelschall <rse@engelschall.com>
  5. ## Copyright (c) 2000-2005 Cable & Wireless <http://www.cw.com/>
  6. ##
  7. ## Permission to use, copy, modify, and distribute this software for
  8. ## any purpose with or without fee is hereby granted, provided that
  9. ## the above copyright notice and this permission notice appear in all
  10. ## copies.
  11. ##
  12. ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  13. ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  14. ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  15. ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
  16. ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  17. ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  18. ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  19. ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  20. ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  21. ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  22. ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  23. ## SUCH DAMAGE.
  24. ##
  25. # package information
  26. Name: openssl
  27. Summary: Cryptography and SSL/TLS Toolkit
  28. URL: http://www.openssl.org/
  29. Vendor: The OpenSSL Project
  30. Packager: The OpenPKG Project
  31. Distribution: OpenPKG
  32. Class: CORE
  33. Group: Cryptography
  34. License: BSD-style
  35. Version: 0.9.7e
  36. Release: 20050209
  37. # package options
  38. %option with_zlib no
  39. %option with_idea no
  40. %option with_threads no
  41. %option with_pic no
  42. # list of sources
  43. Source0: ftp://ftp.openssl.org/source/openssl-%{version}.tar.gz
  44. Patch0: openssl.patch
  45. # build information
  46. Prefix: %{l_prefix}
  47. BuildRoot: %{l_buildroot}
  48. BuildPreReq: OpenPKG, openpkg >= 20040130, perl, make, gcc
  49. PreReq: OpenPKG, openpkg >= 20040130
  50. AutoReq: no
  51. AutoReqProv: no
  52. %description
  53. The OpenSSL Project is a collaborative effort to develop a robust,
  54. commercial-grade, full-featured, and Open Source toolkit implementing the
  55. Secure Sockets Layer (SSL v2/v3) and Transport Layer Security (TLS v1)
  56. protocols with full-strength cryptography world-wide. The project is
  57. managed by a worldwide community of volunteers that use the Internet to
  58. communicate, plan, and develop the OpenSSL tookit and its related
  59. documentation.
  60. %track
  61. prog openssl = {
  62. version = %{version}
  63. url = ftp://ftp.openssl.org/source/
  64. regex = openssl-(\d+\.\d+\.\d+[a-z]?)\.tar\.gz
  65. }
  66. %prep
  67. %setup -q
  68. %patch -p0
  69. %{l_shtool} subst \
  70. -e 's;-m486;-march=i486;g' \
  71. -e 's;-DZLIB;%{l_cppflags} -DZLIB;' \
  72. -e 's;-lz;%{l_ldflags} -lz;' \
  73. Configure
  74. %{l_shtool} subst \
  75. -e 's;BN_LLONG *;;' \
  76. Configure
  77. %{l_shtool} subst \
  78. -e 's;test "$OSTYPE" = msdosdjgpp;true;' \
  79. util/point.sh
  80. %build
  81. %{l_prefix}/bin/perl util/perlpath.pl %{l_prefix}/bin/perl
  82. PERL=%{l_prefix}/bin/perl \
  83. ./config \
  84. --prefix=%{l_prefix} \
  85. --openssldir=%{l_prefix}/etc/openssl \
  86. %if "%{with_pic}" == "yes"
  87. -fPIC \
  88. %endif
  89. %if "%{with_zlib}" == "yes"
  90. zlib \
  91. %else
  92. no-zlib \
  93. %endif
  94. %if "%{with_idea}" != "yes"
  95. no-idea \
  96. %endif
  97. %if "%{with_threads}" == "yes"
  98. threads
  99. %else
  100. no-threads
  101. %endif
  102. %{l_make} %{l_mflags}
  103. %install
  104. rm -rf $RPM_BUILD_ROOT
  105. %{l_make} %{l_mflags} install INSTALL_PREFIX=$RPM_BUILD_ROOT
  106. strip $RPM_BUILD_ROOT%{l_prefix}/bin/openssl >/dev/null 2>&1 || true
  107. ( cd $RPM_BUILD_ROOT%{l_prefix}
  108. rm -f bin/c_rehash
  109. rm -rf etc/openssl/private
  110. rm -rf etc/openssl/certs
  111. rm -rf etc/openssl/misc
  112. rm -rf etc/openssl/lib
  113. mv etc/openssl/man man
  114. cd man
  115. for dir in man[1-9]; do
  116. for file in `cd $dir; echo *`; do
  117. mv $dir/$file $dir/openssl_$file
  118. done
  119. done
  120. ) || exit $?
  121. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
  122. %{l_files_std} \
  123. '%config %{l_prefix}/etc/openssl/openssl.cnf' \
  124. '%not %dir %{l_prefix}/lib/pkgconfig'
  125. %files -f files
  126. %clean
  127. rm -rf $RPM_BUILD_ROOT