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
11 %{?with_dotnet:%include /usr/lib/rpm/macros.mono}
13 %ifnarch %{ix86} %{x8664} arm hppa ppc s390 s390x
17 # plain i386 is not supported; mono uses cmpxchg/xadd which require i486
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): Бібліотеки та утиліти для підтримки національних мов
37 License: LGPL v2+ (libintl), GPL v3+ (tools)
38 Group: Development/Tools
39 Source0: http://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 "%(echo %{cc_version} | grep -q '^4.[2-9]'; echo $?)" == "0"
55 BuildRequires: libgomp-devel
57 %{?with_asprintf:BuildRequires: libstdc++-devel}
58 BuildRequires: libtool >= 1:1.4.2-9
59 %{?with_dotnet:BuildRequires: mono-csharp}
60 BuildRequires: rpmbuild(macros) >= 1.453
61 BuildRequires: texinfo
62 %{?with_xemacs:BuildRequires: xemacs}
63 Obsoletes: gettext-base
64 Conflicts: intltool < 0.28
65 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
68 The GNU gettext package provides a set of tools and documentation for
69 producing multi-lingual messages in programs. Tools include a set of
70 conventions about how programs should be written to support message
71 catalogs, a directory and file naming organization for the message
72 catalogs, a runtime library which supports the retrieval of translated
73 messages, and stand-alone programs for handling the translatable and
74 the already translated strings. Gettext provides an easy to use
75 library and tools for creating, using, and modifying natural language
76 catalogs and is a powerful and simple method for internationalizing
79 %description -l de.UTF-8
80 Die gettext-Library enthält eine einfach anzuwendende Library und
81 Tools zum Erstellen, Verwenden und Ändern von
82 natürlichsprachigen-Kataloge. Es ist ein einfaches und
83 leistungsfähiges Verfahren zum Lokalisieren von Programmen.
85 %description -l es.UTF-8
86 La biblioteca gettext nos ofrece una biblioteca fácil de usar y
87 herramientas para creación, uso y modificación de catálogos de
88 lenguaje natural. Es un potente y sencillo método de
89 internacionalización de programas.
91 %description -l fr.UTF-8
92 La librarie gettext fournit des outils et une librairie simple à
93 utiliser pour manipuler, créer, et modifier des catalogues de langage
94 naturel. C'est une méthode simple et puissante pour internationnaliser
97 %description -l ja.UTF-8
99 パッケージはプログラム中でマルチリンガルメッセージを生成する
100 ためのツールと文書を供給する。ツールはメッセージカタログをサポートするために
101 プログラムがどのように書かれるべきかの申し合わせと、メッセージカタログのための
102 ディレクトリとファイル名の組織化と、翻訳されたメッセージの埋め合わせを
103 サポートするためのランタイムライブラリと、翻訳可能でかつすでに翻訳された文字列
104 を取り扱う独立したプログラムを含んでいる。gettext
106 と自然言語のカタログを生成、使用、修正するツールと、国際化プログラム
107 のための強力かつシンプルな方法を供給する。
109 %description -l pl.UTF-8
110 Pakiet gettext dostarcza narzędzi do tworzenia, używania i modyfikacji
111 katalogów języków narodowych. To jest prosta i wydajna metoda
112 lokalizacji (internacjonalizacji) programów.
114 %description -l pt_BR.UTF-8
115 A biblioteca gettext oferece uma biblioteca fácil de usar e
116 ferramentas para criação, uso e modificação de catálogos de linguagem
117 natural. Ele é um poderoso e simples método de internacionalização de
120 %description -l ru.UTF-8
121 Пакет gettext содержит библиотеку и простые в использовании
122 инструменты для создания, использования и модификации каталогов
123 национальных языков. Это простой и мощный метод для
124 интернационализации программ.
126 %description -l tr.UTF-8
127 gettext, yerel dil desteğinde kullanılan katalogları değiştirebilmek
128 için, kolayca kullanılabilen kitaplık ve araçları sağlar. Bu,
129 programları uluslararasılaştırmak için sıkça başvurulan, kuvvetli bir
132 %description -l uk.UTF-8
133 Пакет gettext містить бібліотеку та прості у використанні інструменти
134 для створення, використання та модифікації каталогів національних мов.
135 Це простий та потужний метод для інтернаціоналізації програм.
138 Summary: Utilties for program national language support
139 Summary(de.UTF-8): Utilities zum Programmieren von nationaler Sprachunterstützung
140 Summary(fr.UTF-8): Utilitaires pour le support de la langue nationnalepar les programmes
141 Summary(pl.UTF-8): Narzędzia dla programów ze wsparciem dla języków narodowych
142 Summary(tr.UTF-8): Desteği için kitaplık ve araçlar
144 Group: Development/Tools
145 Requires(post,postun): /sbin/ldconfig
146 Requires: %{name} = %{version}-%{release}
148 Conflicts: autoconf < 2.52
151 The gettext library provides an easy to use library and tools for
152 creating, using, and modifying natural language catalogs. It is a
153 powerfull and simple method for internationalizing programs.
155 %description devel -l pl.UTF-8
156 Pakiet gettext dostarcza narzędzi do tworzenia, używania i modyfikacji
157 katalogów języków narodowych. To jest prosta i wydajna metoda
158 lokalizacji (internacjonalizacji) programów.
161 Summary: Static gettext utility libraries
162 Summary(pl.UTF-8): Statyczne biblioteki narzędziowe gettext
164 Group: Development/Libraries
165 Requires: %{name}-devel = %{version}-%{release}
168 This package contains static versions of gettext utility libraries
169 (libgettextlib, libgettextsrc and libgettextpo).
171 %description static -l pl.UTF-8
172 Ten pakiet zawiera statyczne wersje bibliotek narzędziowych gettext
173 (libgettextlib, libgettextsrc i libgettextpo).
175 %package -n libasprintf
176 Summary: GNU libasprintf - automatic formatted output to strings in C++
177 Summary(pl.UTF-8): GNU libasprintf - automatyczne formatowanie wyjścia do łańcuchów w C++
181 %description -n libasprintf
182 This package makes the C formatted output routines (`fprintf' et al.)
183 usable in C++ programs, for use with the `<string>' strings and the
184 `<iostream>' streams.
186 %description -n libasprintf -l pl.UTF-8
187 Ten pakiet czyni funkcje C formatujące wyjście (fprintf i inne)
188 używalnymi w programach w C++, z łańcuchami <string> i strumieniami
191 %package -n libasprintf-devel
192 Summary: Header file and documentation for libasprintf
193 Summary(pl.UTF-8): Plik nagłówkowy i dokumentacja dla libasprintf
195 Group: Development/Libraries
196 Requires: libasprintf = %{version}-%{release}
198 %description -n libasprintf-devel
199 Header file and documentation for libasprintf.
201 %description -n libasprintf-devel -l pl.UTF-8
202 Plik nagłówkowy i dokumentacja dla libasprintf.
204 %package -n libasprintf-static
205 Summary: Static libasprintf library
206 Summary(pl.UTF-8): Statyczna biblioteka libasprintf
208 Group: Development/Libraries
209 Requires: libasprintf-devel = %{version}-%{release}
211 %description -n libasprintf-static
212 Static libasprintf library.
214 %description -n libasprintf-static -l pl.UTF-8
215 Statyczna biblioteka libasprintf.
218 Summary: Runtime classes for Java programs internationalization
219 Summary(pl.UTF-8): Klasy do uruchamiania umiędzynarodowionych programów w Javie
221 Group: Development/Languages/Java
222 Requires: %{name} = %{version}-%{release}
225 Runtime classes for Java programs internationalization.
227 %description java -l pl.UTF-8
228 Klasy do uruchamiania umiędzynarodowionych programów w Javie.
231 Summary: Development classes for Java programs internationalization
232 Summary(pl.UTF-8): Klasy do umiędzynarodowiania programów w Javie dla programistów
234 Group: Development/Tools
235 Requires: %{name}-devel = %{version}-%{release}
237 %description java-devel
238 Development classes for Java programs internationalization.
240 %description java-devel -l pl.UTF-8
241 Klasy do umiędzynarodowiania programów w Javie dla programistów.
243 %package -n xemacs-po-mode-pkg
244 Summary: Xemacs PO-mode
245 Summary(es.UTF-8): Facilita la edición de archivos PO (internacionalización) con emacs
246 Summary(pl.UTF-8): Tryb PO dla Xemacsa
247 Summary(pt_BR.UTF-8): Facilita a edição de arquivos PO (internacionalização) com o emacs
249 Group: Applications/Editors/Emacs
252 %description -n xemacs-po-mode-pkg
255 %description -n xemacs-po-mode-pkg -l es.UTF-8
256 Este paquete suministra las herramientas para ayudar en la edición de
257 archivos PO, como documentado en el manual del usuario del GNU
258 gettext. Mira este manual para la documentación de uso, que no se
261 %description -n xemacs-po-mode-pkg -l pl.UTF-8
262 Tryb edycji PO dla emacsa.
264 %description -n xemacs-po-mode-pkg -l pt_BR.UTF-8
265 Este pacote provê as ferramentas para ajudar na edição de arquivos PO,
266 como documentado no manual do usuário do GNU gettext. Veja este manual
267 para a documentação de uso, a qual não é incluída aqui.
270 Summary: gettextize replacement
271 Summary(pl.UTF-8): Zamiennik gettextize
273 Group: Development/Tools
274 Requires: %{name}-devel >= 0.10.35
277 %description autopoint
278 The `autopoint' program copies standard gettext infrastructure files
279 into a source package. It extracts from a macro call of the form
280 `AM_GNU_GETTEXT_VERSION(VERSION)', found in the package's
281 `configure.in' or `configure.ac' file, the gettext version used by the
282 package, and copies the infrastructure files belonging to this version
285 %description autopoint -l pl.UTF-8
286 Program autopoint kopiuje standardowe pliki infrastruktury gettexta do
287 pakietu źródłowego. Wyciąga użytą wersję gettexta z wywołania makra w
288 postaci AM_GNU_GETTEXT_VERSION(VERSION) w pliku configure.in lub
289 configure.ac i kopiuje do pakietu pliki infrastruktury należące do tej
292 %package -n dotnet-gettext
293 Summary: GNU gettext for C#
294 Summary(pl.UTF-8): GNU gettext dla C#
295 License: LGPL v2+ (GNU.Gettext library), GPL v3+ (tools)
296 Group: Development/Tools
298 %description -n dotnet-gettext
301 %description -n dotnet-gettext -l pl.UTF-8
309 # patch not finished yet
317 %{__aclocal} -I m4 -I ../m4
320 cd ../gettext-runtime
322 %{__aclocal} -I m4 -I gnulib-m4 -I ../autoconf-lib-link/m4 -I ../m4
327 %{__aclocal} -I ../m4 -I ../../m4
331 cd ../../gettext-tools
332 %{__aclocal} -I m4 -I gnulib-m4 -I libgettextpo/gnulib-m4 -I ../autoconf-lib-link/m4 -I ../gettext-runtime/m4 -I ../m4
341 %{?with_xemacs:--with-lispdir=%{_datadir}/xemacs-packages/lisp/po-mode} \
343 %{!?with_dotnet:--disable-csharp} \
344 %{?with_dotnet:--enable-csharp=mono} \
345 --without-included-gettext \
346 %{?with_bootstrap:--with-included-glib} \
347 %{?with_bootstrap:--with-included-libcroco}
349 GMSGFMT=`pwd`/gettext-tools/src/msgfmt
351 # msgfmt has been built, so now we can update pl.gmos
352 %{__make} pl.gmo -C gettext-runtime/po \
353 GMSGFMT=`pwd`/gettext-tools/src/msgfmt
354 %{__make} pl.gmo -C gettext-tools/po \
355 GMSGFMT=`pwd`/gettext-tools/src/msgfmt
358 cd gettext-tools/misc
359 EMACS=%{_bindir}/xemacs ./elisp-comp ./po-mode.el
363 rm -rf $RPM_BUILD_ROOT
364 install -d $RPM_BUILD_ROOT/bin
367 DESTDIR=$RPM_BUILD_ROOT
369 mv -f $RPM_BUILD_ROOT%{_bindir}/{,n}gettext $RPM_BUILD_ROOT/bin
371 # these static libs are removed in install-exec-clean
372 install gettext-tools/gnulib-lib/.libs/libgettextlib.a \
373 gettext-tools/src/.libs/libgettextsrc.a $RPM_BUILD_ROOT%{_libdir}
375 rm -r $RPM_BUILD_ROOT%{_docdir}/gettext
377 %find_lang %{name}-runtime
378 %find_lang %{name}-tools
381 rm -rf $RPM_BUILD_ROOT
385 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
389 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
391 %post -n libasprintf -p /sbin/ldconfig
392 %postun -n libasprintf -p /sbin/ldconfig
394 %post -n libasprintf-devel -p /sbin/postshell
395 -/usr/sbin/fix-info-dir -c %{_infodir}
397 %postun -n libasprintf-devel -p /sbin/postshell
398 -/usr/sbin/fix-info-dir -c %{_infodir}
400 %files -f %{name}-runtime.lang
401 %defattr(644,root,root,755)
402 %attr(755,root,root) /bin/*
403 %attr(755,root,root) %{_bindir}/envsubst
404 %{_mandir}/man1/envsubst.1*
405 %{_mandir}/man1/gettext.1*
406 %{_mandir}/man1/ngettext.1*
407 %dir %{_libdir}/gettext
408 %dir %{_datadir}/gettext
410 %files devel -f %{name}-tools.lang
411 %defattr(644,root,root,755)
412 %doc AUTHORS ChangeLog NEWS README THANKS
413 %attr(755,root,root) %{_bindir}/*
414 %exclude %{_bindir}/autopoint
415 %exclude %{_bindir}/envsubst
416 %attr(755,root,root) %{_libdir}/libgettext*.so
417 %{_libdir}/libgettext*.la
418 # libgettextpo is for other programs, not used by gettext tools themselves
419 %attr(755,root,root) %{_libdir}/libgettextpo.so.*.*.*
420 %attr(755,root,root) %{_libdir}/preloadable_libintl.so
421 %attr(755,root,root) %{_libdir}/gettext/hostname
422 %attr(755,root,root) %{_libdir}/gettext/project-id
423 %attr(755,root,root) %{_libdir}/gettext/urlget
424 %attr(755,root,root) %{_libdir}/gettext/user-email
425 %{_includedir}/gettext-po.h
427 %{_infodir}/gettext*.info*
428 %{_mandir}/man1/gettextize.1*
429 %{_mandir}/man1/msg*.1*
430 %{_mandir}/man1/recode-sr-latin.1*
431 %{_mandir}/man1/xgettext.1*
434 %{_datadir}/gettext/ABOUT-NLS
435 %attr(755,root,root) %{_datadir}/gettext/config.rpath
436 %{_datadir}/gettext/gettext.h
437 %dir %{_datadir}/gettext/intl
438 %{_datadir}/gettext/intl/[!c]*
439 %attr(755,root,root) %{_datadir}/gettext/intl/config.charset
440 %{_datadir}/gettext/msgunfmt.tcl
441 %{_datadir}/gettext/po
442 %dir %{_datadir}/gettext/projects
443 %{_datadir}/gettext/projects/index
444 %attr(755,root,root) %{_datadir}/gettext/projects/team-address
445 %dir %{_datadir}/gettext/projects/GNOME
446 %{_datadir}/gettext/projects/GNOME/teams.*
447 %attr(755,root,root) %{_datadir}/gettext/projects/GNOME/team-address
448 %attr(755,root,root) %{_datadir}/gettext/projects/GNOME/trigger
449 %dir %{_datadir}/gettext/projects/KDE
450 %{_datadir}/gettext/projects/KDE/teams.*
451 %attr(755,root,root) %{_datadir}/gettext/projects/KDE/team-address
452 %attr(755,root,root) %{_datadir}/gettext/projects/KDE/trigger
453 %dir %{_datadir}/gettext/projects/TP
454 %{_datadir}/gettext/projects/TP/teams.*
455 %attr(755,root,root) %{_datadir}/gettext/projects/TP/team-address
456 %attr(755,root,root) %{_datadir}/gettext/projects/TP/trigger
457 %{_datadir}/gettext/styles
460 %defattr(644,root,root,755)
461 %{_libdir}/libgettext*.a
464 %files -n libasprintf
465 %defattr(644,root,root,755)
466 %doc gettext-runtime/libasprintf/{AUTHORS,ChangeLog,README}
467 %attr(755,root,root) %{_libdir}/libasprintf.so.*.*.*
469 %files -n libasprintf-devel
470 %defattr(644,root,root,755)
471 %attr(755,root,root) %{_libdir}/libasprintf.so
472 %{_libdir}/libasprintf.la
473 %{_includedir}/autosprintf.h
474 %{_infodir}/autosprintf.info*
476 %files -n libasprintf-static
477 %defattr(644,root,root,755)
478 %{_libdir}/libasprintf.a
483 %defattr(644,root,root,755)
484 %{_datadir}/gettext/libintl.jar
487 %defattr(644,root,root,755)
488 %doc gettext-runtime/intl-java/javadoc2
489 %attr(755,root,root) %{_libdir}/gettext/gnu.gettext.DumpResource
490 %attr(755,root,root) %{_libdir}/gettext/gnu.gettext.GetURL
491 %{_datadir}/gettext/javaversion.class
495 %files -n xemacs-po-mode-pkg
496 %defattr(644,root,root,755)
497 %dir %{_datadir}/xemacs-packages/lisp/po-mode
498 %{_datadir}/xemacs-packages/lisp/po-mode/*.elc
502 %defattr(644,root,root,755)
503 %attr(755,root,root) %{_bindir}/autopoint
504 %{_datadir}/gettext/archive.tar.gz
505 %{_mandir}/man1/autopoint.1*
508 %files -n dotnet-gettext
509 %defattr(644,root,root,755)
510 %{_libdir}/GNU.Gettext.dll
511 %{_libdir}/gettext/msgfmt.net.exe
512 %{_libdir}/gettext/msgunfmt.net.exe