gnutls.spec 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. ##
  2. ## gnutls.spec -- OpenPKG RPM Package Specification
  3. ## Copyright (c) 2000-2012 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: 3.0.10
  34. Release: 20120105
  35. # package options
  36. %option with_cxx no
  37. # list of sources
  38. Source0: ftp://ftp.gnu.org/pub/gnu/gnutls/gnutls-%{version}.tar.xz
  39. # build information
  40. BuildPreReq: OpenPKG, openpkg >= 20100101
  41. PreReq: OpenPKG, openpkg >= 20100101
  42. BuildPreReq: gcc
  43. %if "%{with_cxx}" == "yes"
  44. BuildPreReq: gcc::with_cxx = yes
  45. %endif
  46. BuildPreReq: gcrypt, opencdk, libtasn1, zlib, getopt, nettle, p11kit, libiconv
  47. PreReq: gcrypt, opencdk, libtasn1, zlib, getopt, nettle, p11kit, libiconv
  48. %description
  49. GnuTLS is a project that aims to develop a library which provides a
  50. secure layer, over a reliable transport layer. Currently the GnuTLS
  51. library implements the proposed standards by the IETF's TLS working
  52. group (RFC2246, TLS 1.0).
  53. %track
  54. prog gnutls = {
  55. version = %{version}
  56. url = ftp://ftp.gnu.org/pub/gnu/gnutls/
  57. regex = gnutls-(\d+\.\d*[02468](\.\d+)+)\.tar\.bz2
  58. }
  59. %prep
  60. %setup -q
  61. %build
  62. libs=""
  63. case "%{l_platform -t}" in
  64. *-sunos* ) libs="-lsocket -lnsl" ;;
  65. esac
  66. echo 'ac_cv_type_ptrdiff_t=yes' >config.cache
  67. CC="%{l_cc}" \
  68. CFLAGS="%{l_cflags -O}" \
  69. %if "%{with_cxx}" == "yes"
  70. CXX="%{l_cxx}" \
  71. CXXFLAGS="%{l_cxxflags -O}" \
  72. %endif
  73. CPPFLAGS="%{l_cppflags} %{l_cppflags p11-kit-1 libidn .}" \
  74. LDFLAGS="%{l_ldflags}" \
  75. LIBS="$libs -lgetopt `%{l_prefix}/bin/gpg-error-config --libs` -lz" \
  76. GREP="grep" \
  77. ./configure \
  78. --cache-file=config.cache \
  79. --prefix=%{l_prefix} \
  80. --mandir=%{l_prefix}/man \
  81. --infodir=%{l_prefix}/info \
  82. --with-libtasn1-prefix=%{l_prefix} \
  83. --with-libz-prefix=%{l_prefix} \
  84. --with-libiconv-prefix=%{l_prefix} \
  85. --with-zlib \
  86. %if "%{with_cxx}" == "yes"
  87. --enable-cxx \
  88. %else
  89. --disable-cxx \
  90. %endif
  91. --disable-guile \
  92. --disable-nls \
  93. --disable-shared
  94. %{l_make} %{l_mflags -O}
  95. %install
  96. %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT"
  97. strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
  98. rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/locale
  99. rm -f $RPM_BUILD_ROOT%{l_prefix}/info/dir
  100. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
  101. %{l_files_std}
  102. %files -f files
  103. %clean