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