]> git.pld-linux.org Git - packages/gettext.git/blob - gettext.spec
- rel 8; now builds even without system gettext installed
[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
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.16.1
36 Release:        8
37 License:        LGPL (runtime), GPL (tools)
38 Group:          Development/Tools
39 Source0:        ftp://ftp.gnu.org/gnu/gettext/%{name}-%{version}.tar.gz
40 # Source0-md5:  3d9ad24301c6d6b17ec30704a13fe127
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}-ac.patch
46 Patch5:         %{name}-libintl_by_gcj.patch
47 URL:            http://www.gnu.org/software/gettext/
48 BuildRequires:  autoconf >= 2.59
49 # after dropping -ac.patch:
50 #BuildRequires: autoconf >= 2.60
51 BuildRequires:  automake >= 1:1.10
52 %{?with_gcj:BuildRequires:      gcj >= 3.0}
53 %{?with_javac:BuildRequires:    jdk >= 1.1}
54 BuildRequires:  libgomp-devel
55 %{?with_asprintf:BuildRequires: libstdc++-devel}
56 BuildRequires:  libtool >= 1:1.4.2-9
57 %{?with_dotnet:BuildRequires:   mono-csharp}
58 BuildRequires:  texinfo
59 %{?with_xemacs:BuildRequires:   xemacs}
60 Obsoletes:      gettext-base
61 Conflicts:      intltool < 0.28
62 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
63
64 %description
65 The GNU gettext package provides a set of tools and documentation for
66 producing multi-lingual messages in programs. Tools include a set of
67 conventions about how programs should be written to support message
68 catalogs, a directory and file naming organization for the message
69 catalogs, a runtime library which supports the retrieval of translated
70 messages, and stand-alone programs for handling the translatable and
71 the already translated strings. Gettext provides an easy to use
72 library and tools for creating, using, and modifying natural language
73 catalogs and is a powerful and simple method for internationalizing
74 programs.
75
76 %description -l de.UTF-8
77 Die gettext-Library enthält eine einfach anzuwendende Library und
78 Tools zum Erstellen, Verwenden und Ändern von
79 natürlichsprachigen-Kataloge. Es ist ein einfaches und
80 leistungsfähiges Verfahren zum Lokalisieren von Programmen.
81
82 %description -l es.UTF-8
83 La biblioteca gettext nos ofrece una biblioteca fácil de usar y
84 herramientas para creación, uso y modificación de catálogos de
85 lenguaje natural. Es un potente y sencillo método de
86 internacionalización de programas.
87
88 %description -l fr.UTF-8
89 La librarie gettext fournit des outils et une librairie simple à
90 utiliser pour manipuler, créer, et modifier des catalogues de langage
91 naturel. C'est une méthode simple et puissante pour internationnaliser
92 les programmes.
93
94 %description -l ja.UTF-8
95 GNU gettext
96 パッケージはプログラム中でマルチリンガルメッセージを生成する
97 ためのツールと文書を供給する。ツールはメッセージカタログをサポートするために
98 プログラムがどのように書かれるべきかの申し合わせと、メッセージカタログのための
99 ディレクトリとファイル名の組織化と、翻訳されたメッセージの埋め合わせを
100 サポートするためのランタイムライブラリと、翻訳可能でかつすでに翻訳された文字列
101 を取り扱う独立したプログラムを含んでいる。gettext
102 は簡単に使えるライブラリ
103 と自然言語のカタログを生成、使用、修正するツールと、国際化プログラム
104 のための強力かつシンプルな方法を供給する。
105
106 %description -l pl.UTF-8
107 Pakiet gettext dostarcza narzędzi do tworzenia, używania i modyfikacji
108 katalogów języków narodowych. To jest prosta i wydajna metoda
109 lokalizacji (internacjonalizacji) programów.
110
111 %description -l pt_BR.UTF-8
112 A biblioteca gettext oferece uma biblioteca fácil de usar e
113 ferramentas para criação, uso e modificação de catálogos de linguagem
114 natural. Ele é um poderoso e simples método de internacionalização de
115 programas.
116
117 %description -l ru.UTF-8
118 Пакет gettext содержит библиотеку и простые в использовании
119 инструменты для создания, использования и модификации каталогов
120 национальных языков. Это простой и мощный метод для
121 интернационализации программ.
122
123 %description -l tr.UTF-8
124 gettext, yerel dil desteğinde kullanılan katalogları değiştirebilmek
125 için, kolayca kullanılabilen kitaplık ve araçları sağlar. Bu,
126 programları uluslararasılaştırmak için sıkça başvurulan, kuvvetli bir
127 yöntemdir.
128
129 %description -l uk.UTF-8
130 Пакет gettext містить бібліотеку та прості у використанні інструменти
131 для створення, використання та модифікації каталогів національних мов.
132 Це простий та потужний метод для інтернаціоналізації програм.
133
134 %package devel
135 Summary:        Utilties for program national language support
136 Summary(de.UTF-8):      Utilities zum Programmieren von nationaler Sprachunterstützung
137 Summary(fr.UTF-8):      Utilitaires pour le support de la langue nationnalepar les programmes
138 Summary(pl.UTF-8):      Narzędzia dla programów ze wsparciem dla języków narodowych
139 Summary(tr.UTF-8):      Desteği için kitaplık ve araçlar
140 License:        GPL
141 Group:          Development/Tools
142 Requires(post,postun):  /sbin/ldconfig
143 Requires:       %{name} = %{version}-%{release}
144 Requires:       iconv
145 Conflicts:      autoconf < 2.52
146
147 %description devel
148 The gettext library provides an easy to use library and tools for
149 creating, using, and modifying natural language catalogs. It is a
150 powerfull and simple method for internationalizing programs.
151
152 %description devel -l pl.UTF-8
153 Pakiet gettext dostarcza narzędzi do tworzenia, używania i modyfikacji
154 katalogów języków narodowych. To jest prosta i wydajna metoda
155 lokalizacji (internacjonalizacji) programów.
156
157 %package static
158 Summary:        Static gettext utility libraries
159 Summary(pl.UTF-8):      Statyczne biblioteki narzędziowe gettext
160 License:        GPL
161 Group:          Development/Libraries
162 Requires:       %{name}-devel = %{version}-%{release}
163
164 %description static
165 This package contains static versions of gettext utility libraries
166 (libgettextlib, libgettextsrc and libgettextpo).
167
168 %description static -l pl.UTF-8
169 Ten pakiet zawiera statyczne wersje bibliotek narzędziowych gettext
170 (libgettextlib, libgettextsrc i libgettextpo).
171
172 %package -n libasprintf
173 Summary:        GNU libasprintf - automatic formatted output to strings in C++
174 Summary(pl.UTF-8):      GNU libasprintf - automatyczne formatowanie wyjścia do łańcuchów w C++
175 License:        LGPL
176 Group:          Libraries
177
178 %description -n libasprintf
179 This package makes the C formatted output routines (`fprintf' et al.)
180 usable in C++ programs, for use with the `<string>' strings and the
181 `<iostream>' streams.
182
183 %description -n libasprintf -l pl.UTF-8
184 Ten pakiet czyni funkcje C formatujące wyjście (fprintf i inne)
185 używalnymi w programach w C++, z łańcuchami <string> i strumieniami
186 <iostream>.
187
188 %package -n libasprintf-devel
189 Summary:        Header file and documentation for libasprintf
190 Summary(pl.UTF-8):      Plik nagłówkowy i dokumentacja dla libasprintf
191 License:        LGPL
192 Group:          Development/Libraries
193 Requires:       libasprintf = %{version}-%{release}
194
195 %description -n libasprintf-devel
196 Header file and documentation for libasprintf.
197
198 %description -n libasprintf-devel -l pl.UTF-8
199 Plik nagłówkowy i dokumentacja dla libasprintf.
200
201 %package -n libasprintf-static
202 Summary:        Static libasprintf library
203 Summary(pl.UTF-8):      Statyczna biblioteka libasprintf
204 License:        LGPL
205 Group:          Development/Libraries
206 Requires:       libasprintf-devel = %{version}-%{release}
207
208 %description -n libasprintf-static
209 Static libasprintf library.
210
211 %description -n libasprintf-static -l pl.UTF-8
212 Statyczna biblioteka libasprintf.
213
214 %package java
215 Summary:        Runtime classes for Java programs internationalization
216 Summary(pl.UTF-8):      Klasy do uruchamiania umiędzynarodowionych programów w Javie
217 License:        LGPL
218 Group:          Development/Languages/Java
219 Requires:       %{name} = %{version}-%{release}
220
221 %description java
222 Runtime classes for Java programs internationalization.
223
224 %description java -l pl.UTF-8
225 Klasy do uruchamiania umiędzynarodowionych programów w Javie.
226
227 %package java-devel
228 Summary:        Development classes for Java programs internationalization
229 Summary(pl.UTF-8):      Klasy do umiędzynarodowiania programów w Javie dla programistów
230 License:        GPL
231 Group:          Development/Tools
232 Requires:       %{name}-devel = %{version}-%{release}
233
234 %description java-devel
235 Development classes for Java programs internationalization.
236
237 %description java-devel -l pl.UTF-8
238 Klasy do umiędzynarodowiania programów w Javie dla programistów.
239
240 %package -n xemacs-po-mode-pkg
241 Summary:        Xemacs PO-mode
242 Summary(es.UTF-8):      Facilita la edición de archivos PO (internacionalización) con emacs
243 Summary(pl.UTF-8):      Tryb PO dla Xemacsa
244 Summary(pt_BR.UTF-8):   Facilita a edição de arquivos PO (internacionalização) com o emacs
245 License:        GPL
246 Group:          Applications/Editors/Emacs
247 Requires:       xemacs
248
249 %description -n xemacs-po-mode-pkg
250 Emacs PO-mode.
251
252 %description -n xemacs-po-mode-pkg -l es.UTF-8
253 Este paquete suministra las herramientas para ayudar en la edición de
254 archivos PO, como documentado en el manual del usuario del GNU
255 gettext. Mira este manual para la documentación de uso, que no se
256 incluye aquí.
257
258 %description -n xemacs-po-mode-pkg -l pl.UTF-8
259 Tryb edycji PO dla emacsa.
260
261 %description -n xemacs-po-mode-pkg -l pt_BR.UTF-8
262 Este pacote provê as ferramentas para ajudar na edição de arquivos PO,
263 como documentado no manual do usuário do GNU gettext. Veja este manual
264 para a documentação de uso, a qual não é incluída aqui.
265
266 %package autopoint
267 Summary:        gettextize replacement
268 Summary(pl.UTF-8):      Zamiennik gettextize
269 License:        GPL
270 Group:          Development/Tools
271 Requires:       %{name}-devel >= 0.10.35
272 Requires:       cvs
273
274 %description autopoint
275 The `autopoint' program copies standard gettext infrastructure files
276 into a source package. It extracts from a macro call of the form
277 `AM_GNU_GETTEXT_VERSION(VERSION)', found in the package's
278 `configure.in' or `configure.ac' file, the gettext version used by the
279 package, and copies the infrastructure files belonging to this version
280 into the package.
281
282 %description autopoint -l pl.UTF-8
283 Program autopoint kopiuje standardowe pliki infrastruktury gettexta do
284 pakietu źródłowego. Wyciąga użytą wersję gettexta z wywołania makra w
285 postaci AM_GNU_GETTEXT_VERSION(VERSION) w pliku configure.in lub
286 configure.ac i kopiuje do pakietu pliki infrastruktury należące do tej
287 wersji.
288
289 %package -n dotnet-gettext
290 Summary:        GNU gettext for C#
291 Summary(pl.UTF-8):      GNU gettext dla C#
292 Group:          Development/Tools
293
294 %description -n dotnet-gettext
295 GNU gettext for C#.
296
297 %description -n dotnet-gettext -l pl.UTF-8
298 GNU gettext dla C#.
299
300 %prep
301 %setup -q
302 %patch0 -p1
303 %patch1 -p1
304 %patch2 -p1
305 # patch not finished yet
306 #%patch3 -p1
307 %patch4 -p1
308 %patch5 -p1
309
310 %{__perl} -pi -e 's/ no / nb /' gettext-runtime/po/LINGUAS gettext-tools/po/LINGUAS
311 mv -f gettext-runtime/po/{no,nb}.po
312 mv -f gettext-runtime/po/{no,nb}.gmo
313 mv -f gettext-tools/po/{no,nb}.po
314 mv -f gettext-tools/po/{no,nb}.gmo
315 rm -f gettext-tools/po/stamp-po
316
317 %build
318 %{__libtoolize}
319 cd autoconf-lib-link
320 %{__aclocal} -I m4 -I ../m4
321 %{__autoconf}
322 %{__automake}
323 cd ../gettext-runtime
324 %{__aclocal} -I m4 -I gnulib-m4 -I ../autoconf-lib-link/m4 -I ../m4
325 %{__autoconf}
326 %{__autoheader}
327 %{__automake}
328 cd libasprintf
329 %{__aclocal} -I ../m4 -I ../../m4
330 %{__autoconf}
331 %{__autoheader}
332 %{__automake}
333 cd ../../gettext-tools
334 %{__aclocal} -I m4 -I gnulib-m4 -I libgettextpo/gnulib-m4 -I ../autoconf-lib-link/m4 -I ../gettext-runtime/m4 -I ../m4
335 %{__autoconf}
336 %{__autoheader}
337 %{__automake}
338 cd ..
339 %{__aclocal}
340 %{__autoconf}
341 %{__automake}
342 %configure \
343         %{?with_xemacs:--with-lispdir=%{_datadir}/xemacs-packages/lisp/po-mode} \
344         --enable-nls \
345         %{!?with_dotnet:--disable-csharp} \
346         %{?with_dotnet:--enable-csharp=mono} \
347         --without-included-gettext
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
395 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
396
397 %postun -n libasprintf-devel
398 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
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/xgettext.1*
431 %{_mandir}/man3/*
432
433 %{_datadir}/gettext/ABOUT-NLS
434 %attr(755,root,root) %{_datadir}/gettext/config.rpath
435 %{_datadir}/gettext/gettext.h
436 %dir %{_datadir}/gettext/intl
437 %{_datadir}/gettext/intl/[!c]*
438 %attr(755,root,root) %{_datadir}/gettext/intl/config.charset
439 %{_datadir}/gettext/msgunfmt.tcl
440 %{_datadir}/gettext/po
441 %dir %{_datadir}/gettext/projects
442 %{_datadir}/gettext/projects/index
443 %attr(755,root,root) %{_datadir}/gettext/projects/team-address
444 %dir %{_datadir}/gettext/projects/GNOME
445 %{_datadir}/gettext/projects/GNOME/teams.*
446 %attr(755,root,root) %{_datadir}/gettext/projects/GNOME/team-address
447 %attr(755,root,root) %{_datadir}/gettext/projects/GNOME/trigger
448 %dir %{_datadir}/gettext/projects/KDE
449 %{_datadir}/gettext/projects/KDE/teams.*
450 %attr(755,root,root) %{_datadir}/gettext/projects/KDE/team-address
451 %attr(755,root,root) %{_datadir}/gettext/projects/KDE/trigger
452 %dir %{_datadir}/gettext/projects/TP
453 %{_datadir}/gettext/projects/TP/teams.*
454 %attr(755,root,root) %{_datadir}/gettext/projects/TP/team-address
455 %attr(755,root,root) %{_datadir}/gettext/projects/TP/trigger
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 %endif
490
491 %if %{with xemacs}
492 %files -n xemacs-po-mode-pkg
493 %defattr(644,root,root,755)
494 %dir %{_datadir}/xemacs-packages/lisp/po-mode
495 %{_datadir}/xemacs-packages/lisp/po-mode/*.elc
496 %endif
497
498 %files autopoint
499 %defattr(644,root,root,755)
500 %attr(755,root,root) %{_bindir}/autopoint
501 %{_datadir}/gettext/archive.tar.gz
502 %{_mandir}/man1/autopoint.1*
503
504 %if %{with dotnet}
505 %files -n dotnet-gettext
506 %defattr(644,root,root,755)
507 %{_libdir}/GNU.Gettext.dll
508 %{_libdir}/gettext/msgfmt.net.exe
509 %{_libdir}/gettext/msgunfmt.net.exe
510 %endif
This page took 0.099155 seconds and 3 git commands to generate.