|
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 |
|
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: 20120529 |
|
36 |
|
37 # list of sources |
|
38 Source0: ftp://ftp.gnu.org/pub/gnu/libidn/libidn-%{version}.tar.gz |
|
39 Patch0: libidn.patch |
|
40 |
|
41 # build information |
|
42 BuildPreReq: OpenPKG, openpkg >= 20100101 |
|
43 PreReq: OpenPKG, openpkg >= 20100101 |
|
44 BuildPreReq: libiconv |
|
45 PreReq: libiconv |
|
46 |
|
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. |
|
64 |
|
65 %track |
|
66 prog libidn = { |
|
67 version = %{version} |
|
68 url = ftp://ftp.gnu.org/pub/gnu/libidn/ |
|
69 regex = libidn-(__VER__)\.tar\.gz |
|
70 } |
|
71 |
|
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 |
|
82 %build |
|
83 CC="%{l_cc}" \ |
|
84 CFLAGS="%{l_cflags -O}" \ |
|
85 CPPFLAGS="%{l_cppflags}" \ |
|
86 LDFLAGS="%{l_ldflags}" \ |
|
87 MAKEINFO="true" \ |
|
88 GREP=grep \ |
|
89 ./configure \ |
|
90 --prefix=%{l_prefix} \ |
|
91 --includedir=%{l_prefix}/include/libidn \ |
|
92 --with-libiconv-prefix=%{l_prefix} \ |
|
93 --disable-shared \ |
|
94 --disable-nls |
|
95 %{l_make} %{l_mflags -O} |
|
96 |
|
97 %install |
|
98 %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT" |
|
99 strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true |
|
100 rm -f $RPM_BUILD_ROOT%{l_prefix}/info/dir |
|
101 rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/emacs |
|
102 rm -f $RPM_BUILD_ROOT%{l_prefix}/lib/Libidn.dll |
|
103 %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \ |
|
104 %{l_files_std} |
|
105 |
|
106 %files -f files |
|
107 |
|
108 %clean |
|
109 |