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