]> git.pld-linux.org Git - packages/gettext.git/blob - gettext.spec
- bcond desc, cleanup
[packages/gettext.git] / gettext.spec
1 #
2 # Conditional build:
3 %bcond_without  asprintf        # without libasprintf C++ library
4 %bcond_without  xemacs          # without po-mode for xemacs
5 %bcond_without  gcj             # with Java support by gcj (preferred over javac)
6 %bcond_with     javac           # with Java support by some javac
7 %bcond_without  dotnet          # without .NET support
8 %bcond_with     bootstrap       # use system GLib and libcroco
9 #
10
11 %{?with_dotnet:%include /usr/lib/rpm/macros.mono}
12
13 %ifnarch %{ix86} %{x8664} arm hppa ppc s390 s390x
14 %undefine with_dotnet
15 %endif
16 %ifarch i386
17 # plain i386 is not supported; mono uses cmpxchg/xadd which require i486
18 %undefine with_dotnet
19 %endif
20
21 %undefine with_xemacs
22
23 %define build_java      %{?with_gcj:1}%{!?with_gcj:%{?with_javac:1}%{!?with_javac:0}}
24 Summary:        Utilties for program national language support
25 Summary(de.UTF-8):      Utilities zum Programmieren von nationaler Sprachunterstützung
26 Summary(es.UTF-8):      Utilitarios para el programa de soporte a lenguas locales
27 Summary(fr.UTF-8):      Utilitaires pour le support de la langue nationnalepar les programmes
28 Summary(ja.UTF-8):      マルチリンガルメッセージを生成するためのGNU ライブラリ/ユーティリティ
29 Summary(pl.UTF-8):      Narzędzia dla programów ze wsparciem dla języków narodowych
30 Summary(pt_BR.UTF-8):   Utilitários para o programa de suporte de línguas locais
31 Summary(ru.UTF-8):      Библиотеки и утилиты для поддержки национальных языков
32 Summary(tr.UTF-8):      Desteği için kitaplık ve araçlar
33 Summary(uk.UTF-8):      Бібліотеки та утиліти для підтримки національних мов
34 Name:           gettext
35 Version:        0.17
36 Release:        1
37 License:        LGPL v2+ (libintl), GPL v3+ (tools)
38 Group:          Development/Tools
39 Source0:        ftp://ftp.gnu.org/gnu/gettext/%{name}-%{version}.tar.gz
40 # Source0-md5:  58a2bc6d39c0ba57823034d55d65d606
41 Patch0:         %{name}-info.patch
42 Patch1:         %{name}-killkillkill.patch
43 Patch2:         %{name}-pl.po-update.patch
44 Patch3:         %{name}-no_docs.patch
45 Patch4:         %{name}-libintl_by_gcj.patch
46 Patch5:         %{name}-removed_macros.patch
47 URL:            http://www.gnu.org/software/gettext/
48 BuildRequires:  autoconf >= 2.60
49 BuildRequires:  automake >= 1:1.10
50 %{?with_gcj:BuildRequires:      gcj >= 3.0}
51 %{!?with_bootstrap:BuildRequires:       glib2-devel >= 2.0}
52 %{?with_javac:BuildRequires:    jdk >= 1.1}
53 %{!?with_bootstrap:BuildRequires:       libcroco-devel >= 0.6.1}
54 %if "%(%{__cc} -dumpversion | grep -q '^4.[2-9]' ; echo $?)" == "0"
55 BuildRequires:  libgomp-devel
56 %endif
57 %{?with_asprintf:BuildRequires: libstdc++-devel}
58 BuildRequires:  libtool >= 1:1.4.2-9
59 %{?with_dotnet:BuildRequires:   mono-csharp}
60 BuildRequires:  texinfo
61 %{?with_xemacs:BuildRequires:   xemacs}
62 Obsoletes:      gettext-base
63 Conflicts:      intltool < 0.28
64 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
65
66 %description
67 The GNU gettext package provides a set of tools and documentation for
68 producing multi-lingual messages in programs. Tools include a set of
69 conventions about how programs should be written to support message
70 catalogs, a directory and file naming organization for the message
71 catalogs, a runtime library which supports the retrieval of translated
72 messages, and stand-alone programs for handling the translatable and
73 the already translated strings. Gettext provides an easy to use
74 library and tools for creating, using, and modifying natural language
75 catalogs and is a powerful and simple method for internationalizing
76 programs.
77
78 %description -l de.UTF-8
79 Die gettext-Library enthält eine einfach anzuwendende Library und
80 Tools zum Erstellen, Verwenden und Ändern von
81 natürlichsprachigen-Kataloge. Es ist ein einfaches und
82 leistungsfähiges Verfahren zum Lokalisieren von Programmen.
83
84 %description -l es.UTF-8
85 La biblioteca gettext nos ofrece una biblioteca fácil de usar y
86 herramientas para creación, uso y modificación de catálogos de
87 lenguaje natural. Es un potente y sencillo método de
88 internacionalización de programas.
89
90 %description -l fr.UTF-8
91 La librarie gettext fournit des outils et une librairie simple à
92 utiliser pour manipuler, créer, et modifier des catalogues de langage
93 naturel. C'est une méthode simple et puissante pour internationnaliser
94 les programmes.
95
96 %description -l ja.UTF-8
97 GNU gettext
98 パッケージはプログラム中でマルチリンガルメッセージを生成する
99 ためのツールと文書を供給する。ツールはメッセージカタログをサポートするために
100 プログラムがどのように書かれるべきかの申し合わせと、メッセージカタログのための
101 ディレクトリとファイル名の組織化と、翻訳されたメッセージの埋め合わせを
102 サポートするためのランタイムライブラリと、翻訳可能でかつすでに翻訳された文字列
103 を取り扱う独立したプログラムを含んでいる。gettext
104 は簡単に使えるライブラリ
105 と自然言語のカタログを生成、使用、修正するツールと、国際化プログラム
106 のための強力かつシンプルな方法を供給する。
107
108 %description -l pl.UTF-8
109 Pakiet gettext dostarcza narzędzi do tworzenia, używania i modyfikacji
110 katalogów języków narodowych. To jest prosta i wydajna metoda
111 lokalizacji (internacjonalizacji) programów.
112
113 %description -l pt_BR.UTF-8
114 A biblioteca gettext oferece uma biblioteca fácil de usar e
115 ferramentas para criação, uso e modificação de catálogos de linguagem
116 natural. Ele é um poderoso e simples método de internacionalização de
117 programas.
118
119 %description -l ru.UTF-8
120 Пакет gettext содержит библиотеку и простые в использовании
121 инструменты для создания, использования и модификации каталогов
122 национальных языков. Это простой и мощный метод для
123 интернационализации программ.
124
125 %description -l tr.UTF-8
126 gettext, yerel dil desteğinde kullanılan katalogları değiştirebilmek
127 için, kolayca kullanılabilen kitaplık ve araçları sağlar. Bu,
128 programları uluslararasılaştırmak için sıkça başvurulan, kuvvetli bir
129 yöntemdir.
130
131 %description -l uk.UTF-8
132 Пакет gettext містить бібліотеку та прості у використанні інструменти
133 для створення, використання та модифікації каталогів національних мов.
134 Це простий та потужний метод для інтернаціоналізації програм.
135
136 %package devel
137 Summary:        Utilties for program national language support
138 Summary(de.UTF-8):      Utilities zum Programmieren von nationaler Sprachunterstützung
139 Summary(fr.UTF-8):      Utilitaires pour le support de la langue nationnalepar les programmes
140 Summary(pl.UTF-8):      Narzędzia dla programów ze wsparciem dla języków narodowych
141 Summary(tr.UTF-8):      Desteği için kitaplık ve araçlar
142 License:        GPL v3+
143 Group:          Development/Tools
144 Requires(post,postun):  /sbin/ldconfig
145 Requires:       %{name} = %{version}-%{release}
146 Requires:       iconv
147 Conflicts:      autoconf < 2.52
148
149 %description devel
150 The gettext library provides an easy to use library and tools for
151 creating, using, and modifying natural language catalogs. It is a
152 powerfull and simple method for internationalizing programs.
153
154 %description devel -l pl.UTF-8
155 Pakiet gettext dostarcza narzędzi do tworzenia, używania i modyfikacji
156 katalogów języków narodowych. To jest prosta i wydajna metoda
157 lokalizacji (internacjonalizacji) programów.
158
159 %package static
160 Summary:        Static gettext utility libraries
161 Summary(pl.UTF-8):      Statyczne biblioteki narzędziowe gettext
162 License:        GPL v3+
163 Group:          Development/Libraries
164 Requires:       %{name}-devel = %{version}-%{release}
165
166 %description static
167 This package contains static versions of gettext utility libraries
168 (libgettextlib, libgettextsrc and libgettextpo).
169
170 %description static -l pl.UTF-8
171 Ten pakiet zawiera statyczne wersje bibliotek narzędziowych gettext
172 (libgettextlib, libgettextsrc i libgettextpo).
173
174 %package -n libasprintf
175 Summary:        GNU libasprintf - automatic formatted output to strings in C++
176 Summary(pl.UTF-8):      GNU libasprintf - automatyczne formatowanie wyjścia do łańcuchów w C++
177 License:        LGPL v2+
178 Group:          Libraries
179
180 %description -n libasprintf
181 This package makes the C formatted output routines (`fprintf' et al.)
182 usable in C++ programs, for use with the `<string>' strings and the
183 `<iostream>' streams.
184
185 %description -n libasprintf -l pl.UTF-8
186 Ten pakiet czyni funkcje C formatujące wyjście (fprintf i inne)
187 używalnymi w programach w C++, z łańcuchami <string> i strumieniami
188 <iostream>.
189
190 %package -n libasprintf-devel
191 Summary:        Header file and documentation for libasprintf
192 Summary(pl.UTF-8):      Plik nagłówkowy i dokumentacja dla libasprintf
193 License:        LGPL v2+
194 Group:          Development/Libraries
195 Requires:       libasprintf = %{version}-%{release}
196
197 %description -n libasprintf-devel
198 Header file and documentation for libasprintf.
199
200 %description -n libasprintf-devel -l pl.UTF-8
201 Plik nagłówkowy i dokumentacja dla libasprintf.
202
203 %package -n libasprintf-static
204 Summary:        Static libasprintf library
205 Summary(pl.UTF-8):      Statyczna biblioteka libasprintf
206 License:        LGPL v2+
207 Group:          Development/Libraries
208 Requires:       libasprintf-devel = %{version}-%{release}
209
210 %description -n libasprintf-static
211 Static libasprintf library.
212
213 %description -n libasprintf-static -l pl.UTF-8
214 Statyczna biblioteka libasprintf.
215
216 %package java
217 Summary:        Runtime classes for Java programs internationalization
218 Summary(pl.UTF-8):      Klasy do uruchamiania umiędzynarodowionych programów w Javie
219 License:        LGPL v2+
220 Group:          Development/Languages/Java
221 Requires:       %{name} = %{version}-%{release}
222
223 %description java
224 Runtime classes for Java programs internationalization.
225
226 %description java -l pl.UTF-8
227 Klasy do uruchamiania umiędzynarodowionych programów w Javie.
228
229 %package java-devel
230 Summary:        Development classes for Java programs internationalization
231 Summary(pl.UTF-8):      Klasy do umiędzynarodowiania programów w Javie dla programistów
232 License:        GPL v3+
233 Group:          Development/Tools
234 Requires:       %{name}-devel = %{version}-%{release}
235
236 %description java-devel
237 Development classes for Java programs internationalization.
238
239 %description java-devel -l pl.UTF-8
240 Klasy do umiędzynarodowiania programów w Javie dla programistów.
241
242 %package -n xemacs-po-mode-pkg
243 Summary:        Xemacs PO-mode
244 Summary(es.UTF-8):      Facilita la edición de archivos PO (internacionalización) con emacs
245 Summary(pl.UTF-8):      Tryb PO dla Xemacsa
246 Summary(pt_BR.UTF-8):   Facilita a edição de arquivos PO (internacionalização) com o emacs
247 License:        GPL v2+
248 Group:          Applications/Editors/Emacs
249 Requires:       xemacs
250
251 %description -n xemacs-po-mode-pkg
252 Emacs PO-mode.
253
254 %description -n xemacs-po-mode-pkg -l es.UTF-8
255 Este paquete suministra las herramientas para ayudar en la edición de
256 archivos PO, como documentado en el manual del usuario del GNU
257 gettext. Mira este manual para la documentación de uso, que no se
258 incluye aquí.
259
260 %description -n xemacs-po-mode-pkg -l pl.UTF-8
261 Tryb edycji PO dla emacsa.
262
263 %description -n xemacs-po-mode-pkg -l pt_BR.UTF-8
264 Este pacote provê as ferramentas para ajudar na edição de arquivos PO,
265 como documentado no manual do usuário do GNU gettext. Veja este manual
266 para a documentação de uso, a qual não é incluída aqui.
267
268 %package autopoint
269 Summary:        gettextize replacement
270 Summary(pl.UTF-8):      Zamiennik gettextize
271 License:        GPL v3+
272 Group:          Development/Tools
273 Requires:       %{name}-devel >= 0.10.35
274 Requires:       cvs
275
276 %description autopoint
277 The `autopoint' program copies standard gettext infrastructure files
278 into a source package. It extracts from a macro call of the form
279 `AM_GNU_GETTEXT_VERSION(VERSION)', found in the package's
280 `configure.in' or `configure.ac' file, the gettext version used by the
281 package, and copies the infrastructure files belonging to this version
282 into the package.
283
284 %description autopoint -l pl.UTF-8
285 Program autopoint kopiuje standardowe pliki infrastruktury gettexta do
286 pakietu źródłowego. Wyciąga użytą wersję gettexta z wywołania makra w
287 postaci AM_GNU_GETTEXT_VERSION(VERSION) w pliku configure.in lub
288 configure.ac i kopiuje do pakietu pliki infrastruktury należące do tej
289 wersji.
290
291 %package -n dotnet-gettext
292 Summary:        GNU gettext for C#
293 Summary(pl.UTF-8):      GNU gettext dla C#
294 License:        LGPL v2+ (GNU.Gettext library), GPL v3+ (tools)
295 Group:          Development/Tools
296
297 %description -n dotnet-gettext
298 GNU gettext for C#.
299
300 %description -n dotnet-gettext -l pl.UTF-8
301 GNU gettext dla C#.
302
303 %prep
304 %setup -q
305 %patch0 -p1
306 %patch1 -p1
307 %patch2 -p1
308 # patch not finished yet
309 #%patch3 -p1
310 %patch4 -p1
311 %patch5 -p1
312
313 %build
314 %{__libtoolize}
315 cd autoconf-lib-link
316 %{__aclocal} -I m4 -I ../m4
317 %{__autoconf}
318 %{__automake}
319 cd ../gettext-runtime
320 %{__aclocal} -I m4 -I gnulib-m4 -I ../autoconf-lib-link/m4 -I ../m4
321 %{__autoconf}
322 %{__autoheader}
323 %{__automake}
324 cd libasprintf
325 %{__aclocal} -I ../m4 -I ../../m4
326 %{__autoconf}
327 %{__autoheader}
328 %{__automake}
329 cd ../../gettext-tools
330 %{__aclocal} -I m4 -I gnulib-m4 -I libgettextpo/gnulib-m4 -I ../autoconf-lib-link/m4 -I ../gettext-runtime/m4 -I ../m4
331 %{__autoconf}
332 %{__autoheader}
333 %{__automake}
334 cd ..
335 %{__aclocal}
336 %{__autoconf}
337 %{__automake}
338 %configure \
339         %{?with_xemacs:--with-lispdir=%{_datadir}/xemacs-packages/lisp/po-mode} \
340         --enable-nls \
341         %{!?with_dotnet:--disable-csharp} \
342         %{?with_dotnet:--enable-csharp=mono} \
343         --without-included-gettext \
344         %{?with_bootstrap:--with-included-glib} \
345         %{?with_bootstrap:--with-included-libcroco}
346 %{__make} \
347         GMSGFMT=`pwd`/gettext-tools/src/msgfmt
348
349 # msgfmt has been built, so now we can update pl.gmos
350 %{__make} pl.gmo -C gettext-runtime/po \
351         GMSGFMT=`pwd`/gettext-tools/src/msgfmt
352 %{__make} pl.gmo -C gettext-tools/po \
353         GMSGFMT=`pwd`/gettext-tools/src/msgfmt
354
355 %if %{with xemacs}
356 cd gettext-tools/misc
357 EMACS=%{_bindir}/xemacs ./elisp-comp ./po-mode.el
358 %endif
359
360 %install
361 rm -rf $RPM_BUILD_ROOT
362 install -d $RPM_BUILD_ROOT/bin
363
364 %{__make} install \
365         DESTDIR=$RPM_BUILD_ROOT
366
367 mv -f $RPM_BUILD_ROOT%{_bindir}/{,n}gettext $RPM_BUILD_ROOT/bin
368
369 # these static libs are removed in install-exec-clean
370 install gettext-tools/gnulib-lib/.libs/libgettextlib.a \
371         gettext-tools/src/.libs/libgettextsrc.a $RPM_BUILD_ROOT%{_libdir}
372
373 rm -r $RPM_BUILD_ROOT%{_docdir}/gettext
374
375 %find_lang %{name}-runtime
376 %find_lang %{name}-tools
377
378 %clean
379 rm -rf $RPM_BUILD_ROOT
380
381 %post devel
382 /sbin/ldconfig
383 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
384
385 %postun devel
386 /sbin/ldconfig
387 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
388
389 %post   -n libasprintf -p /sbin/ldconfig
390 %postun -n libasprintf -p /sbin/ldconfig
391
392 %post -n libasprintf-devel
393 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
394
395 %postun -n libasprintf-devel
396 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
397
398 %files -f %{name}-runtime.lang
399 %defattr(644,root,root,755)
400 %attr(755,root,root) /bin/*
401 %attr(755,root,root) %{_bindir}/envsubst
402 %{_mandir}/man1/envsubst.1*
403 %{_mandir}/man1/gettext.1*
404 %{_mandir}/man1/ngettext.1*
405 %dir %{_libdir}/gettext
406 %dir %{_datadir}/gettext
407
408 %files devel -f %{name}-tools.lang
409 %defattr(644,root,root,755)
410 %doc AUTHORS ChangeLog NEWS README THANKS
411 %attr(755,root,root) %{_bindir}/*
412 %exclude %{_bindir}/autopoint
413 %exclude %{_bindir}/envsubst
414 %attr(755,root,root) %{_libdir}/libgettext*.so
415 %{_libdir}/libgettext*.la
416 # libgettextpo is for other programs, not used by gettext tools themselves
417 %attr(755,root,root) %{_libdir}/libgettextpo.so.*.*.*
418 %attr(755,root,root) %{_libdir}/preloadable_libintl.so
419 %attr(755,root,root) %{_libdir}/gettext/hostname
420 %attr(755,root,root) %{_libdir}/gettext/project-id
421 %attr(755,root,root) %{_libdir}/gettext/urlget
422 %attr(755,root,root) %{_libdir}/gettext/user-email
423 %{_includedir}/gettext-po.h
424 %{_aclocaldir}/*
425 %{_infodir}/gettext*.info*
426 %{_mandir}/man1/gettextize.1*
427 %{_mandir}/man1/msg*.1*
428 %{_mandir}/man1/recode-sr-latin.1*
429 %{_mandir}/man1/xgettext.1*
430 %{_mandir}/man3/*
431
432 %{_datadir}/gettext/ABOUT-NLS
433 %attr(755,root,root) %{_datadir}/gettext/config.rpath
434 %{_datadir}/gettext/gettext.h
435 %dir %{_datadir}/gettext/intl
436 %{_datadir}/gettext/intl/[!c]*
437 %attr(755,root,root) %{_datadir}/gettext/intl/config.charset
438 %{_datadir}/gettext/msgunfmt.tcl
439 %{_datadir}/gettext/po
440 %dir %{_datadir}/gettext/projects
441 %{_datadir}/gettext/projects/index
442 %attr(755,root,root) %{_datadir}/gettext/projects/team-address
443 %dir %{_datadir}/gettext/projects/GNOME
444 %{_datadir}/gettext/projects/GNOME/teams.*
445 %attr(755,root,root) %{_datadir}/gettext/projects/GNOME/team-address
446 %attr(755,root,root) %{_datadir}/gettext/projects/GNOME/trigger
447 %dir %{_datadir}/gettext/projects/KDE
448 %{_datadir}/gettext/projects/KDE/teams.*
449 %attr(755,root,root) %{_datadir}/gettext/projects/KDE/team-address
450 %attr(755,root,root) %{_datadir}/gettext/projects/KDE/trigger
451 %dir %{_datadir}/gettext/projects/TP
452 %{_datadir}/gettext/projects/TP/teams.*
453 %attr(755,root,root) %{_datadir}/gettext/projects/TP/team-address
454 %attr(755,root,root) %{_datadir}/gettext/projects/TP/trigger
455 %{_datadir}/gettext/styles
456
457 %files static
458 %defattr(644,root,root,755)
459 %{_libdir}/libgettext*.a
460
461 %if %{with asprintf}
462 %files -n libasprintf
463 %defattr(644,root,root,755)
464 %doc gettext-runtime/libasprintf/{AUTHORS,ChangeLog,README}
465 %attr(755,root,root) %{_libdir}/libasprintf.so.*.*.*
466
467 %files -n libasprintf-devel
468 %defattr(644,root,root,755)
469 %attr(755,root,root) %{_libdir}/libasprintf.so
470 %{_libdir}/libasprintf.la
471 %{_includedir}/autosprintf.h
472 %{_infodir}/autosprintf.info*
473
474 %files -n libasprintf-static
475 %defattr(644,root,root,755)
476 %{_libdir}/libasprintf.a
477 %endif
478
479 %if %{build_java}
480 %files java
481 %defattr(644,root,root,755)
482 %{_datadir}/gettext/libintl.jar
483
484 %files java-devel
485 %defattr(644,root,root,755)
486 %doc gettext-runtime/intl-java/javadoc2
487 %attr(755,root,root) %{_libdir}/gettext/gnu.gettext.DumpResource
488 %attr(755,root,root) %{_libdir}/gettext/gnu.gettext.GetURL
489 %{_datadir}/gettext/javaversion.class
490 %endif
491
492 %if %{with xemacs}
493 %files -n xemacs-po-mode-pkg
494 %defattr(644,root,root,755)
495 %dir %{_datadir}/xemacs-packages/lisp/po-mode
496 %{_datadir}/xemacs-packages/lisp/po-mode/*.elc
497 %endif
498
499 %files autopoint
500 %defattr(644,root,root,755)
501 %attr(755,root,root) %{_bindir}/autopoint
502 %{_datadir}/gettext/archive.tar.gz
503 %{_mandir}/man1/autopoint.1*
504
505 %if %{with dotnet}
506 %files -n dotnet-gettext
507 %defattr(644,root,root,755)
508 %{_libdir}/GNU.Gettext.dll
509 %{_libdir}/gettext/msgfmt.net.exe
510 %{_libdir}/gettext/msgunfmt.net.exe
511 %endif
This page took 0.097844 seconds and 3 git commands to generate.