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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 769118 - (hide annotations) (download)
Thu Oct 16 22:12:41 2014 UTC (9 years, 6 months ago) by luigiwalser
File size: 8887 byte(s)
0.19.3
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 luigiwalser 769118 Version: 0.19.3
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 rtp 48592 Patch10: libcroco-0.6.2-format-strings.patch
29 blino 367 # (Abel) we pick mono here, though pnet can be used as well.
30 luigiwalser 671687 %if %{enable_csharp}
31 blino 367 BuildRequires: mono
32     %endif
33 luigiwalser 671687 %if %{enable_java}
34 blino 367 BuildRequires: eclipse-ecj
35     BuildRequires: gcc-java
36     BuildRequires: gcj-tools
37     BuildRequires: fastjar
38     %endif
39 luigiwalser 671687 BuildRequires: automake
40 blino 367 BuildRequires: bison
41     BuildRequires: flex
42     BuildRequires: texinfo
43     BuildRequires: libgomp-devel
44 rtp 48592 # not necessary best way to do it but without gettext-devel
45     # the bootstrap game is lost
46 luigiwalser 671687 %if !%{bootstrap}
47 rtp 48592 BuildRequires: emacs-bin
48 ovitters 643250 BuildRequires: pkgconfig(libcroco-0.6)
49 rtp 48592 %endif
50 blino 367 BuildRequires: libunistring-devel
51 ovitters 643250 BuildRequires: pkgconfig(ncurses)
52     BuildRequires: pkgconfig(libxml-2.0)
53 blino 367 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 luigiwalser 671687 %package -n %{intllibname}
86 blino 367 Summary: Basic libintl library for internationalization
87     Group: System/Libraries
88     License: LGPL
89 colin 273158 Requires(pre): filesystem >= 2.1.9-18
90 blino 367 Provides: libintl = %{version}-%{release}
91    
92 luigiwalser 671687 %description -n %{intllibname}
93 blino 367 This package contains the libintl library, which is important for
94     system internationalization.
95    
96 luigiwalser 671687 %package -n %{misclibname}
97 blino 367 Summary: Other %{name} libraries needed by %{name} utilities
98     Group: System/Libraries
99     License: LGPL
100 luigiwalser 671687 Provides: libgettextmisc
101 blino 367
102 luigiwalser 671687 %description -n %{misclibname}
103 blino 367 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 ahmad 95178 # autopoint is GPLv3+
110     # libasprintf is LGPLv2+
111     # libgettextpo is GPLv3+
112     License: LGPLv2+ and GPLv3+
113 blino 367 Requires: %{name} = %{version}
114     # fwang: autopoint requires cvs to work
115 luigiwalser 671687 %if !%{bootstrap}
116 blino 367 Requires: cvs
117 rtp 48592 %endif
118 blino 367 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 colin 273158 Requires(pre): filesystem >= 2.1.9-18
131 blino 367 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 luigiwalser 671687 %if %{enable_java}
138 blino 367 %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 luigiwalser 671687 %if %{enable_csharp}
150 blino 367 %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 fwang 585044 %apply_patches
164 blino 367
165     %build
166    
167 luigiwalser 671687 %if %{enable_java}
168 blino 367 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 ahmad 95178 --disable-static \
179     --disable-rpath \
180 blino 367 --with-included-gettext \
181 luigiwalser 671687 %if %{enable_csharp}
182 blino 367 --enable-csharp=mono \
183     %else
184     --disable-csharp \
185     %endif
186 luigiwalser 671687 %if ! %{enable_java}
187 blino 367 --disable-java \
188     %endif
189    
190     popd
191     done
192    
193     %make
194    
195 luigiwalser 671687 %if %{do_check}
196 blino 367 %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 luigiwalser 671687 rm -f %{buildroot}%{_includedir}/libintl.h \
206     %{buildroot}%{_datadir}/locale/locale.alias
207 blino 367 rm -f gettext-runtime/intl-java/javadoc2/package-list
208    
209 luigiwalser 671687 install -D -m 644 %{SOURCE2} %{buildroot}%{_sysconfdir}/emacs/site-start.d/%{name}.el
210 blino 367
211     # remove non-standard lc directories
212 luigiwalser 671687 for i in en@boldquot en@quot ; do rm -rf %{buildroot}/%{_datadir}/locale/$i; done
213 blino 367
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 luigiwalser 671687 rm -f %{buildroot}%{_datadir}/doc/gettext/`basename $i`
219 blino 367 done
220 luigiwalser 671687 rm -rf %{buildroot}%{_datadir}/doc/gettext/javadoc*
221     mv %{buildroot}%{_datadir}/doc/gettext/* %{buildroot}/%{_datadir}/doc/libasprintf/* htmldoc
222 blino 367 mv htmldoc/examples examples
223    
224     # remove java stuff, otherwise rpm complains
225 luigiwalser 671687 %if !%{enable_java}
226     rm -f %{buildroot}%{_libdir}/%{name}/gnu.gettext.* \
227     %{buildroot}%{_datadir}/%{name}/*.jar
228 blino 367 %endif
229    
230 ahmad 95178 # don't ship .la
231 ovitters 638466 find %{buildroot} -name '*.la' -delete
232 ahmad 95178
233 blino 367 %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 luigiwalser 671687 %if %{enable_java}
266 blino 367 %exclude %{_libdir}/%{name}/gnu.gettext.*
267     %endif
268     %{_infodir}/gettext.*
269 luigiwalser 671687 %if !%{bootstrap}
270 blino 367 %{_datadir}/emacs/site-lisp/*.el*
271 rtp 48592 %endif
272 blino 367 %{_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 wally 661054 %{_libdir}/libintl.so.%{major}
287     %{_libdir}/libintl.so.%{major}.*
288 blino 367
289     %files -n %{misclibname}
290     %doc gettext-runtime/intl/COPYING*
291 colin 273158 %{_libdir}/libgettext*-*.*.so
292     %{_libdir}/libgettext*.so.*
293     %{_libdir}/libasprintf*.so.*
294 blino 367
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 luigiwalser 671687 %if %{enable_java}
319 blino 367 %files java
320     %doc gettext-runtime/intl-java/javadoc*
321     %{_libdir}/%{name}/gnu.gettext.*
322     %{_datadir}/%{name}/*.jar
323     %endif
324    
325 luigiwalser 671687 %if %{enable_csharp}
326 blino 367 %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.30