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

  ViewVC Help
Powered by ViewVC 1.1.28