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