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