]>
Commit | Line | Data |
---|---|---|
2bd4615b | 1 | # TODO: |
b7ba59bb | 2 | # - prepare package with web-files and java from contrib |
2bd4615b | 3 | # |
2815d157 | 4 | # Conditional build: |
acc88d94 ER |
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 | |
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 | # |
4c6b08d0 | 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 | 20 | Summary: Internationalized string processing library |
21d86bf8 | 21 | Summary(pl.UTF-8): Biblioteka do przetwarzania umiędzynarodowionych łańcuchów |
e2c9e4f6 | 22 | Name: libidn |
268ecb6e | 23 | Version: 1.10 |
b3692cda | 24 | Release: 1 |
658a2f28 | 25 | License: LGPL v2.1+ (library), GPL v3+ (utilities) |
e2c9e4f6 | 26 | Group: Libraries |
268ecb6e JB |
27 | Source0: http://ftp.gnu.org/gnu/libidn/%{name}-%{version}.tar.gz |
28 | # Source0-md5: 142c21f2bd922c84c4a3c3d469bbc596 | |
e2c9e4f6 | 29 | Patch0: %{name}-info.patch |
47ca58ee | 30 | Patch1: %{name}-python.patch |
e2c9e4f6 | 31 | URL: http://www.gnu.org/software/libidn/ |
b3692cda JB |
32 | BuildRequires: autoconf >= 2.61 |
33 | BuildRequires: automake >= 1:1.10 | |
b5892520 | 34 | %{?with_java:BuildRequires: gcc-java} |
1ff0f822 | 35 | BuildRequires: gettext-devel >= 0.17 |
b5892520 | 36 | %{?with_java:BuildRequires: gjdoc} |
5498ae81 | 37 | BuildRequires: libtool >= 2:1.5 |
043a7186 | 38 | %{?with_dotnet:BuildRequires: mono} |
f22ac790 | 39 | BuildRequires: perl-base |
6f6febb4 | 40 | %{?with_python:BuildRequires: python-devel >= 1:2.3} |
5ea30155 | 41 | %{?with_python:BuildRequires: rpm-pythonprov} |
a281a682 | 42 | BuildRequires: rpmbuild(macros) >= 1.384 |
acc88d94 | 43 | BuildRequires: rpm >= 4.4.9-56 |
faf69423 | 44 | BuildRequires: texinfo >= 4.7 |
e2c9e4f6 JB |
45 | Requires(post,postun): /sbin/ldconfig |
46 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
47 | ||
ab54d2cd JB |
48 | # is it correct? |
49 | %define _emacs_lispdir %{_datadir}/emacs/site-lisp | |
50 | ||
e2c9e4f6 JB |
51 | %description |
52 | GNU Libidn is an implementation of the Stringprep, Punycode and IDNA | |
53 | specifications defined by the IETF Internationalized Domain Names | |
54 | (IDN) working group, used for internationalized domain names. | |
55 | ||
3591cf04 | 56 | %description -l pl.UTF-8 |
e2c9e4f6 | 57 | GNU Libidn to implementacja specyfikacji Stringprep, Punycode i IDNA |
3591cf04 JR |
58 | zdefiniowanych przez grupę roboczą IETF Internationalized Domain Names |
59 | (IDN), zajmującą się umiędzynarodowionymi nazwami domen. | |
e2c9e4f6 JB |
60 | |
61 | %package devel | |
62 | Summary: Header files for libidn library | |
21d86bf8 | 63 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki libidn |
658a2f28 | 64 | License: LGPL v2.1+ |
e2c9e4f6 | 65 | Group: Development/Libraries |
5498ae81 | 66 | Requires: %{name} = %{version}-%{release} |
e2c9e4f6 JB |
67 | |
68 | %description devel | |
69 | Header files for libidn library. | |
70 | ||
3591cf04 JR |
71 | %description devel -l pl.UTF-8 |
72 | Pliki nagłówkowe biblioteki libidn. | |
e2c9e4f6 JB |
73 | |
74 | %package static | |
75 | Summary: Static libidn library | |
21d86bf8 | 76 | Summary(pl.UTF-8): Statyczna biblioteka libidn |
658a2f28 | 77 | License: LGPL v2.1+ |
e2c9e4f6 | 78 | Group: Development/Libraries |
5498ae81 | 79 | Requires: %{name}-devel = %{version}-%{release} |
e2c9e4f6 JB |
80 | |
81 | %description static | |
82 | Static libidn library. | |
83 | ||
3591cf04 | 84 | %description static -l pl.UTF-8 |
e2c9e4f6 JB |
85 | Statyczna biblioteka libidn. |
86 | ||
043a7186 JB |
87 | %package -n dotnet-libidn |
88 | Summary: C# binding for libidn | |
21d86bf8 | 89 | Summary(pl.UTF-8): Wiązanie C# dla libidn |
658a2f28 | 90 | License: LGPL v2.1+ |
043a7186 JB |
91 | Group: Libraries |
92 | Requires: %{name} = %{version}-%{release} | |
93 | ||
94 | %description -n dotnet-libidn | |
95 | C# binding for libidn. | |
96 | ||
3591cf04 JR |
97 | %description -n dotnet-libidn -l pl.UTF-8 |
98 | Wiązanie C# dla libidn. | |
043a7186 | 99 | |
ab54d2cd JB |
100 | %package -n emacs-libidn-pkg |
101 | Summary: IDN support files for emacs | |
21d86bf8 | 102 | Summary(pl.UTF-8): Obsługa IDN dla emacsa |
658a2f28 | 103 | License: GPL v3+ |
ab54d2cd | 104 | Group: Applications/Editors/Emacs |
5498ae81 | 105 | Requires: %{name} = %{version}-%{release} |
ab54d2cd JB |
106 | |
107 | %description -n emacs-libidn-pkg | |
108 | IDN support files for emacs. | |
109 | ||
3591cf04 JR |
110 | %description -n emacs-libidn-pkg -l pl.UTF-8 |
111 | Obsługa IDN dla emacsa. | |
ab54d2cd | 112 | |
2815d157 JB |
113 | %package -n java-libidn |
114 | Summary: Java implementation of libidn | |
21d86bf8 | 115 | Summary(pl.UTF-8): Implementacja libidn w Javie |
658a2f28 | 116 | License: LGPL v2.1+ |
2815d157 JB |
117 | Group: Libraries |
118 | Requires: jre | |
119 | ||
120 | %description -n java-libidn | |
121 | Java implementation of libidn (internationalized domain names | |
122 | library). | |
123 | ||
3591cf04 JR |
124 | %description -n java-libidn -l pl.UTF-8 |
125 | Implementacja libidn (biblioteki umiędzynarodowionych nazw domen) w | |
2815d157 JB |
126 | Javie. |
127 | ||
128 | %package -n python-idn | |
129 | Summary: Python interface to libidn | |
21d86bf8 | 130 | Summary(pl.UTF-8): Pythonowy interfejs do libidn |
658a2f28 | 131 | License: LGPL v2.1+ |
2815d157 JB |
132 | Group: Libraries/Python |
133 | Requires: %{name} = %{version}-%{release} | |
f671595e | 134 | %pyrequires_eq python-libs |
2815d157 JB |
135 | |
136 | %description -n python-idn | |
137 | Python interface to libidn (internationalized domain names library). | |
138 | ||
3591cf04 JR |
139 | %description -n python-idn -l pl.UTF-8 |
140 | Pythonowy interfejs do libidn (biblioteki umiędzynarodowionych nazw | |
2815d157 JB |
141 | domen). |
142 | ||
e2c9e4f6 JB |
143 | %prep |
144 | %setup -q | |
b6e8491f | 145 | %patch0 -p1 |
47ca58ee | 146 | %patch1 -p1 |
48e22e2d JB |
147 | |
148 | rm -f po/stamp-po | |
b6e8491f | 149 | |
e2c9e4f6 | 150 | %build |
8c25db64 | 151 | %{__gettextize} |
ecce1191 | 152 | %{__libtoolize} |
9242c4a5 | 153 | %{__aclocal} -I m4 -I gl/m4 -I lib/gl/m4 |
ecce1191 JB |
154 | %{__autoconf} |
155 | %{__autoheader} | |
156 | %{__automake} | |
949ca3bf | 157 | JAR=%{_bindir}/fastjar \ |
ab54d2cd | 158 | %configure \ |
043a7186 | 159 | %{?with_dotnet:--enable-csharp=mono}%{!?with_dotnet:--disable-csharp} \ |
2815d157 | 160 | %{?with_java:--enable-java} \ |
ab54d2cd | 161 | --with-lispdir=%{_emacs_lispdir} |
e2c9e4f6 JB |
162 | |
163 | %{__make} | |
164 | ||
6f6febb4 | 165 | %if %{with python} |
2815d157 | 166 | %{__make} -C contrib/idn-python \ |
e349ab8a | 167 | INCLUDE="%{py_incdir} %{rpmcflags} -I../../lib -L../../lib/.libs" |
acc88d94 | 168 | mv contrib/idn-python/idn.so python-idn.so |
6f6febb4 | 169 | %endif |
2815d157 | 170 | |
e2c9e4f6 JB |
171 | %install |
172 | rm -rf $RPM_BUILD_ROOT | |
173 | ||
174 | %{__make} install \ | |
175 | DESTDIR=$RPM_BUILD_ROOT | |
176 | ||
6f6febb4 | 177 | %if %{with python} |
acc88d94 | 178 | install -D python-idn.so $RPM_BUILD_ROOT%{py_sitedir}/idn.so |
6f6febb4 | 179 | %endif |
2815d157 | 180 | |
8c25db64 JB |
181 | %find_lang %{name} |
182 | ||
777b5108 ER |
183 | rm -f $RPM_BUILD_ROOT%{_infodir}/dir |
184 | ||
e2c9e4f6 JB |
185 | %clean |
186 | rm -rf $RPM_BUILD_ROOT | |
187 | ||
188 | %post | |
189 | /sbin/ldconfig | |
190 | [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir %{_infodir} >/dev/null 2>&1 | |
191 | ||
192 | %postun | |
193 | /sbin/ldconfig | |
194 | [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir %{_infodir} >/dev/null 2>&1 | |
195 | ||
8c25db64 | 196 | %files -f %{name}.lang |
e2c9e4f6 | 197 | %defattr(644,root,root,755) |
1b4dcaf7 | 198 | %doc AUTHORS ChangeLog FAQ NEWS README* THANKS TODO doc/libidn.html contrib |
e2c9e4f6 JB |
199 | %attr(755,root,root) %{_bindir}/idn |
200 | %attr(755,root,root) %{_libdir}/libidn.so.*.*.* | |
1ff0f822 | 201 | %attr(755,root,root) %ghost %{_libdir}/libidn.so.11 |
e2c9e4f6 JB |
202 | %{_mandir}/man1/idn.1* |
203 | %{_infodir}/libidn.info* | |
98b8400c | 204 | %{_infodir}/libidn-*.png |
e2c9e4f6 JB |
205 | |
206 | %files devel | |
207 | %defattr(644,root,root,755) | |
208 | %attr(755,root,root) %{_libdir}/libidn.so | |
209 | %{_libdir}/libidn.la | |
1ff0f822 JB |
210 | %{_includedir}/idn-*.h |
211 | %{_includedir}/idna.h | |
212 | %{_includedir}/pr29.h | |
213 | %{_includedir}/punycode.h | |
214 | %{_includedir}/stringprep.h | |
215 | %{_includedir}/tld.h | |
e2c9e4f6 | 216 | %{_pkgconfigdir}/libidn.pc |
1ff0f822 JB |
217 | %{_mandir}/man3/idna_*.3* |
218 | %{_mandir}/man3/pr29_*.3* | |
219 | %{_mandir}/man3/punycode_*.3* | |
220 | %{_mandir}/man3/stringprep*.3* | |
221 | %{_mandir}/man3/tld_*.3* | |
e2c9e4f6 JB |
222 | |
223 | %files static | |
224 | %defattr(644,root,root,755) | |
225 | %{_libdir}/libidn.a | |
ab54d2cd | 226 | |
043a7186 JB |
227 | %if %{with dotnet} |
228 | %files -n dotnet-libidn | |
229 | %defattr(644,root,root,755) | |
230 | # why not in gac? does it work here? | |
231 | %{_libdir}/Libidn.dll | |
232 | %endif | |
233 | ||
ab54d2cd JB |
234 | %files -n emacs-libidn-pkg |
235 | %defattr(644,root,root,755) | |
236 | %{_emacs_lispdir}/*.el | |
2815d157 JB |
237 | |
238 | %if %{with java} | |
239 | %files -n java-libidn | |
240 | %defattr(644,root,root,755) | |
754537de | 241 | %{_datadir}/java/libidn*.jar |
2815d157 JB |
242 | %endif |
243 | ||
6f6febb4 | 244 | %if %{with python} |
2815d157 JB |
245 | %files -n python-idn |
246 | %defattr(644,root,root,755) | |
247 | %attr(755,root,root) %{py_sitedir}/idn.so | |
6f6febb4 | 248 | %endif |