libidn.spec 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. ##
  2. ## libidn.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: libidn
  25. Summary: International Domain Name (IDN) Library
  26. URL: http://www.gnu.org/software/libidn/
  27. Vendor: Simon Josefsson
  28. Packager: OpenPKG Foundation e.V.
  29. Distribution: OpenPKG Community
  30. Class: BASE
  31. Group: DNS
  32. License: LGPL
  33. Version: 1.24
  34. Release: 20120117
  35. # list of sources
  36. Source0: ftp://ftp.gnu.org/pub/gnu/libidn/libidn-%{version}.tar.gz
  37. Patch0: libidn.patch
  38. # build information
  39. BuildPreReq: OpenPKG, openpkg >= 20100101
  40. PreReq: OpenPKG, openpkg >= 20100101
  41. BuildPreReq: libiconv
  42. PreReq: libiconv
  43. %description
  44. GNU Libidn is an implementation of the Stringprep, Punycode and
  45. IDNA specifications defined by the IETF Internationalized Domain
  46. Names (IDN) working group, used for internationalized domain names.
  47. The library contains a generic Stringprep implementation that
  48. does Unicode 3.2 NFKC normalization, mapping and prohibitation of
  49. characters, and bidirectional character handling. Profiles for
  50. iSCSI, Kerberos 5, Nameprep, SASL and XMPP are included. Punycode
  51. and ASCII Compatible Encoding (ACE) via IDNA are supported. The
  52. Stringprep API consists of two main functions, one for converting
  53. data from the system's native representation into UTF-8, and
  54. one function to perform the Stringprep processing. Adding a
  55. new Stringprep profile for your application within the API is
  56. straightforward. The Punycode API consists of one encoding function
  57. and one decoding function. The IDNA API consists of the ToASCII
  58. and ToUnicode functions, as well as an high-level interface for
  59. converting entire domain names to and from the ACE encoded form.
  60. %track
  61. prog libidn = {
  62. version = %{version}
  63. url = ftp://ftp.gnu.org/pub/gnu/libidn/
  64. regex = libidn-(__VER__)\.tar\.gz
  65. }
  66. %prep
  67. %setup -q
  68. %patch -p0
  69. %{l_shtool} subst \
  70. -e 's;^\(SUBDIRS = .*\) doc \(.*\)$;\1 \2;' \
  71. Makefile.in
  72. %{l_shtool} subst \
  73. -e 's;^\(Libs: -L${libdir} -lidn\)$;\1 @LTLIBICONV@;' \
  74. libidn.pc.in
  75. %build
  76. CC="%{l_cc}" \
  77. CFLAGS="%{l_cflags -O}" \
  78. CPPFLAGS="%{l_cppflags}" \
  79. LDFLAGS="%{l_ldflags}" \
  80. MAKEINFO="true" \
  81. GREP=grep \
  82. ./configure \
  83. --prefix=%{l_prefix} \
  84. --includedir=%{l_prefix}/include/libidn \
  85. --with-libiconv-prefix=%{l_prefix} \
  86. --disable-shared \
  87. --disable-nls
  88. %{l_make} %{l_mflags -O}
  89. %install
  90. %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT"
  91. strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
  92. rm -f $RPM_BUILD_ROOT%{l_prefix}/info/dir
  93. rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/emacs
  94. rm -f $RPM_BUILD_ROOT%{l_prefix}/lib/Libidn.dll
  95. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
  96. %{l_files_std}
  97. %files -f files
  98. %clean