]> git.pld-linux.org Git - packages/gettext.git/blob - gettext.spec
- use cc_version macro
[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:        3
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
56 %endif
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)
66
67 %description
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
77 programs.
78
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.
84
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.
90
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
95 les programmes.
96
97 %description -l ja.UTF-8
98 GNU gettext
99 パッケージはプログラム中でマルチリンガルメッセージを生成する
100 ためのツールと文書を供給する。ツールはメッセージカタログをサポートするために
101 プログラムがどのように書かれるべきかの申し合わせと、メッセージカタログのための
102 ディレクトリとファイル名の組織化と、翻訳されたメッセージの埋め合わせを
103 サポートするためのランタイムライブラリと、翻訳可能でかつすでに翻訳された文字列
104 を取り扱う独立したプログラムを含んでいる。gettext
105 は簡単に使えるライブラリ
106 と自然言語のカタログを生成、使用、修正するツールと、国際化プログラム
107 のための強力かつシンプルな方法を供給する。
108
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.
113
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
118 programas.
119
120 %description -l ru.UTF-8
121 Пакет gettext содержит библиотеку и простые в использовании
122 инструменты для создания, использования и модификации каталогов
123 национальных языков. Это простой и мощный метод для
124 интернационализации программ.
125
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
130 yöntemdir.
131
132 %description -l uk.UTF-8
133 Пакет gettext містить бібліотеку та прості у використанні інструменти
134 для створення, використання та модифікації каталогів національних мов.
135 Це простий та потужний метод для інтернаціоналізації програм.
136
137 %package devel
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
143 License:        GPL v3+
144 Group:          Development/Tools
145 Requires(post,postun):  /sbin/ldconfig
146 Requires:       %{name} = %{version}-%{release}
147 Requires:       iconv
148 Conflicts:      autoconf < 2.52
149
150 %description devel
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.
154
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.
159
160 %package static
161 Summary:        Static gettext utility libraries
162 Summary(pl.UTF-8):      Statyczne biblioteki narzędziowe gettext
163 License:        GPL v3+
164 Group:          Development/Libraries
165 Requires:       %{name}-devel = %{version}-%{release}
166
167 %description static
168 This package contains static versions of gettext utility libraries
169 (libgettextlib, libgettextsrc and libgettextpo).
170
171 %description static -l pl.UTF-8
172 Ten pakiet zawiera statyczne wersje bibliotek narzędziowych gettext
173 (libgettextlib, libgettextsrc i libgettextpo).
174
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++
178 License:        LGPL v2+
179 Group:          Libraries
180
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.
185
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
189 <iostream>.
190
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
194 License:        LGPL v2+
195 Group:          Development/Libraries
196 Requires:       libasprintf = %{version}-%{release}
197
198 %description -n libasprintf-devel
199 Header file and documentation for libasprintf.
200
201 %description -n libasprintf-devel -l pl.UTF-8
202 Plik nagłówkowy i dokumentacja dla libasprintf.
203
204 %package -n libasprintf-static
205 Summary:        Static libasprintf library
206 Summary(pl.UTF-8):      Statyczna biblioteka libasprintf
207 License:        LGPL v2+
208 Group:          Development/Libraries
209 Requires:       libasprintf-devel = %{version}-%{release}
210
211 %description -n libasprintf-static
212 Static libasprintf library.
213
214 %description -n libasprintf-static -l pl.UTF-8
215 Statyczna biblioteka libasprintf.
216
217 %package java
218 Summary:        Runtime classes for Java programs internationalization
219 Summary(pl.UTF-8):      Klasy do uruchamiania umiędzynarodowionych programów w Javie
220 License:        LGPL v2+
221 Group:          Development/Languages/Java
222 Requires:       %{name} = %{version}-%{release}
223
224 %description java
225 Runtime classes for Java programs internationalization.
226
227 %description java -l pl.UTF-8
228 Klasy do uruchamiania umiędzynarodowionych programów w Javie.
229
230 %package java-devel
231 Summary:        Development classes for Java programs internationalization
232 Summary(pl.UTF-8):      Klasy do umiędzynarodowiania programów w Javie dla programistów
233 License:        GPL v3+
234 Group:          Development/Tools
235 Requires:       %{name}-devel = %{version}-%{release}
236
237 %description java-devel
238 Development classes for Java programs internationalization.
239
240 %description java-devel -l pl.UTF-8
241 Klasy do umiędzynarodowiania programów w Javie dla programistów.
242
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
248 License:        GPL v2+
249 Group:          Applications/Editors/Emacs
250 Requires:       xemacs
251
252 %description -n xemacs-po-mode-pkg
253 Emacs PO-mode.
254
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
259 incluye aquí.
260
261 %description -n xemacs-po-mode-pkg -l pl.UTF-8
262 Tryb edycji PO dla emacsa.
263
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.
268
269 %package autopoint
270 Summary:        gettextize replacement
271 Summary(pl.UTF-8):      Zamiennik gettextize
272 License:        GPL v3+
273 Group:          Development/Tools
274 Requires:       %{name}-devel >= 0.10.35
275 Requires:       cvs-client
276
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
283 into the package.
284
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
290 wersji.
291
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
297
298 %description -n dotnet-gettext
299 GNU gettext for C#.
300
301 %description -n dotnet-gettext -l pl.UTF-8
302 GNU gettext dla C#.
303
304 %prep
305 %setup -q
306 %patch0 -p1
307 %patch1 -p1
308 %patch2 -p1
309 # patch not finished yet
310 #%patch3 -p1
311 %patch4 -p1
312 %patch5 -p1
313
314 %build
315 %{__libtoolize}
316 cd autoconf-lib-link
317 %{__aclocal} -I m4 -I ../m4
318 %{__autoconf}
319 %{__automake}
320 cd ../gettext-runtime
321 %{__libtoolize}
322 %{__aclocal} -I m4 -I gnulib-m4 -I ../autoconf-lib-link/m4 -I ../m4
323 %{__autoconf}
324 %{__autoheader}
325 %{__automake}
326 cd libasprintf
327 %{__aclocal} -I ../m4 -I ../../m4
328 %{__autoconf}
329 %{__autoheader}
330 %{__automake}
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
333 %{__autoconf}
334 %{__autoheader}
335 %{__automake}
336 cd ..
337 %{__aclocal}
338 %{__autoconf}
339 %{__automake}
340 %configure \
341         %{?with_xemacs:--with-lispdir=%{_datadir}/xemacs-packages/lisp/po-mode} \
342         --enable-nls \
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}
348 %{__make} \
349         GMSGFMT=`pwd`/gettext-tools/src/msgfmt
350
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
356
357 %if %{with xemacs}
358 cd gettext-tools/misc
359 EMACS=%{_bindir}/xemacs ./elisp-comp ./po-mode.el
360 %endif
361
362 %install
363 rm -rf $RPM_BUILD_ROOT
364 install -d $RPM_BUILD_ROOT/bin
365
366 %{__make} install \
367         DESTDIR=$RPM_BUILD_ROOT
368
369 mv -f $RPM_BUILD_ROOT%{_bindir}/{,n}gettext $RPM_BUILD_ROOT/bin
370
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}
374
375 rm -r $RPM_BUILD_ROOT%{_docdir}/gettext
376
377 %find_lang %{name}-runtime
378 %find_lang %{name}-tools
379
380 %clean
381 rm -rf $RPM_BUILD_ROOT
382
383 %post devel
384 /sbin/ldconfig
385 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
386
387 %postun devel
388 /sbin/ldconfig
389 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
390
391 %post   -n libasprintf -p /sbin/ldconfig
392 %postun -n libasprintf -p /sbin/ldconfig
393
394 %post -n libasprintf-devel      -p      /sbin/postshell
395 -/usr/sbin/fix-info-dir -c %{_infodir}
396
397 %postun -n libasprintf-devel    -p      /sbin/postshell
398 -/usr/sbin/fix-info-dir -c %{_infodir}
399
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
409
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
426 %{_aclocaldir}/*
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*
432 %{_mandir}/man3/*
433
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
458
459 %files static
460 %defattr(644,root,root,755)
461 %{_libdir}/libgettext*.a
462
463 %if %{with asprintf}
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.*.*.*
468
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*
475
476 %files -n libasprintf-static
477 %defattr(644,root,root,755)
478 %{_libdir}/libasprintf.a
479 %endif
480
481 %if %{build_java}
482 %files java
483 %defattr(644,root,root,755)
484 %{_datadir}/gettext/libintl.jar
485
486 %files java-devel
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
492 %endif
493
494 %if %{with xemacs}
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
499 %endif
500
501 %files autopoint
502 %defattr(644,root,root,755)
503 %attr(755,root,root) %{_bindir}/autopoint
504 %{_datadir}/gettext/archive.tar.gz
505 %{_mandir}/man1/autopoint.1*
506
507 %if %{with dotnet}
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
513 %endif
This page took 0.086976 seconds and 4 git commands to generate.