2 # - prepare package with web-files and java from contrib
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: LGPL v2.1+ (library), GPL v3+ (utilities)
27 Source0: http://ftp.gnu.org/gnu/libidn/%{name}-%{version}.tar.gz
28 # Source0-md5: 2ac3913b2d6c42bf445e7c55db3e2a99
29 Patch0: %{name}-info.patch
30 Patch1: %{name}-python.patch
31 Patch2: %{name}-pl.po-update.patch
32 URL: http://www.gnu.org/software/libidn/
33 BuildRequires: autoconf >= 2.61
34 BuildRequires: automake >= 1:1.10
35 %{?with_java:BuildRequires: gcc-java}
36 BuildRequires: gettext-devel >= 0.17
37 %{?with_java:BuildRequires: gjdoc}
38 BuildRequires: libtool >= 2:1.5
39 %{?with_dotnet:BuildRequires: mono}
40 BuildRequires: perl-base
41 %{?with_python:BuildRequires: python-devel >= 1:2.3}
42 %{?with_python:BuildRequires: rpm-pythonprov}
43 BuildRequires: rpmbuild(macros) >= 1.384
44 BuildRequires: rpm >= 4.4.9-56
45 BuildRequires: texinfo >= 4.7
46 Requires(post,postun): /sbin/ldconfig
47 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
50 %define _emacs_lispdir %{_datadir}/emacs/site-lisp
53 GNU Libidn is an implementation of the Stringprep, Punycode and IDNA
54 specifications defined by the IETF Internationalized Domain Names
55 (IDN) working group, used for internationalized domain names.
57 %description -l pl.UTF-8
58 GNU Libidn to implementacja specyfikacji Stringprep, Punycode i IDNA
59 zdefiniowanych przez grupę roboczą IETF Internationalized Domain Names
60 (IDN), zajmującą się umiędzynarodowionymi nazwami domen.
63 Summary: Header files for libidn library
64 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki libidn
66 Group: Development/Libraries
67 Requires: %{name} = %{version}-%{release}
70 Header files for libidn library.
72 %description devel -l pl.UTF-8
73 Pliki nagłówkowe biblioteki libidn.
76 Summary: Static libidn library
77 Summary(pl.UTF-8): Statyczna biblioteka libidn
79 Group: Development/Libraries
80 Requires: %{name}-devel = %{version}-%{release}
83 Static libidn library.
85 %description static -l pl.UTF-8
86 Statyczna biblioteka libidn.
88 %package -n dotnet-libidn
89 Summary: C# binding for libidn
90 Summary(pl.UTF-8): Wiązanie C# dla libidn
93 Requires: %{name} = %{version}-%{release}
95 %description -n dotnet-libidn
96 C# binding for libidn.
98 %description -n dotnet-libidn -l pl.UTF-8
99 Wiązanie C# dla libidn.
101 %package -n emacs-libidn-pkg
102 Summary: IDN support files for emacs
103 Summary(pl.UTF-8): Obsługa IDN dla emacsa
105 Group: Applications/Editors/Emacs
106 Requires: %{name} = %{version}-%{release}
108 %description -n emacs-libidn-pkg
109 IDN support files for emacs.
111 %description -n emacs-libidn-pkg -l pl.UTF-8
112 Obsługa IDN dla emacsa.
114 %package -n java-libidn
115 Summary: Java implementation of libidn
116 Summary(pl.UTF-8): Implementacja libidn w Javie
121 %description -n java-libidn
122 Java implementation of libidn (internationalized domain names
125 %description -n java-libidn -l pl.UTF-8
126 Implementacja libidn (biblioteki umiędzynarodowionych nazw domen) w
129 %package -n python-idn
130 Summary: Python interface to libidn
131 Summary(pl.UTF-8): Pythonowy interfejs do libidn
133 Group: Libraries/Python
134 Requires: %{name} = %{version}-%{release}
135 %pyrequires_eq python-libs
137 %description -n python-idn
138 Python interface to libidn (internationalized domain names library).
140 %description -n python-idn -l pl.UTF-8
141 Pythonowy interfejs do libidn (biblioteki umiędzynarodowionych nazw
152 # avoid different builds having different timestamps
153 # see http://lists.pld-linux.org/mailman/pipermail/pld-devel-en/2008-August/020363.html
154 d='$Date: 2009-04-11 08:20:46 $'
155 d=${d#?Date: }; d=${d%%%% *}; d=$(date -d "$d" '+%d %B %Y')
156 %{__sed} -i -e "s,@value{UPDATED},$d,g" doc/libidn.texi
161 %{__aclocal} -I m4 -I gl/m4 -I lib/gl/m4
165 JAR=%{_bindir}/fastjar \
167 %{?with_dotnet:--enable-csharp=mono}%{!?with_dotnet:--disable-csharp} \
168 %{?with_java:--enable-java} \
169 --with-lispdir=%{_emacs_lispdir}
174 %{__make} -C contrib/idn-python \
175 INCLUDE="%{py_incdir} %{rpmcflags} -I../../lib -L../../lib/.libs"
176 mv contrib/idn-python/idn.so python-idn.so
180 rm -rf $RPM_BUILD_ROOT
183 DESTDIR=$RPM_BUILD_ROOT
186 install -D python-idn.so $RPM_BUILD_ROOT%{py_sitedir}/idn.so
191 rm -f $RPM_BUILD_ROOT%{_infodir}/dir
194 rm -rf $RPM_BUILD_ROOT
198 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir %{_infodir} >/dev/null 2>&1
202 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir %{_infodir} >/dev/null 2>&1
204 %files -f %{name}.lang
205 %defattr(644,root,root,755)
206 %doc AUTHORS ChangeLog FAQ NEWS README* THANKS TODO doc/libidn.html contrib
207 %attr(755,root,root) %{_bindir}/idn
208 %attr(755,root,root) %{_libdir}/libidn.so.*.*.*
209 %attr(755,root,root) %ghost %{_libdir}/libidn.so.11
210 %{_mandir}/man1/idn.1*
211 %{_infodir}/libidn.info*
212 %{_infodir}/libidn-*.png
215 %defattr(644,root,root,755)
216 %attr(755,root,root) %{_libdir}/libidn.so
218 %{_includedir}/idn-*.h
219 %{_includedir}/idna.h
220 %{_includedir}/pr29.h
221 %{_includedir}/punycode.h
222 %{_includedir}/stringprep.h
224 %{_pkgconfigdir}/libidn.pc
225 %{_mandir}/man3/idn_*.3*
226 %{_mandir}/man3/idna_*.3*
227 %{_mandir}/man3/pr29_*.3*
228 %{_mandir}/man3/punycode_*.3*
229 %{_mandir}/man3/stringprep*.3*
230 %{_mandir}/man3/tld_*.3*
233 %defattr(644,root,root,755)
237 %files -n dotnet-libidn
238 %defattr(644,root,root,755)
239 # why not in gac? does it work here?
240 %{_libdir}/Libidn.dll
243 %files -n emacs-libidn-pkg
244 %defattr(644,root,root,755)
245 %{_emacs_lispdir}/*.el
248 %files -n java-libidn
249 %defattr(644,root,root,755)
250 %{_datadir}/java/libidn*.jar
255 %defattr(644,root,root,755)
256 %attr(755,root,root) %{py_sitedir}/idn.so