libidn.spec 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. ##
  2. ## libidn.spec -- OpenPKG RPM Package Specification
  3. ## Copyright (c) 2000-2008 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.9
  34. Release: 20080820
  35. # list of sources
  36. Source0: ftp://ftp.gnu.org/pub/gnu/libidn/libidn-%{version}.tar.gz
  37. # build information
  38. Prefix: %{l_prefix}
  39. BuildRoot: %{l_buildroot}
  40. BuildPreReq: OpenPKG, openpkg >= 20040130
  41. PreReq: OpenPKG, openpkg >= 20040130
  42. BuildPreReq: libiconv
  43. PreReq: libiconv
  44. AutoReq: no
  45. AutoReqProv: no
  46. %description
  47. GNU Libidn is an implementation of the Stringprep, Punycode and
  48. IDNA specifications defined by the IETF Internationalized Domain
  49. Names (IDN) working group, used for internationalized domain names.
  50. The library contains a generic Stringprep implementation that
  51. does Unicode 3.2 NFKC normalization, mapping and prohibitation of
  52. characters, and bidirectional character handling. Profiles for
  53. iSCSI, Kerberos 5, Nameprep, SASL and XMPP are included. Punycode
  54. and ASCII Compatible Encoding (ACE) via IDNA are supported. The
  55. Stringprep API consists of two main functions, one for converting
  56. data from the system's native representation into UTF-8, and
  57. one function to perform the Stringprep processing. Adding a
  58. new Stringprep profile for your application within the API is
  59. straightforward. The Punycode API consists of one encoding function
  60. and one decoding function. The IDNA API consists of the ToASCII
  61. and ToUnicode functions, as well as an high-level interface for
  62. converting entire domain names to and from the ACE encoded form.
  63. %track
  64. prog libidn = {
  65. version = %{version}
  66. url = ftp://ftp.gnu.org/pub/gnu/libidn/
  67. regex = libidn-(__VER__)\.tar\.gz
  68. }
  69. %prep
  70. %setup -q
  71. %{l_shtool} subst \
  72. -e '/LINENO: error: C[+]* preprocessor/{N;N;N;N;s/.*/:/;}' \
  73. configure
  74. %{l_shtool} subst \
  75. -e 's;^\(SUBDIRS = .*\) doc \(.*\)$;\1 \2;' \
  76. Makefile.in
  77. %{l_shtool} subst \
  78. -e 's;^\(Libs: -L${libdir} -lidn\)$;\1 @LTLIBICONV@;' \
  79. libidn.pc.in
  80. %{l_shtool} subst \
  81. -e 's;^\(#if \)\(@HAVE_SYS_BITYPES_H@\)\( && ! defined __BIT_TYPES_DEFINED__.*\)$;\1(\2+0)\3;' \
  82. lib/gl/stdint_.h
  83. %{l_shtool} subst \
  84. -e 's;string.h $(WCHAR_H);string.h stdint.h $(WCHAR_H);' \
  85. lib/gl/Makefile.in
  86. %build
  87. CC="%{l_cc}" \
  88. CFLAGS="%{l_cflags -O}" \
  89. CPPFLAGS="%{l_cppflags}" \
  90. LDFLAGS="%{l_ldflags}" \
  91. MAKEINFO="true" \
  92. GREP=grep \
  93. ./configure \
  94. --prefix=%{l_prefix} \
  95. --includedir=%{l_prefix}/include/libidn \
  96. --with-libiconv-prefix=%{l_prefix} \
  97. --disable-shared \
  98. --disable-nls
  99. %{l_make} %{l_mflags -O}
  100. %install
  101. rm -rf $RPM_BUILD_ROOT
  102. %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT"
  103. strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
  104. rm -f $RPM_BUILD_ROOT%{l_prefix}/info/dir
  105. rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/emacs
  106. rm -f $RPM_BUILD_ROOT%{l_prefix}/lib/Libidn.dll
  107. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
  108. %{l_files_std}
  109. %files -f files
  110. %clean
  111. rm -rf $RPM_BUILD_ROOT