]> git.pld-linux.org Git - packages/libidn.git/blame - libidn.spec
switch to %use_default_jdk
[packages/libidn.git] / libidn.spec
CommitLineData
2bd4615b 1# TODO:
da817ab9 2# - prepare package with web-files from contrib and JNI (contrib/java, needs move to jdk)
2bd4615b 3#
2815d157 4# Conditional build:
acc88d94 5%if "%{pld_release}" == "ac"
2c025a85
JP
6%bcond_with dotnet # don't build C# binding
7%bcond_with java # don't build Java implementation
acc88d94 8%else
2c025a85
JP
9%bcond_without dotnet # don't build C# binding
10%bcond_without java # don't build Java implementation
acc88d94 11%endif
2c025a85
JP
12%bcond_without python # don't build python interface
13%bcond_without static_libs # static library
2815d157 14#
da817ab9 15%ifnarch %{ix86} %{x8664} alpha %{arm} hppa ppc s390 s390x sparc sparcv9 sparc64
043a7186
JB
16%undefine with_dotnet
17%endif
18%ifarch i386
19%undefine with_dotnet
20%endif
d6d2da3d
JP
21
22%{?with_java:%{?use_default_jdk}}
23
e2c9e4f6 24Summary: Internationalized string processing library
21d86bf8 25Summary(pl.UTF-8): Biblioteka do przetwarzania umiędzynarodowionych łańcuchów
e2c9e4f6 26Name: libidn
766a84a4 27Version: 1.42
bbc180a4 28Release: 1
5dad9eef 29License: GPL v2+ or LGPL v3+ (library), GPL v3+ (utilities)
e2c9e4f6 30Group: Libraries
13d9a623 31Source0: https://ftp.gnu.org/gnu/libidn/%{name}-%{version}.tar.gz
766a84a4 32# Source0-md5: fe061a95ae23979150a692d102dce4ad
e2c9e4f6 33Patch0: %{name}-info.patch
47ca58ee 34Patch1: %{name}-python.patch
e2c9e4f6 35URL: http://www.gnu.org/software/libidn/
b3692cda
JB
36BuildRequires: autoconf >= 2.61
37BuildRequires: automake >= 1:1.10
a7178c64 38BuildRequires: gettext-tools >= 0.21
d705574a 39BuildRequires: gtk-doc >= 1.1
d72098d7 40BuildRequires: help2man
d6d2da3d 41%{?with_java:%buildrequires_jdk}
e7bb0bee 42BuildRequires: libtool >= 2:2
043a7186 43%{?with_dotnet:BuildRequires: mono}
ead16428 44%{?with_dotnet:BuildRequires: mono-csharp}
f22ac790 45BuildRequires: perl-base
d72098d7 46BuildRequires: pkgconfig
6f6febb4 47%{?with_python:BuildRequires: python-devel >= 1:2.3}
d72098d7 48BuildRequires: rpm >= 4.4.9-56
d6d2da3d 49%{?with_java:BuildRequires: rpm-javaprov}
5ea30155 50%{?with_python:BuildRequires: rpm-pythonprov}
d6d2da3d 51BuildRequires: rpmbuild(macros) >= 2.021
faf69423 52BuildRequires: texinfo >= 4.7
e2c9e4f6
JB
53Requires(post,postun): /sbin/ldconfig
54BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
55
ab54d2cd
JB
56# is it correct?
57%define _emacs_lispdir %{_datadir}/emacs/site-lisp
58
e2c9e4f6
JB
59%description
60GNU Libidn is an implementation of the Stringprep, Punycode and IDNA
61specifications defined by the IETF Internationalized Domain Names
62(IDN) working group, used for internationalized domain names.
63
3591cf04 64%description -l pl.UTF-8
e2c9e4f6 65GNU Libidn to implementacja specyfikacji Stringprep, Punycode i IDNA
3591cf04
JR
66zdefiniowanych przez grupę roboczą IETF Internationalized Domain Names
67(IDN), zajmującą się umiędzynarodowionymi nazwami domen.
e2c9e4f6
JB
68
69%package devel
70Summary: Header files for libidn library
21d86bf8 71Summary(pl.UTF-8): Pliki nagłówkowe biblioteki libidn
658a2f28 72License: LGPL v2.1+
e2c9e4f6 73Group: Development/Libraries
5498ae81 74Requires: %{name} = %{version}-%{release}
e2c9e4f6
JB
75
76%description devel
77Header files for libidn library.
78
3591cf04
JR
79%description devel -l pl.UTF-8
80Pliki nagłówkowe biblioteki libidn.
e2c9e4f6
JB
81
82%package static
83Summary: Static libidn library
21d86bf8 84Summary(pl.UTF-8): Statyczna biblioteka libidn
658a2f28 85License: LGPL v2.1+
e2c9e4f6 86Group: Development/Libraries
5498ae81 87Requires: %{name}-devel = %{version}-%{release}
e2c9e4f6
JB
88
89%description static
90Static libidn library.
91
3591cf04 92%description static -l pl.UTF-8
e2c9e4f6
JB
93Statyczna biblioteka libidn.
94
043a7186
JB
95%package -n dotnet-libidn
96Summary: C# binding for libidn
21d86bf8 97Summary(pl.UTF-8): Wiązanie C# dla libidn
658a2f28 98License: LGPL v2.1+
043a7186
JB
99Group: Libraries
100Requires: %{name} = %{version}-%{release}
101
102%description -n dotnet-libidn
103C# binding for libidn.
104
3591cf04
JR
105%description -n dotnet-libidn -l pl.UTF-8
106Wiązanie C# dla libidn.
043a7186 107
ab54d2cd
JB
108%package -n emacs-libidn-pkg
109Summary: IDN support files for emacs
21d86bf8 110Summary(pl.UTF-8): Obsługa IDN dla emacsa
658a2f28 111License: GPL v3+
ab54d2cd 112Group: Applications/Editors/Emacs
5498ae81 113Requires: %{name} = %{version}-%{release}
ab54d2cd
JB
114
115%description -n emacs-libidn-pkg
116IDN support files for emacs.
117
3591cf04
JR
118%description -n emacs-libidn-pkg -l pl.UTF-8
119Obsługa IDN dla emacsa.
ab54d2cd 120
2815d157
JB
121%package -n java-libidn
122Summary: Java implementation of libidn
21d86bf8 123Summary(pl.UTF-8): Implementacja libidn w Javie
658a2f28 124License: LGPL v2.1+
2815d157
JB
125Group: Libraries
126Requires: jre
127
128%description -n java-libidn
129Java implementation of libidn (internationalized domain names
130library).
131
3591cf04
JR
132%description -n java-libidn -l pl.UTF-8
133Implementacja libidn (biblioteki umiędzynarodowionych nazw domen) w
2815d157
JB
134Javie.
135
136%package -n python-idn
137Summary: Python interface to libidn
21d86bf8 138Summary(pl.UTF-8): Pythonowy interfejs do libidn
658a2f28 139License: LGPL v2.1+
2815d157
JB
140Group: Libraries/Python
141Requires: %{name} = %{version}-%{release}
f671595e 142%pyrequires_eq python-libs
2815d157
JB
143
144%description -n python-idn
145Python interface to libidn (internationalized domain names library).
146
3591cf04
JR
147%description -n python-idn -l pl.UTF-8
148Pythonowy interfejs do libidn (biblioteki umiędzynarodowionych nazw
2815d157
JB
149domen).
150
e2c9e4f6
JB
151%prep
152%setup -q
b6e8491f 153%patch0 -p1
47ca58ee 154%patch1 -p1
48e22e2d 155
d705574a 156%{__rm} po/stamp-po
b6e8491f 157
5e5a643e
ER
158# avoid different builds having different timestamps
159# see http://lists.pld-linux.org/mailman/pipermail/pld-devel-en/2008-August/020363.html
8a5f7b48 160d='$Date: 2012-05-24 11:40:06 $'
aa2c1e29 161d=${d#?Date: }; d=${d%%%% *}; d=$(date -d "$d" '+%d %B %Y')
5e5a643e
ER
162%{__sed} -i -e "s,@value{UPDATED},$d,g" doc/libidn.texi
163
8a5f7b48
JB
164# remove it when "linking libtool libraries using a non-POSIX archiver ..." warning is gone
165# (after libidn or libtool change)
166%{__sed} -i -e '/AM_INIT_AUTOMAKE/s/-Werror//' configure.ac
167
e2c9e4f6 168%build
8c25db64 169%{__gettextize}
ecce1191 170%{__libtoolize}
9242c4a5 171%{__aclocal} -I m4 -I gl/m4 -I lib/gl/m4
ecce1191
JB
172%{__autoconf}
173%{__autoheader}
174%{__automake}
ab54d2cd 175%configure \
d705574a 176 --disable-silent-rules \
2c025a85 177 %{__enable_disable static_libs static} \
043a7186 178 %{?with_dotnet:--enable-csharp=mono}%{!?with_dotnet:--disable-csharp} \
d6d2da3d
JP
179 --with-lispdir=%{_emacs_lispdir} \
180%if %{with java}
181 JAR="%{java_home}/bin/jar" \
182 JAVAC="%{java_home}/bin/javac" \
183 JAVADOC="%{java_home}/bin/javadoc" \
184 --enable-java \
185 --with-java-prefix="%{java_home}"
186%endif
e2c9e4f6
JB
187
188%{__make}
189
6f6febb4 190%if %{with python}
2815d157 191%{__make} -C contrib/idn-python \
e349ab8a 192 INCLUDE="%{py_incdir} %{rpmcflags} -I../../lib -L../../lib/.libs"
da817ab9 193%{__mv} contrib/idn-python/idn.so python-idn.so
6f6febb4 194%endif
2815d157 195
e2c9e4f6
JB
196%install
197rm -rf $RPM_BUILD_ROOT
198
199%{__make} install \
200 DESTDIR=$RPM_BUILD_ROOT
201
6f6febb4 202%if %{with python}
acc88d94 203install -D python-idn.so $RPM_BUILD_ROOT%{py_sitedir}/idn.so
6f6febb4 204%endif
2815d157 205
8c25db64
JB
206%find_lang %{name}
207
777b5108
ER
208rm -f $RPM_BUILD_ROOT%{_infodir}/dir
209
e2c9e4f6
JB
210%clean
211rm -rf $RPM_BUILD_ROOT
212
213%post
214/sbin/ldconfig
215[ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir %{_infodir} >/dev/null 2>&1
216
217%postun
218/sbin/ldconfig
219[ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir %{_infodir} >/dev/null 2>&1
220
8c25db64 221%files -f %{name}.lang
e2c9e4f6 222%defattr(644,root,root,755)
bbc180a4 223%doc AUTHORS ChangeLog FAQ NEWS README* THANKS doc/libidn-components.pdf contrib/web
e2c9e4f6
JB
224%attr(755,root,root) %{_bindir}/idn
225%attr(755,root,root) %{_libdir}/libidn.so.*.*.*
add7d1f9 226%attr(755,root,root) %ghost %{_libdir}/libidn.so.12
e2c9e4f6
JB
227%{_mandir}/man1/idn.1*
228%{_infodir}/libidn.info*
98b8400c 229%{_infodir}/libidn-*.png
e2c9e4f6
JB
230
231%files devel
232%defattr(644,root,root,755)
233%attr(755,root,root) %{_libdir}/libidn.so
234%{_libdir}/libidn.la
1ff0f822
JB
235%{_includedir}/idn-*.h
236%{_includedir}/idna.h
237%{_includedir}/pr29.h
238%{_includedir}/punycode.h
239%{_includedir}/stringprep.h
240%{_includedir}/tld.h
e2c9e4f6 241%{_pkgconfigdir}/libidn.pc
cae643b1 242%{_mandir}/man3/idn_*.3*
1ff0f822
JB
243%{_mandir}/man3/idna_*.3*
244%{_mandir}/man3/pr29_*.3*
245%{_mandir}/man3/punycode_*.3*
246%{_mandir}/man3/stringprep*.3*
247%{_mandir}/man3/tld_*.3*
e2c9e4f6 248
2c025a85 249%if %{with static_libs}
e2c9e4f6
JB
250%files static
251%defattr(644,root,root,755)
252%{_libdir}/libidn.a
2c025a85 253%endif
ab54d2cd 254
043a7186
JB
255%if %{with dotnet}
256%files -n dotnet-libidn
257%defattr(644,root,root,755)
258# why not in gac? does it work here?
259%{_libdir}/Libidn.dll
260%endif
261
ab54d2cd
JB
262%files -n emacs-libidn-pkg
263%defattr(644,root,root,755)
264%{_emacs_lispdir}/*.el
2815d157
JB
265
266%if %{with java}
267%files -n java-libidn
268%defattr(644,root,root,755)
d72098d7 269%{_javadir}/libidn*.jar
2815d157
JB
270%endif
271
6f6febb4 272%if %{with python}
2815d157
JB
273%files -n python-idn
274%defattr(644,root,root,755)
275%attr(755,root,root) %{py_sitedir}/idn.so
6f6febb4 276%endif
This page took 0.18268 seconds and 4 git commands to generate.