gnutls.spec 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. ##
  2. ## gnutls.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. # package information
  24. Name: gnutls
  25. Summary: GNU SSL/TLS Library
  26. URL: http://www.gnu.org/software/gnutls/
  27. Vendor: Free Software Foundation
  28. Packager: OpenPKG Foundation e.V.
  29. Distribution: OpenPKG Community
  30. Class: PLUS
  31. Group: SSL
  32. License: LGPL
  33. Version: 2.6.6
  34. Release: 20090430
  35. # package options
  36. %option with_cxx no
  37. # list of sources
  38. Source0: ftp://ftp.gnu.org/pub/gnu/gnutls/gnutls-%{version}.tar.bz2
  39. Patch0: gnutls.patch
  40. # build information
  41. Prefix: %{l_prefix}
  42. BuildRoot: %{l_buildroot}
  43. BuildPreReq: OpenPKG, openpkg >= 20040130
  44. PreReq: OpenPKG, openpkg >= 20040130
  45. BuildPreReq: gcc
  46. %if "%{with_cxx}" == "yes"
  47. BuildPreReq: gcc::with_cxx = yes
  48. %endif
  49. BuildPreReq: gcrypt >= 1.2.4, opencdk >= 0.6.4, libtasn1 >= 1.1, lzo, zlib, getopt
  50. PreReq: gcrypt >= 1.2.4, opencdk >= 0.6.4, libtasn1 >= 1.1, lzo, zlib, getopt
  51. AutoReq: no
  52. AutoReqProv: no
  53. %description
  54. GnuTLS is a project that aims to develop a library which provides a
  55. secure layer, over a reliable transport layer. Currently the GnuTLS
  56. library implements the proposed standards by the IETF's TLS working
  57. group (RFC2246, TLS 1.0).
  58. %track
  59. prog gnutls = {
  60. version = %{version}
  61. url = ftp://ftp.gnu.org/pub/gnu/gnutls/
  62. regex = gnutls-(\d+\.\d*[02468](\.\d+)+)\.tar\.bz2
  63. }
  64. %prep
  65. %setup -q
  66. %patch -p0
  67. %build
  68. libs=""
  69. case "%{l_platform -t}" in
  70. *-sunos* ) libs="-lsocket -lnsl" ;;
  71. esac
  72. echo 'ac_cv_type_ptrdiff_t=yes' >config.cache
  73. CC="%{l_cc}" \
  74. CFLAGS="%{l_cflags -O}" \
  75. %if "%{with_cxx}" == "yes"
  76. CXX="%{l_cxx}" \
  77. CXXFLAGS="%{l_cxxflags -O}" \
  78. %endif
  79. CPPFLAGS="%{l_cppflags} %{l_cppflags lzo}" \
  80. LDFLAGS="%{l_ldflags}" \
  81. LIBS="$libs -lgetopt `%{l_prefix}/bin/gpg-error-config --libs` -lz" \
  82. GREP="grep" \
  83. ./configure \
  84. --cache-file=config.cache \
  85. --prefix=%{l_prefix} \
  86. --mandir=%{l_prefix}/man \
  87. --infodir=%{l_prefix}/info \
  88. --with-libgcrypt-prefix=%{l_prefix} \
  89. --with-libopencdk-prefix=%{l_prefix} \
  90. --with-libtasn1-prefix=%{l_prefix} \
  91. --with-libz-prefix=%{l_prefix} \
  92. --with-zlib \
  93. --with-lzo \
  94. --without-included-lzo \
  95. %if "%{with_cxx}" == "yes"
  96. --enable-cxx \
  97. %else
  98. --disable-cxx \
  99. %endif
  100. --disable-guile \
  101. --disable-nls \
  102. --disable-shared
  103. %{l_make} %{l_mflags -O}
  104. %install
  105. rm -rf $RPM_BUILD_ROOT
  106. %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT"
  107. strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
  108. rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/locale
  109. rm -f $RPM_BUILD_ROOT%{l_prefix}/info/dir
  110. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
  111. %{l_files_std}
  112. %files -f files
  113. %clean
  114. rm -rf $RPM_BUILD_ROOT