1 |
blino |
367 |
%define major 8 |
2 |
|
|
%define intllibname %mklibname intl %{major} |
3 |
|
|
%define misclibname %mklibname gettextmisc |
4 |
|
|
|
5 |
rtp |
48592 |
%define bootstrap 0 |
6 |
|
|
%{?_without_bootstrap: %global bootstrap 0} |
7 |
|
|
%{?_with_bootstrap: %global bootstrap 1} |
8 |
|
|
|
9 |
blino |
367 |
%define do_check 1 |
10 |
|
|
%{?_without_check: %global do_check 0} |
11 |
|
|
|
12 |
|
|
%define enable_java 0 |
13 |
|
|
%{?_without_java: %global enable_java 0} |
14 |
|
|
|
15 |
|
|
%define enable_csharp 0 |
16 |
|
|
%{?_with_csharp: %global enable_csharp 1} |
17 |
|
|
|
18 |
|
|
Name: gettext |
19 |
|
|
Summary: GNU libraries and utilities for producing multi-lingual messages |
20 |
fwang |
585044 |
Version: 0.18.3.2 |
21 |
|
|
Release: %mkrel 1 |
22 |
ahmad |
95178 |
License: GPLv3+ and LGPLv2+ |
23 |
blino |
367 |
Group: System/Internationalization |
24 |
|
|
URL: http://www.gnu.org/software/gettext/ |
25 |
|
|
Source: ftp://ftp.gnu.org/pub/gnu/%{name}/%{name}-%{version}.tar.gz |
26 |
fwang |
335311 |
Source1: ftp://ftp.gnu.org/pub/gnu/%{name}/%{name}-%{version}.tar.gz.sig |
27 |
blino |
367 |
Source2: po-mode-init.el |
28 |
fwang |
585048 |
Patch8: gettext-0.18.3.2-fix-str-fmt.patch |
29 |
luigiwalser |
426834 |
Patch9: gettext-0.18.2.1-linkage.patch |
30 |
rtp |
48592 |
Patch10: libcroco-0.6.2-format-strings.patch |
31 |
blino |
367 |
# (Abel) we pick mono here, though pnet can be used as well. |
32 |
|
|
%if %enable_csharp |
33 |
|
|
BuildRequires: mono |
34 |
|
|
%endif |
35 |
|
|
%if %enable_java |
36 |
|
|
BuildRequires: eclipse-ecj |
37 |
|
|
BuildRequires: gcc-java |
38 |
|
|
BuildRequires: gcj-tools |
39 |
|
|
BuildRequires: fastjar |
40 |
|
|
%endif |
41 |
|
|
BuildRequires: automake |
42 |
|
|
BuildRequires: bison |
43 |
|
|
BuildRequires: flex |
44 |
|
|
BuildRequires: texinfo |
45 |
|
|
BuildRequires: libgomp-devel |
46 |
rtp |
48592 |
# not necessary best way to do it but without gettext-devel |
47 |
|
|
# the bootstrap game is lost |
48 |
|
|
%if !%bootstrap |
49 |
|
|
BuildRequires: emacs-bin |
50 |
blino |
367 |
BuildRequires: libcroco0.6-devel |
51 |
rtp |
48592 |
%endif |
52 |
blino |
367 |
BuildRequires: libunistring-devel |
53 |
|
|
BuildRequires: ncurses-devel |
54 |
|
|
BuildRequires: libxml2-devel |
55 |
|
|
BuildRequires: acl-devel |
56 |
|
|
# test suite |
57 |
|
|
BuildRequires: locales-fa |
58 |
|
|
BuildRequires: locales-fr |
59 |
|
|
BuildRequires: locales-ja |
60 |
|
|
BuildRequires: locales-zh |
61 |
|
|
|
62 |
|
|
Requires: %{name}-base = %{version} |
63 |
|
|
Requires: %{misclibname} = %{version} |
64 |
|
|
# xgettext will dlopen() it when extracting strings from glade files |
65 |
|
|
Requires: %mklibname expat 1 |
66 |
|
|
Requires(post): info-install |
67 |
|
|
Requires(preun): info-install |
68 |
|
|
|
69 |
|
|
%description |
70 |
|
|
The GNU gettext package provides a set of tools and documentation for producing |
71 |
|
|
multi-lingual messages in programs. Tools include a set of conventions about |
72 |
|
|
how programs should be written to support message catalogs, a directory and |
73 |
|
|
file naming organization for the message catalogs, a runtime library which |
74 |
|
|
supports the retrieval of translated messages, and stand-alone programs for |
75 |
|
|
handling the translatable and the already translated strings. Gettext provides |
76 |
|
|
an easy to use library and tools for creating, using, and modifying natural |
77 |
|
|
language catalogs and is a powerful and simple method for internationalizing |
78 |
|
|
programs. |
79 |
|
|
|
80 |
|
|
If you would like to internationalize or incorporate multi-lingual messages |
81 |
|
|
into programs that you're developing, you should install gettext. |
82 |
|
|
|
83 |
|
|
Build Option: |
84 |
|
|
--with csharp Enables C# support in gettext |
85 |
|
|
--without java Disables Java support in gettext |
86 |
|
|
|
87 |
|
|
%package -n %{intllibname} |
88 |
|
|
Summary: Basic libintl library for internationalization |
89 |
|
|
Group: System/Libraries |
90 |
|
|
License: LGPL |
91 |
colin |
273158 |
Requires(pre): filesystem >= 2.1.9-18 |
92 |
blino |
367 |
Provides: libintl = %{version}-%{release} |
93 |
|
|
|
94 |
|
|
%description -n %{intllibname} |
95 |
|
|
This package contains the libintl library, which is important for |
96 |
|
|
system internationalization. |
97 |
|
|
|
98 |
|
|
%package -n %{misclibname} |
99 |
|
|
Summary: Other %{name} libraries needed by %{name} utilities |
100 |
|
|
Group: System/Libraries |
101 |
|
|
License: LGPL |
102 |
|
|
Provides: libgettextmisc |
103 |
|
|
|
104 |
|
|
%description -n %{misclibname} |
105 |
|
|
This package contains all other libraries used by %{name} utilities, |
106 |
|
|
and are not very widely used outside %{name}. |
107 |
|
|
|
108 |
|
|
%package devel |
109 |
|
|
Summary: Development files for %{name} |
110 |
|
|
Group: Development/C |
111 |
ahmad |
95178 |
# autopoint is GPLv3+ |
112 |
|
|
# libasprintf is LGPLv2+ |
113 |
|
|
# libgettextpo is GPLv3+ |
114 |
|
|
License: LGPLv2+ and GPLv3+ |
115 |
blino |
367 |
Requires: %{name} = %{version} |
116 |
|
|
# fwang: autopoint requires cvs to work |
117 |
rtp |
48592 |
%if !%bootstrap |
118 |
blino |
367 |
Requires: cvs |
119 |
rtp |
48592 |
%endif |
120 |
blino |
367 |
Requires(post): info-install |
121 |
|
|
Requires(preun): info-install |
122 |
|
|
|
123 |
|
|
%description devel |
124 |
|
|
This package contains all development related files necessary for |
125 |
|
|
developing or compiling applications/libraries that needs |
126 |
|
|
internationalization capability. You also need this package if you |
127 |
|
|
want to add gettext support for your project. |
128 |
|
|
|
129 |
|
|
%package base |
130 |
|
|
Summary: Basic binary for showing translation of textual messages |
131 |
|
|
Group: System/Internationalization |
132 |
colin |
273158 |
Requires(pre): filesystem >= 2.1.9-18 |
133 |
blino |
367 |
Requires: %{intllibname} = %{version} |
134 |
|
|
|
135 |
|
|
%description base |
136 |
|
|
This package contains the basic binary from %{name}. It is splitted from |
137 |
|
|
%{name} because initscript need it to show translated boot messages. |
138 |
|
|
|
139 |
|
|
%if %enable_java |
140 |
|
|
%package java |
141 |
|
|
Summary: Java binding for GNU gettext |
142 |
|
|
Group: System/Internationalization |
143 |
|
|
Requires: %{name} = %{version} |
144 |
|
|
|
145 |
|
|
%description java |
146 |
|
|
This package contains class file that implements the main GNU libintl |
147 |
|
|
functions in Java. This allows compiling GNU gettext message catalogs |
148 |
|
|
into Java ResourceBundle classes. |
149 |
|
|
%endif |
150 |
|
|
|
151 |
|
|
%if %enable_csharp |
152 |
|
|
%package csharp |
153 |
|
|
Summary: C# binding for GNU gettext |
154 |
|
|
Group: System/Internationalization |
155 |
|
|
Requires: mono |
156 |
|
|
|
157 |
|
|
%description csharp |
158 |
|
|
This package contains class file that implements the main GNU libintl |
159 |
|
|
functions in C#. This allows compiling GNU gettext message catalogs |
160 |
|
|
into C# dll or resource files. |
161 |
|
|
%endif |
162 |
|
|
|
163 |
|
|
%prep |
164 |
|
|
%setup -q |
165 |
fwang |
585044 |
%apply_patches |
166 |
blino |
367 |
|
167 |
|
|
%build |
168 |
|
|
|
169 |
|
|
%if %enable_java |
170 |
|
|
export GCJ="%{_bindir}/gcj" |
171 |
|
|
export JAVAC="%{_bindir}/gcj -C" |
172 |
|
|
export JAR="%{_bindir}/fastjar" |
173 |
|
|
%endif |
174 |
|
|
|
175 |
|
|
autoreconf -fi |
176 |
|
|
for i in `find -name configure|sort` |
177 |
|
|
do |
178 |
|
|
pushd `dirname $i` |
179 |
|
|
%configure2_5x \ |
180 |
|
|
--enable-shared \ |
181 |
ahmad |
95178 |
--disable-static \ |
182 |
|
|
--disable-rpath \ |
183 |
blino |
367 |
--with-included-gettext \ |
184 |
|
|
%if %enable_csharp |
185 |
|
|
--enable-csharp=mono \ |
186 |
|
|
%else |
187 |
|
|
--disable-csharp \ |
188 |
|
|
%endif |
189 |
|
|
%if ! %enable_java |
190 |
|
|
--disable-java \ |
191 |
|
|
%endif |
192 |
|
|
|
193 |
|
|
popd |
194 |
|
|
done |
195 |
|
|
|
196 |
|
|
%make |
197 |
|
|
|
198 |
|
|
%if %do_check |
199 |
|
|
%check |
200 |
|
|
export JAVAC=ecj |
201 |
|
|
LC_ALL=C make check |
202 |
|
|
%endif |
203 |
|
|
|
204 |
|
|
%install |
205 |
|
|
rm -rf $RPM_BUILD_ROOT |
206 |
|
|
%makeinstall_std |
207 |
|
|
|
208 |
|
|
# remove unwanted files |
209 |
|
|
rm -f $RPM_BUILD_ROOT%{_includedir}/libintl.h \ |
210 |
|
|
$RPM_BUILD_ROOT%{_datadir}/locale/locale.alias |
211 |
|
|
rm -f gettext-runtime/intl-java/javadoc2/package-list |
212 |
|
|
|
213 |
|
|
install -D -m 644 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/emacs/site-start.d/%{name}.el |
214 |
|
|
|
215 |
|
|
# remove non-standard lc directories |
216 |
|
|
for i in en@boldquot en@quot ; do rm -rf $RPM_BUILD_ROOT/%{_datadir}/locale/$i; done |
217 |
|
|
|
218 |
|
|
# move installed doc back to %%doc |
219 |
|
|
rm -rf htmldoc examples |
220 |
|
|
mkdir htmldoc |
221 |
|
|
for i in gettext-runtime/man/*.html; do |
222 |
|
|
rm -f $RPM_BUILD_ROOT%{_datadir}/doc/gettext/`basename $i` |
223 |
|
|
done |
224 |
|
|
rm -rf $RPM_BUILD_ROOT%{_datadir}/doc/gettext/javadoc* |
225 |
|
|
mv $RPM_BUILD_ROOT%{_datadir}/doc/gettext/* $RPM_BUILD_ROOT/%{_datadir}/doc/libasprintf/* htmldoc |
226 |
|
|
mv htmldoc/examples examples |
227 |
|
|
|
228 |
|
|
# remove java stuff, otherwise rpm complains |
229 |
|
|
%if !%enable_java |
230 |
|
|
rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/gnu.gettext.* \ |
231 |
|
|
$RPM_BUILD_ROOT%{_datadir}/%{name}/*.jar |
232 |
|
|
%endif |
233 |
|
|
|
234 |
ahmad |
95178 |
# don't ship .la |
235 |
|
|
find %{buildroot} -name '*.la' -exec rm -f {} \; |
236 |
|
|
|
237 |
blino |
367 |
%find_lang %{name} --all-name |
238 |
|
|
|
239 |
|
|
%clean |
240 |
|
|
rm -rf $RPM_BUILD_ROOT |
241 |
|
|
|
242 |
|
|
%post |
243 |
|
|
%_install_info %{name}.info |
244 |
|
|
|
245 |
|
|
%preun |
246 |
|
|
%_remove_install_info %{name}.info |
247 |
|
|
|
248 |
|
|
%post devel |
249 |
|
|
%_install_info autosprintf.info |
250 |
|
|
|
251 |
|
|
%preun devel |
252 |
|
|
%_remove_install_info autosprintf.info |
253 |
|
|
|
254 |
|
|
%files |
255 |
|
|
%defattr(-,root,root) |
256 |
|
|
%doc AUTHORS README COPYING gettext-runtime/ABOUT-NLS gettext-runtime/BUGS NEWS THANKS |
257 |
|
|
%config(noreplace) %{_sysconfdir}/emacs/site-start.d/*.el |
258 |
|
|
%{_bindir}/envsubst |
259 |
|
|
%{_bindir}/gettext.sh |
260 |
|
|
%{_bindir}/msg* |
261 |
|
|
%{_bindir}/recode-sr-latin |
262 |
|
|
%{_bindir}/xgettext |
263 |
|
|
%dir %{_datadir}/gettext |
264 |
|
|
%{_datadir}/%{name}/msgunfmt.tcl |
265 |
|
|
%{_datadir}/%{name}/projects |
266 |
|
|
%{_datadir}/%{name}/javaversion.class |
267 |
|
|
%{_datadir}/%{name}/styles |
268 |
|
|
%dir %{_libdir}/%{name} |
269 |
|
|
%{_libdir}/%{name}/hostname |
270 |
|
|
%{_libdir}/%{name}/project-id |
271 |
|
|
%{_libdir}/%{name}/urlget |
272 |
|
|
%{_libdir}/%{name}/user-email |
273 |
|
|
%if %enable_java |
274 |
|
|
%exclude %{_libdir}/%{name}/gnu.gettext.* |
275 |
|
|
%endif |
276 |
|
|
%{_infodir}/gettext.* |
277 |
rtp |
48592 |
%if !%bootstrap |
278 |
blino |
367 |
%{_datadir}/emacs/site-lisp/*.el* |
279 |
rtp |
48592 |
%endif |
280 |
blino |
367 |
%{_mandir}/man1/envsubst.* |
281 |
|
|
%{_mandir}/man1/msg* |
282 |
|
|
%{_mandir}/man1/xgettext.* |
283 |
|
|
%{_mandir}/man1/recode-sr-latin.* |
284 |
|
|
|
285 |
|
|
%files base -f %{name}.lang |
286 |
|
|
%defattr(-,root,root) |
287 |
|
|
%doc gettext-runtime/man/*.1.html |
288 |
|
|
%{_bindir}/gettext |
289 |
|
|
%{_bindir}/ngettext |
290 |
|
|
%{_mandir}/man1/gettext* |
291 |
|
|
%{_mandir}/man1/ngettext* |
292 |
|
|
|
293 |
|
|
%files -n %{intllibname} |
294 |
|
|
%defattr(-,root,root) |
295 |
|
|
%doc gettext-runtime/intl/COPYING* |
296 |
colin |
273158 |
%{_libdir}/libintl.so.* |
297 |
blino |
367 |
|
298 |
|
|
%files -n %{misclibname} |
299 |
|
|
%defattr(-,root,root) |
300 |
|
|
%doc gettext-runtime/intl/COPYING* |
301 |
colin |
273158 |
%{_libdir}/libgettext*-*.*.so |
302 |
|
|
%{_libdir}/libgettext*.so.* |
303 |
|
|
%{_libdir}/libasprintf*.so.* |
304 |
blino |
367 |
|
305 |
|
|
%files devel |
306 |
|
|
%defattr(-,root,root) |
307 |
|
|
%doc gettext-runtime/man/*.3.html examples htmldoc |
308 |
|
|
%{_bindir}/autopoint |
309 |
|
|
%{_bindir}/gettextize |
310 |
|
|
%{_datadir}/%{name}/ABOUT-NLS |
311 |
|
|
%{_datadir}/%{name}/archive* |
312 |
|
|
%{_datadir}/%{name}/config.rpath |
313 |
|
|
%{_datadir}/%{name}/*.h |
314 |
|
|
%{_datadir}/%{name}/intl |
315 |
|
|
%{_datadir}/%{name}/po |
316 |
|
|
%{_datadir}/aclocal/* |
317 |
|
|
%{_includedir}/* |
318 |
|
|
%{_infodir}/autosprintf* |
319 |
|
|
# "lib*.so" cannot be used (it should be 'lib[^\.]*\.so' regexp in fact |
320 |
|
|
# but using regexp is not possible here; so we list all files manually |
321 |
|
|
%{_libdir}/libasprintf.so |
322 |
|
|
%{_libdir}/libgettextlib.so |
323 |
|
|
%{_libdir}/libgettextpo.so |
324 |
|
|
%{_libdir}/libgettextsrc.so |
325 |
|
|
%{_libdir}/libintl.so |
326 |
|
|
%{_mandir}/man1/autopoint.* |
327 |
|
|
%{_mandir}/man3/* |
328 |
|
|
|
329 |
|
|
%if %enable_java |
330 |
|
|
%files java |
331 |
|
|
%defattr(-,root,root) |
332 |
|
|
%doc gettext-runtime/intl-java/javadoc* |
333 |
|
|
%{_libdir}/%{name}/gnu.gettext.* |
334 |
|
|
%{_datadir}/%{name}/*.jar |
335 |
|
|
%endif |
336 |
|
|
|
337 |
|
|
%if %enable_csharp |
338 |
|
|
%files csharp |
339 |
|
|
%defattr(-,root,root) |
340 |
|
|
%doc gettext-runtime/intl-csharp/csharpdoc/* |
341 |
|
|
%{_libdir}/*.dll |
342 |
|
|
%{_libdir}/gettext/*.exe |
343 |
|
|
%endif |