/[packages]/cauldron/gettext/current/SPECS/gettext.spec
ViewVC logotype

Contents of /cauldron/gettext/current/SPECS/gettext.spec

Parent Directory Parent Directory | Revision Log Revision Log


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

  ViewVC Help
Powered by ViewVC 1.1.30