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