2 # - prepare package with web-files from contrib and JNI (contrib/java, needs move to jdk)
5 %if "%{pld_release}" == "ac"
6 %bcond_with dotnet # don't build C# binding
7 %bcond_with java # don't build Java implementation
9 %bcond_without dotnet # don't build C# binding
10 %bcond_without java # don't build Java implementation
12 %bcond_without python # don't build python interface
14 %ifnarch %{ix86} %{x8664} alpha %{arm} hppa ppc s390 s390x sparc sparcv9 sparc64
20 Summary: Internationalized string processing library
21 Summary(pl.UTF-8): Biblioteka do przetwarzania umiędzynarodowionych łańcuchów
25 License: GPL v2+ or LGPL v3+ (library), GPL v3+ (utilities)
27 Source0: https://ftp.gnu.org/gnu/libidn/%{name}-%{version}.tar.gz
28 # Source0-md5: 813c7b268d1051ca02c3610986126f38
29 Patch0: %{name}-info.patch
30 Patch1: %{name}-python.patch
31 URL: http://www.gnu.org/software/libidn/
32 BuildRequires: autoconf >= 2.61
33 BuildRequires: automake >= 1:1.10
34 BuildRequires: gettext-tools >= 0.19.3
35 %{?with_java:BuildRequires: gjdoc}
36 BuildRequires: gtk-doc >= 1.1
37 BuildRequires: help2man
38 %{?with_java:BuildRequires: jdk}
39 BuildRequires: libtool >= 2:2
40 %{?with_dotnet:BuildRequires: mono}
41 %{?with_dotnet:BuildRequires: mono-csharp}
42 BuildRequires: perl-base
43 BuildRequires: pkgconfig
44 %{?with_python:BuildRequires: python-devel >= 1:2.3}
45 BuildRequires: rpm >= 4.4.9-56
46 %{?with_python:BuildRequires: rpm-pythonprov}
47 BuildRequires: rpmbuild(macros) >= 1.384
48 BuildRequires: texinfo >= 4.7
49 Requires(post,postun): /sbin/ldconfig
50 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
53 %define _emacs_lispdir %{_datadir}/emacs/site-lisp
56 GNU Libidn is an implementation of the Stringprep, Punycode and IDNA
57 specifications defined by the IETF Internationalized Domain Names
58 (IDN) working group, used for internationalized domain names.
60 %description -l pl.UTF-8
61 GNU Libidn to implementacja specyfikacji Stringprep, Punycode i IDNA
62 zdefiniowanych przez grupę roboczą IETF Internationalized Domain Names
63 (IDN), zajmującą się umiędzynarodowionymi nazwami domen.
66 Summary: Header files for libidn library
67 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki libidn
69 Group: Development/Libraries
70 Requires: %{name} = %{version}-%{release}
73 Header files for libidn library.
75 %description devel -l pl.UTF-8
76 Pliki nagłówkowe biblioteki libidn.
79 Summary: Static libidn library
80 Summary(pl.UTF-8): Statyczna biblioteka libidn
82 Group: Development/Libraries
83 Requires: %{name}-devel = %{version}-%{release}
86 Static libidn library.
88 %description static -l pl.UTF-8
89 Statyczna biblioteka libidn.
91 %package -n dotnet-libidn
92 Summary: C# binding for libidn
93 Summary(pl.UTF-8): Wiązanie C# dla libidn
96 Requires: %{name} = %{version}-%{release}
98 %description -n dotnet-libidn
99 C# binding for libidn.
101 %description -n dotnet-libidn -l pl.UTF-8
102 Wiązanie C# dla libidn.
104 %package -n emacs-libidn-pkg
105 Summary: IDN support files for emacs
106 Summary(pl.UTF-8): Obsługa IDN dla emacsa
108 Group: Applications/Editors/Emacs
109 Requires: %{name} = %{version}-%{release}
111 %description -n emacs-libidn-pkg
112 IDN support files for emacs.
114 %description -n emacs-libidn-pkg -l pl.UTF-8
115 Obsługa IDN dla emacsa.
117 %package -n java-libidn
118 Summary: Java implementation of libidn
119 Summary(pl.UTF-8): Implementacja libidn w Javie
124 %description -n java-libidn
125 Java implementation of libidn (internationalized domain names
128 %description -n java-libidn -l pl.UTF-8
129 Implementacja libidn (biblioteki umiędzynarodowionych nazw domen) w
132 %package -n python-idn
133 Summary: Python interface to libidn
134 Summary(pl.UTF-8): Pythonowy interfejs do libidn
136 Group: Libraries/Python
137 Requires: %{name} = %{version}-%{release}
138 %pyrequires_eq python-libs
140 %description -n python-idn
141 Python interface to libidn (internationalized domain names library).
143 %description -n python-idn -l pl.UTF-8
144 Pythonowy interfejs do libidn (biblioteki umiędzynarodowionych nazw
154 # avoid different builds having different timestamps
155 # see http://lists.pld-linux.org/mailman/pipermail/pld-devel-en/2008-August/020363.html
156 d='$Date: 2012-05-24 11:40:06 $'
157 d=${d#?Date: }; d=${d%%%% *}; d=$(date -d "$d" '+%d %B %Y')
158 %{__sed} -i -e "s,@value{UPDATED},$d,g" doc/libidn.texi
160 # remove it when "linking libtool libraries using a non-POSIX archiver ..." warning is gone
161 # (after libidn or libtool change)
162 %{__sed} -i -e '/AM_INIT_AUTOMAKE/s/-Werror//' configure.ac
164 # rebuild from sources
165 %{__rm} java/libidn-%{version}.jar
170 %{__aclocal} -I m4 -I gl/m4 -I lib/gl/m4
175 --disable-silent-rules \
176 %{?with_dotnet:--enable-csharp=mono}%{!?with_dotnet:--disable-csharp} \
177 %{?with_java:--enable-java} \
178 --with-lispdir=%{_emacs_lispdir}
183 %{__make} -C contrib/idn-python \
184 INCLUDE="%{py_incdir} %{rpmcflags} -I../../lib -L../../lib/.libs"
185 %{__mv} contrib/idn-python/idn.so python-idn.so
189 rm -rf $RPM_BUILD_ROOT
192 DESTDIR=$RPM_BUILD_ROOT
195 install -D python-idn.so $RPM_BUILD_ROOT%{py_sitedir}/idn.so
200 rm -f $RPM_BUILD_ROOT%{_infodir}/dir
203 rm -rf $RPM_BUILD_ROOT
207 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir %{_infodir} >/dev/null 2>&1
211 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir %{_infodir} >/dev/null 2>&1
213 %files -f %{name}.lang
214 %defattr(644,root,root,755)
215 %doc AUTHORS ChangeLog FAQ NEWS README* THANKS TODO doc/libidn.html contrib/web
216 %attr(755,root,root) %{_bindir}/idn
217 %attr(755,root,root) %{_libdir}/libidn.so.*.*.*
218 %attr(755,root,root) %ghost %{_libdir}/libidn.so.12
219 %{_mandir}/man1/idn.1*
220 %{_infodir}/libidn.info*
221 %{_infodir}/libidn-*.png
224 %defattr(644,root,root,755)
225 %attr(755,root,root) %{_libdir}/libidn.so
227 %{_includedir}/idn-*.h
228 %{_includedir}/idna.h
229 %{_includedir}/pr29.h
230 %{_includedir}/punycode.h
231 %{_includedir}/stringprep.h
233 %{_pkgconfigdir}/libidn.pc
234 %{_mandir}/man3/idn_*.3*
235 %{_mandir}/man3/idna_*.3*
236 %{_mandir}/man3/pr29_*.3*
237 %{_mandir}/man3/punycode_*.3*
238 %{_mandir}/man3/stringprep*.3*
239 %{_mandir}/man3/tld_*.3*
242 %defattr(644,root,root,755)
246 %files -n dotnet-libidn
247 %defattr(644,root,root,755)
248 # why not in gac? does it work here?
249 %{_libdir}/Libidn.dll
252 %files -n emacs-libidn-pkg
253 %defattr(644,root,root,755)
254 %{_emacs_lispdir}/*.el
257 %files -n java-libidn
258 %defattr(644,root,root,755)
259 %{_javadir}/libidn*.jar
264 %defattr(644,root,root,755)
265 %attr(755,root,root) %{py_sitedir}/idn.so