source: spec/trunk/SPECS/gettext.spec@ 63

Last change on this file since 63 was 50, checked in by Yuri Dario, 15 years ago

spec: added gettext build.

File size: 8.5 KB
Line 
1%bcond_with jar
2%bcond_with java
3%bcond_without check
4%bcond_without git
5
6Summary: GNU libraries and utilities for producing multi-lingual messages
7Name: gettext
8Version: 0.18.1.1
9Release: 1
10License: GPLv3+ and LGPLv2+
11Group: Development/Tools
12URL: http://www.gnu.org/software/gettext/
13Source: ftp://ftp.gnu.org/gnu/gettext/%{name}-%{version}.tar.gz
14
15Patch0: gettext-os2.diff
16
17#BuildRequires: autoconf >= 2.62
18#BuildRequires: automake
19#BuildRequires: libtool, bison, gcc-c++
20%if %{with java}
21# libintl.jar requires gcj >= 4.3 to build
22#BuildRequires: gcc-java, libgcj
23# For javadoc
24#BuildRequires: java-1.6.0-openjdk-devel
25%if %{with jar}
26#BuildRequires: %{_bindir}/fastjar
27# require zip and unzip for brp-java-repack-jars
28#BuildRequires: zip, unzip
29%endif
30%endif
31# need expat for xgettext on glade
32#Buildrequires: expat-devel
33# for po-mode.el
34#BuildRequires: emacs
35%if %{with git}
36# for autopoint:
37#BuildRequires: git
38%endif
39#BuildRequires: chrpath
40
41Buildroot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
42
43#Requires(post): info
44#Requires(preun): info
45
46Requires: gettext-libs = %{version}-%{release}
47
48%description
49The GNU gettext package provides a set of tools and documentation for
50producing multi-lingual messages in programs. Tools include a set of
51conventions about how programs should be written to support message
52catalogs, a directory and file naming organization for the message
53catalogs, a runtime library which supports the retrieval of translated
54messages, and stand-alone programs for handling the translatable and
55the already translated strings. Gettext provides an easy to use
56library and tools for creating, using, and modifying natural language
57catalogs and is a powerful and simple method for internationalizing
58programs.
59
60
61%package devel
62Summary: Development files for %{name}
63Group: Development/Tools
64# autopoint is GPLv3+
65License: LGPLv2+ and GPLv3+
66Requires: %{name} = %{version}-%{release}
67Requires: %{name}-libs = %{version}-%{release}
68#Requires(post): info
69#Requires(preun): info
70# for autopoint
71#Requires: git
72Obsoletes: gettext-autopoint < 0.18.1.1-3
73Provides: gettext-autopoint = %{version}-%{release}
74
75
76%description devel
77This package contains all development related files necessary for
78developing or compiling applications/libraries that needs
79internationalization capability. You also need this package if you
80want to add gettext support for your project.
81
82
83%package libs
84Summary: Libraries for %{name}
85Group: System Environment/Libraries
86License: LGPLv2+
87
88%description libs
89This package contains libraries used internationalization support.
90
91
92#%package -n emacs-%{name}
93#Summary: Support for editing po files within GNU Emacs
94#Group: Applications/Editors
95#BuildArch: noarch
96# help users find po-mode.el
97#Provides: emacs-po-mode
98#Requires: emacs(bin) >= %{_emacs_version}
99
100#%description -n emacs-%{name}
101#This package provides a major mode for editing po files within GNU Emacs.
102
103
104#%package -n emacs-%{name}-el
105#Summary: Elisp source files for editing po files within GNU Emacs
106#Group: Applications/Editors
107#BuildArch: noarch
108#Requires: emacs-%{name} = %{version}-%{release}
109
110#%description -n emacs-%{name}-el
111#This package contains the Elisp source files for editing po files within GNU
112#Emacs.
113
114
115%prep
116%setup -q
117%patch0 -p1
118
119
120%build
121%if %{with java}
122export JAVAC=gcj
123%if %{with jar}
124export JAR=fastjar
125%endif
126%endif
127
128export CONFIG_SHELL="/bin/sh" ; \
129export LDFLAGS="-Zbin-files -Zhigh-mem -Zomf -Zargs-wild -Zargs-resp" ; \
130export LIBS="-lurpo" ; \
131%configure \
132 --without-included-gettext --enable-nls \
133 --without-included-libxml \
134 --disable-csharp \
135 --disable-java --disable-native-java\
136 --disable-git \
137 --disable-rpath \
138 --enable-shared --disable-static \
139 "--cache-file=%{_topdir}/cache/%{name}.cache"
140
141make %{?_smp_mflags} %{?with_java:GCJFLAGS="-findirect-dispatch"}
142
143
144%install
145rm -rf %{buildroot}
146#INSTALL="%{__install} -p"
147make install DESTDIR=${RPM_BUILD_ROOT} \
148 lispdir=%{_datadir}/emacs/site-lisp/gettext \
149 aclocaldir=%{_datadir}/aclocal EXAMPLESFILES=""
150
151# OS/2 specific files
152rm -f ${RPM_BUILD_ROOT}%{_libdir}/charset.alias
153cp gettext-runtime/intl/kintl.dll ${RPM_BUILD_ROOT}%{_libdir}
154cp gettext-tools/gnulib-lib/gtxtl.dll ${RPM_BUILD_ROOT}%{_libdir}
155cp gettext-tools/libgettextpo/gtxtp.dll ${RPM_BUILD_ROOT}%{_libdir}
156cp gettext-tools/src/gtxts.dll ${RPM_BUILD_ROOT}%{_libdir}
157
158
159# move gettext to /bin
160#mkdir -p ${RPM_BUILD_ROOT}/bin
161#mv ${RPM_BUILD_ROOT}%{_bindir}/gettext ${RPM_BUILD_ROOT}/bin
162#ln -s ../../bin/gettext ${RPM_BUILD_ROOT}%{_bindir}/gettext
163
164#install -pm 755 %SOURCE2 ${RPM_BUILD_ROOT}/%{_bindir}/msghack
165
166
167# make preloadable_libintl.so executable
168#chmod 755 ${RPM_BUILD_ROOT}%{_libdir}/preloadable_libintl.so
169
170rm -f ${RPM_BUILD_ROOT}%{_infodir}/dir
171
172# doc relocations
173for i in gettext-runtime/man/*.html; do
174 rm ${RPM_BUILD_ROOT}%{_datadir}/doc/gettext/`basename $i`
175done
176rm -r ${RPM_BUILD_ROOT}%{_datadir}/doc/gettext/javadoc*
177
178rm -rf ${RPM_BUILD_ROOT}%{_datadir}/doc/gettext/examples
179
180rm -rf htmldoc
181mkdir htmldoc
182mv ${RPM_BUILD_ROOT}%{_datadir}/doc/gettext/* ${RPM_BUILD_ROOT}/%{_datadir}/doc/libasprintf/* htmldoc
183rm -r ${RPM_BUILD_ROOT}%{_datadir}/doc/libasprintf
184rm -r ${RPM_BUILD_ROOT}%{_datadir}/doc/gettext
185
186## note libintl.jar does not build with gcj < 4.3
187## since it would not be fully portable
188%if %{with jar}
189### this is no longer needed since examples not packaged
190## set timestamp of examples ChangeLog timestamp for brp-java-repack-jars
191#for i in `find ${RPM_BUILD_ROOT} examples -newer ChangeLog -type f -name ChangeLog`; do
192# touch -r ChangeLog $i
193#done
194%else
195# in case another java compiler is installed
196rm -f ${RPM_BUILD_ROOT}%{_datadir}/%{name}/libintl.jar
197%endif
198
199rm -f ${RPM_BUILD_ROOT}%{_datadir}/%{name}/gettext.jar
200
201# remove unpackaged files from the buildroot
202rm ${RPM_BUILD_ROOT}%{_libdir}/lib*.la
203
204# move po-mode initialization elisp file to the right place, and remove byte
205# compiled file
206#install -d ${RPM_BUILD_ROOT}%{_emacs_sitestartdir}
207#mv ${RPM_BUILD_ROOT}%{_emacs_sitelispdir}/%{name}/start-po.el ${RPM_BUILD_ROOT}%{_emacs_sitestartdir}
208#rm ${RPM_BUILD_ROOT}%{_emacs_sitelispdir}/%{name}/start-po.elc
209
210#%find_lang %{name}-runtime
211#%find_lang %{name}-tools
212#cat %{name}-*.lang > %{name}.lang
213
214# cleanup rpaths
215#for i in $RPM_BUILD_ROOT%{_bindir}/* `find $RPM_BUILD_ROOT%{_libdir} -type f`; do
216# if file $i | grep "ELF 64-bit" >/dev/null; then
217# chrpath -l $i && chrpath --delete $i
218# fi
219#done
220
221
222%clean
223rm -rf ${RPM_BUILD_ROOT}
224
225
226#%if %{with check}
227#%check
228## this takes quite a lot of time to run
229#make check
230#%endif
231
232
233#%post
234#/sbin/ldconfig
235#/sbin/install-info %{_infodir}/gettext.info.gz %{_infodir}/dir || :
236
237
238#%preun
239#if [ "$1" = 0 ]; then
240# /sbin/install-info --delete %{_infodir}/gettext.info.gz %{_infodir}/dir || :
241#fi
242
243
244#%postun -p /sbin/ldconfig
245
246
247#%post devel
248#/sbin/ldconfig
249#/sbin/install-info %{_infodir}/autosprintf.info %{_infodir}/dir || :
250
251
252#%preun devel
253#if [ "$1" = 0 ]; then
254# /sbin/install-info --delete %{_infodir}/autosprintf.info %{_infodir}/dir || :
255#fi
256
257
258#%postun devel -p /sbin/ldconfig
259
260#%post libs -p /sbin/ldconfig
261#%postun libs -p /sbin/ldconfig
262
263%files
264# -f %{name}.lang
265%defattr(-,root,root,-)
266%doc AUTHORS gettext-runtime/BUGS
267%doc COPYING gettext-tools/misc/DISCLAIM README
268%doc NEWS THANKS
269%doc gettext-runtime/man/*.1.html
270%doc gettext-runtime/intl/COPYING*
271#/bin/*
272#%exclude %{_bindir}/autopoint
273%{_bindir}/*
274%{_infodir}/gettext*
275%exclude %{_mandir}/man1/autopoint.1*
276%{_mandir}/man1/*
277%{_libdir}/%{name}
278%if %{with java}
279%exclude %{_libdir}/%{name}/gnu.gettext.*
280%endif
281%dir %{_datadir}/%{name}
282%{_datadir}/%{name}/ABOUT-NLS
283%{_datadir}/%{name}/intl
284%{_datadir}/%{name}/po
285%{_datadir}/%{name}/styles
286%{_datadir}/locale/*
287
288%files devel
289%defattr(-,root,root,-)
290#%doc gettext-runtime/man/*.3.html ChangeLog
291#%{_bindir}/autopoint
292#%{_datadir}/%{name}/archive.*.tar.gz
293%{_datadir}/%{name}/projects/
294%{_datadir}/%{name}/config.rpath
295%{_datadir}/%{name}/*.h
296%{_datadir}/%{name}/msgunfmt.tcl
297%{_datadir}/aclocal/*
298%{_includedir}/*
299%{_infodir}/autosprintf*
300%{_libdir}/*.a
301%{_mandir}/man1/autopoint.1*
302%{_mandir}/man3/*
303%{_datadir}/%{name}/javaversion.class
304#%doc gettext-runtime/intl-java/javadoc*
305%if %{with java}
306%{_libdir}/%{name}/gnu.gettext.*
307%endif
308
309%files libs
310%defattr(-,root,root,-)
311%{_libdir}/kintl.dll
312%{_libdir}/gtxtl.dll
313%{_libdir}/gtxtp.dll
314%{_libdir}/gtxts.dll
315%if %{with jar}
316%{_datadir}/%{name}/libintl.jar
317%endif
318
319#%files -n emacs-%{name}
320#%defattr(-,root,root,-)
321#%dir %{_emacs_sitelispdir}/%{name}
322#%{_emacs_sitelispdir}/%{name}/*.elc
323#%{_emacs_sitestartdir}/*.el
324
325#%files -n emacs-%{name}-el
326#%defattr(-,root,root,-)
327#%{_emacs_sitelispdir}/%{name}/*.el
328
329%changelog
Note: See TracBrowser for help on using the repository browser.