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

Last change on this file since 815 was 815, checked in by Yuri Dario, 9 years ago

spec: gettext updated to version 0.19.8.1, build fixes.

File size: 10.2 KB
Line 
1#define svn_url e:/trees/gettext/trunk
2%define svn_url http://svn.netlabs.org/repos/ports/gettext/trunk
3%define svn_rev 1622
4
5%define with_jar 0
6%define with_java 0
7%define with_check 0
8%define with_git 0
9%define with_emacs 0
10
11%global archiveversion 0.19.8
12
13Summary: GNU libraries and utilities for producing multi-lingual messages
14Name: gettext
15Version: 0.19.8.1
16Release: 1%{?dist}
17License: GPLv3+ and LGPLv2+
18Group: Development/Tools
19URL: http://www.gnu.org/software/gettext/
20Vendor: bww bitwise works GmbH
21Source: %{name}-%{version}%{?svn_rev:-r%{svn_rev}}.zip
22Source1: gettext-legacy-os2.zip
23
24BuildRequires: autoconf >= 2.62
25BuildRequires: automake
26BuildRequires: libtool, bison
27%if %{with_java}
28# libintl.jar requires gcj >= 4.3 to build
29BuildRequires: gcc-java, libgcj
30# For javadoc
31BuildRequires: java-1.6.0-openjdk-devel
32%if %{with_jar}
33BuildRequires: %{_bindir}/fastjar
34# require zip and unzip for brp-java-repack-jars
35BuildRequires: zip, unzip
36%endif
37%endif
38# for po-mode.el
39%if %{with_emacs}
40BuildRequires: emacs
41%endif
42%if %{with_git}
43# for autopoint:
44BuildRequires: git
45%endif
46#BuildRequires: chrpath
47
48# following suggested by DEPENDENCIES:
49BuildRequires: ncurses-devel
50BuildRequires: libxml2-devel
51BuildRequires: glib2-devel
52#BuildRequires: libcroco-devel
53#BuildRequires: libunistring-devel
54#Requires(post): info
55#Requires(preun): info
56Requires: %{name}-libs = %{version}-%{release}
57
58%description
59The GNU gettext package provides a set of tools and documentation for
60producing multi-lingual messages in programs. Tools include a set of
61conventions about how programs should be written to support message
62catalogs, a directory and file naming organization for the message
63catalogs, a runtime library which supports the retrieval of translated
64messages, and stand-alone programs for handling the translatable and
65the already translated strings. Gettext provides an easy to use
66library and tools for creating, using, and modifying natural language
67catalogs and is a powerful and simple method for internationalizing
68programs.
69
70
71%package common-devel
72Summary: Common development files for %{name}
73Group: Development/Tools
74# autopoint archive
75License: GPLv3+
76BuildArch: noarch
77
78%description common-devel
79This package contains common architecture independent gettext development files.
80
81
82%package devel
83Summary: Development files for %{name}
84Group: Development/Tools
85# autopoint is GPLv3+
86License: LGPLv2+ and GPLv3+
87Requires: %{name} = %{version}-%{release}
88Requires: %{name}-libs = %{version}-%{release}
89#Requires(post): info
90#Requires(preun): info
91%if %{with_git}
92# for autopoint
93Requires: git
94%endif
95Obsoletes: gettext-autopoint < 0.18.3.2-1
96Provides: gettext-autopoint = %{version}-%{release}
97
98%description devel
99This package contains all development related files necessary for
100developing or compiling applications/libraries that needs
101internationalization capability. You also need this package if you
102want to add gettext support for your project.
103
104
105%package libs
106Summary: Libraries for %{name}
107Group: System Environment/Libraries
108# libasprintf is LGPLv2+
109# libgettextpo is GPLv3+
110License: LGPLv2+ and GPLv3+
111
112%description libs
113This package contains libraries used internationalization support.
114
115
116%if %{with_emacs}
117%package -n emacs-%{name}
118Summary: Support for editing po files within GNU Emacs
119Group: Applications/Editors
120BuildArch: noarch
121# help users find po-mode.el
122Provides: emacs-po-mode
123Requires: emacs(bin) >= %{_emacs_version}
124Provides: emacs-%{name}-el = %{version}-%{release}
125Obsoletes: emacs-%{name}-el < %{version}-%{release}
126
127%description -n emacs-%{name}
128This package provides a major mode for editing po files within GNU Emacs.
129%endif
130
131
132%package legacy
133Summary: The old gettext library.
134
135%description legacy
136The old gettext library.
137
138
139%debug_package
140
141
142%prep
143%if %{?svn_rev:%(sh -c 'if test -f "%{_sourcedir}/%{name}-%{version}-r%{svn_rev}.zip" ; then echo 1 ; else echo 0 ; fi')}%{!?svn_rev):0}
144%setup -q
145%else
146<<<<<<< .mine
147%setup -n "%{name}-%{version}" -Tc -a 1
148=======
149%setup -n "%{name}-%{version}" -Tc
150>>>>>>> .r814
151svn export %{?svn_rev:-r %{svn_rev}} %{svn_url} . --force
152rm -f "%{_sourcedir}/%{name}-%{version}%{?svn_rev:-r%{svn_rev}}.zip"
153(cd .. && zip -SrX9 "%{_sourcedir}/%{name}-%{version}%{?svn_rev:-r%{svn_rev}}.zip" "%{name}-%{version}")
154%endif
155
156
157%build
158%if %{with_java}
159export JAVAC=gcj
160%if %{with_jar}
161export JAR=fastjar
162%endif
163%endif
164
165export LDFLAGS="-Zbin-files -Zhigh-mem -Zomf -Zargs-wild -Zargs-resp" ; \
166export LIBS="-lurpo -lmmap" ; \
167
168autogen.sh --skip-gnulib
169
170%configure \
171 --without-included-gettext --enable-nls \
172 --with-libxml2-prefix=/@unixroot/usr/include/libxml2 \
173 --disable-csharp \
174 --disable-rpath \
175 --enable-shared --disable-static \
176%if %{with_java}
177 --enable-java \
178%else
179 --disable-java --disable-native-java \
180%endif
181%if !%{with_git}
182 --disable-git
183%endif
184
185cd gettext-tools/gnulib-lib
186make fcntl.h
187cd ../..
188
189make %{?_smp_mflags} %{?with_java:GCJFLAGS="-findirect-dispatch"}
190
191
192%install
193rm -rf %{buildroot}
194make install DESTDIR=${RPM_BUILD_ROOT} \
195 lispdir=%{_datadir}/emacs/site-lisp/gettext \
196 aclocaldir=%{_datadir}/aclocal EXAMPLESFILES=""
197
198
199# OS/2 specific files
200rm -f ${RPM_BUILD_ROOT}%{_libdir}/charset.alias
201rm -f ${RPM_BUILD_ROOT}%{_datadir}/locale/locale.alias
202cp -p kintl.dll %{buildroot}%{_libdir}
203
204
205# make preloadable_libintl.so executable
206#chmod 755 ${RPM_BUILD_ROOT}%{_libdir}/preloadable_libintl.so
207
208rm -f ${RPM_BUILD_ROOT}%{_infodir}/dir
209
210# doc relocations
211for i in gettext-runtime/man/*.html; do
212 rm ${RPM_BUILD_ROOT}%{_datadir}/doc/gettext/`basename $i`
213done
214rm -r ${RPM_BUILD_ROOT}%{_datadir}/doc/gettext/javadoc*
215
216rm -rf ${RPM_BUILD_ROOT}%{_datadir}/doc/gettext/examples
217
218rm -rf htmldoc
219mkdir htmldoc
220mv ${RPM_BUILD_ROOT}%{_datadir}/doc/gettext/* ${RPM_BUILD_ROOT}/%{_datadir}/doc/libasprintf/* htmldoc
221rm -r ${RPM_BUILD_ROOT}%{_datadir}/doc/libasprintf
222rm -r ${RPM_BUILD_ROOT}%{_datadir}/doc/gettext
223
224## note libintl.jar does not build with gcj < 4.3
225## since it would not be fully portable
226%if %{with_jar}
227### this is no longer needed since examples not packaged
228## set timestamp of examples ChangeLog timestamp for brp-java-repack-jars
229#for i in `find ${RPM_BUILD_ROOT} examples -newer ChangeLog -type f -name ChangeLog`; do
230# touch -r ChangeLog $i
231#done
232%else
233# in case another java compiler is installed
234rm -f ${RPM_BUILD_ROOT}%{_datadir}/%{name}/libintl.jar
235%endif
236
237rm -f ${RPM_BUILD_ROOT}%{_datadir}/%{name}/gettext.jar
238
239# own this directory for third-party *.its files
240mkdir -p $RPM_BUILD_ROOT%{_datadir}/%{name}/its
241
242# remove unpackaged files from the buildroot
243rm ${RPM_BUILD_ROOT}%{_libdir}/lib*.la
244
245# move po-mode initialization elisp file to the right place, and remove byte
246# compiled file
247%if %{with_emacs}
248install -d ${RPM_BUILD_ROOT}%{_emacs_sitestartdir}
249mv ${RPM_BUILD_ROOT}%{_emacs_sitelispdir}/%{name}/start-po.el ${RPM_BUILD_ROOT}%{_emacs_sitestartdir}
250rm ${RPM_BUILD_ROOT}%{_emacs_sitelispdir}/%{name}/start-po.elc
251%endif
252
253%find_lang %{name}-runtime
254%find_lang %{name}-tools
255cat %{name}-*.lang > %{name}.lang
256
257# cleanup rpaths
258#for i in $RPM_BUILD_ROOT%{_bindir}/* `find $RPM_BUILD_ROOT%{_libdir} -type f`; do
259# if file $i | grep "ELF 64-bit" >/dev/null; then
260# chrpath -l $i && chrpath --delete $i
261# fi
262#done
263
264
265%clean
266rm -rf ${RPM_BUILD_ROOT}
267
268
269%if %{with_check}
270%check
271# this takes quite a lot of time to run
272
273# override LIBUNISTRING to prevent reordering of lib objects
274make check LIBUNISTRING=-lunistring
275%endif
276
277
278%post
279#/sbin/ldconfig
280#/sbin/install-info %{_infodir}/gettext.info.gz %{_infodir}/dir || :
281
282
283%preun
284if [ "$1" = 0 ]; then
285# /sbin/install-info --delete %{_infodir}/gettext.info.gz %{_infodir}/dir || :
286fi
287
288
289#%postun -p /sbin/ldconfig
290
291
292%post devel
293#/sbin/ldconfig
294#/sbin/install-info %{_infodir}/autosprintf.info %{_infodir}/dir || :
295
296
297%preun devel
298if [ "$1" = 0 ]; then
299# /sbin/install-info --delete %{_infodir}/autosprintf.info %{_infodir}/dir || :
300fi
301
302
303#%postun devel -p /sbin/ldconfig
304
305#%post libs -p /sbin/ldconfig
306#%postun libs -p /sbin/ldconfig
307
308%files -f %{name}.lang
309%defattr(-,root,root,-)
310%doc AUTHORS gettext-runtime/BUGS
311%doc COPYING gettext-tools/misc/DISCLAIM README
312%doc NEWS THANKS
313%doc gettext-runtime/man/*.1.html
314%doc gettext-runtime/intl/COPYING*
315%{_bindir}/*
316%exclude %{_bindir}/autopoint
317%exclude %{_bindir}/gettextize
318%{_infodir}/gettext*
319%exclude %{_mandir}/man1/autopoint.1*
320%{_mandir}/man1/*
321%{_libdir}/%{name}
322%if %{with_java}
323%exclude %{_libdir}/%{name}/gnu.gettext.*
324%endif
325%dir %{_datadir}/%{name}
326%dir %{_datadir}/%{name}/its
327%{_datadir}/%{name}/ABOUT-NLS
328%{_datadir}/%{name}/po
329%{_datadir}/%{name}/styles
330%dir %{_datadir}/%{name}-%{archiveversion}
331%{_datadir}/%{name}-%{archiveversion}/its
332
333%files common-devel
334%{_datadir}/%{name}/archive.*.tar.xz
335
336
337%files devel
338%defattr(-,root,root,-)
339%doc gettext-runtime/man/*.3.html ChangeLog
340%{_bindir}/autopoint
341%{_bindir}/gettextize
342%{_datadir}/%{name}/projects/
343%{_datadir}/%{name}/config.rpath
344%{_datadir}/%{name}/*.h
345%{_datadir}/%{name}/msgunfmt.tcl
346%{_datadir}/aclocal/*
347%{_includedir}/*
348%{_infodir}/autosprintf*
349%{_libdir}/*.a
350%{_mandir}/man1/autopoint.1*
351%{_mandir}/man3/*
352%{_datadir}/%{name}/intl
353%{_datadir}/%{name}/javaversion.class
354%if %{with_java}
355%doc gettext-runtime/intl-java/javadoc*
356%{_libdir}/%{name}/gnu.gettext.*
357%endif
358
359%files libs
360%defattr(-,root,root,-)
361%{_libdir}/*.dll
362%exclude %{_libdir}/kintl.dll
363%if %{with_jar}
364%{_datadir}/%{name}/libintl.jar
365%endif
366
367%if %{with_emacs}
368%files -n emacs-%{name}
369%defattr(-,root,root,-)
370%dir %{_emacs_sitelispdir}/%{name}
371%{_emacs_sitelispdir}/%{name}/*.elc
372%{_emacs_sitelispdir}/%{name}/*.el
373%{_emacs_sitestartdir}/*.el
374%endif
375
376%files legacy
377%defattr(-,root,root)
378%{_libdir}/kintl.dll
379
380%changelog
381* Mon Jun 27 2016 Silvan Scherrer <silvan.scherrer@aroa.ch> 0.19.8.1-1
382- updated to version 0.19.8.1
383
384* Sat Jun 18 2016 yd <yd@os2power.com> 0.18.3.2-2
385- rebuild for glib2 2.33.
386
387* Fri Feb 13 2015 yd <yd@os2power.com> 0.18.3.2-1
388- r1005 and others, updated source code to 0.18.3.2.
389
390* Mon Feb 02 2015 yd <yd@os2power.com> 0.18.1.1-7
391- rebuilt with gcc 4.9.2.
392
393* Sun Jan 25 2015 yd
394- r982, revert r981, ignore pthreads rwlock(), they are only stubs.
395
396* Sat Jan 24 2015 yd
397- r981, ignore pthreads rwlock(), they are only stubs.
398
399* Wed Jan 14 2015 yd
400- r963, rebuilt with new libtool, which gave new dll names
401- added legacy package.
402- added debug package with symbolic info for exceptq.
Note: See TracBrowser for help on using the repository browser.