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