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

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

spec: gettext, disable drive letter mapping. ticket#109.

File size: 10.4 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 1641
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: 3%{?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%setup -n "%{name}-%{version}" -Tc -a 1
147svn export %{?svn_rev:-r %{svn_rev}} %{svn_url} . --force
148rm -f "%{_sourcedir}/%{name}-%{version}%{?svn_rev:-r%{svn_rev}}.zip"
149(cd .. && zip -SrX9 "%{_sourcedir}/%{name}-%{version}%{?svn_rev:-r%{svn_rev}}.zip" "%{name}-%{version}")
150%endif
151
152
153%build
154%if %{with_java}
155export JAVAC=gcj
156%if %{with_jar}
157export JAR=fastjar
158%endif
159%endif
160
161export LDFLAGS="-Zbin-files -Zhigh-mem -Zomf -Zargs-wild -Zargs-resp" ; \
162export LIBS="-lurpo -lmmap" ; \
163
164autogen.sh --skip-gnulib
165
166%configure \
167 --without-included-gettext --enable-nls \
168 --with-libxml2-prefix=/@unixroot/usr/include/libxml2 \
169 --disable-csharp \
170 --disable-rpath \
171 --enable-shared --disable-static \
172%if %{with_java}
173 --enable-java \
174%else
175 --disable-java --disable-native-java \
176%endif
177%if !%{with_git}
178 --disable-git
179%endif
180
181cd gettext-tools/gnulib-lib
182make fcntl.h
183cd ../..
184
185make %{?_smp_mflags} %{?with_java:GCJFLAGS="-findirect-dispatch"}
186
187
188%install
189rm -rf %{buildroot}
190make install DESTDIR=${RPM_BUILD_ROOT} \
191 lispdir=%{_datadir}/emacs/site-lisp/gettext \
192 aclocaldir=%{_datadir}/aclocal EXAMPLESFILES=""
193
194
195# OS/2 specific files
196rm -f ${RPM_BUILD_ROOT}%{_libdir}/charset.alias
197rm -f ${RPM_BUILD_ROOT}%{_datadir}/locale/locale.alias
198cp -p kintl.dll %{buildroot}%{_libdir}
199
200
201# make preloadable_libintl.so executable
202#chmod 755 ${RPM_BUILD_ROOT}%{_libdir}/preloadable_libintl.so
203
204rm -f ${RPM_BUILD_ROOT}%{_infodir}/dir
205
206# doc relocations
207for i in gettext-runtime/man/*.html; do
208 rm ${RPM_BUILD_ROOT}%{_datadir}/doc/gettext/`basename $i`
209done
210rm -r ${RPM_BUILD_ROOT}%{_datadir}/doc/gettext/javadoc*
211
212rm -rf ${RPM_BUILD_ROOT}%{_datadir}/doc/gettext/examples
213
214rm -rf htmldoc
215mkdir htmldoc
216mv ${RPM_BUILD_ROOT}%{_datadir}/doc/gettext/* ${RPM_BUILD_ROOT}/%{_datadir}/doc/libasprintf/* htmldoc
217rm -r ${RPM_BUILD_ROOT}%{_datadir}/doc/libasprintf
218rm -r ${RPM_BUILD_ROOT}%{_datadir}/doc/gettext
219
220## note libintl.jar does not build with gcj < 4.3
221## since it would not be fully portable
222%if %{with_jar}
223### this is no longer needed since examples not packaged
224## set timestamp of examples ChangeLog timestamp for brp-java-repack-jars
225#for i in `find ${RPM_BUILD_ROOT} examples -newer ChangeLog -type f -name ChangeLog`; do
226# touch -r ChangeLog $i
227#done
228%else
229# in case another java compiler is installed
230rm -f ${RPM_BUILD_ROOT}%{_datadir}/%{name}/libintl.jar
231%endif
232
233rm -f ${RPM_BUILD_ROOT}%{_datadir}/%{name}/gettext.jar
234
235# own this directory for third-party *.its files
236mkdir -p $RPM_BUILD_ROOT%{_datadir}/%{name}/its
237
238# remove unpackaged files from the buildroot
239rm ${RPM_BUILD_ROOT}%{_libdir}/lib*.la
240
241# move po-mode initialization elisp file to the right place, and remove byte
242# compiled file
243%if %{with_emacs}
244install -d ${RPM_BUILD_ROOT}%{_emacs_sitestartdir}
245mv ${RPM_BUILD_ROOT}%{_emacs_sitelispdir}/%{name}/start-po.el ${RPM_BUILD_ROOT}%{_emacs_sitestartdir}
246rm ${RPM_BUILD_ROOT}%{_emacs_sitelispdir}/%{name}/start-po.elc
247%endif
248
249%find_lang %{name}-runtime
250%find_lang %{name}-tools
251cat %{name}-*.lang > %{name}.lang
252
253# cleanup rpaths
254#for i in $RPM_BUILD_ROOT%{_bindir}/* `find $RPM_BUILD_ROOT%{_libdir} -type f`; do
255# if file $i | grep "ELF 64-bit" >/dev/null; then
256# chrpath -l $i && chrpath --delete $i
257# fi
258#done
259
260
261%clean
262rm -rf ${RPM_BUILD_ROOT}
263
264
265%if %{with_check}
266%check
267# this takes quite a lot of time to run
268
269# override LIBUNISTRING to prevent reordering of lib objects
270make check LIBUNISTRING=-lunistring
271%endif
272
273
274%post
275#/sbin/ldconfig
276#/sbin/install-info %{_infodir}/gettext.info.gz %{_infodir}/dir || :
277
278
279%preun
280if [ "$1" = 0 ]; then
281# /sbin/install-info --delete %{_infodir}/gettext.info.gz %{_infodir}/dir || :
282fi
283
284
285#%postun -p /sbin/ldconfig
286
287
288%post devel
289#/sbin/ldconfig
290#/sbin/install-info %{_infodir}/autosprintf.info %{_infodir}/dir || :
291
292
293%preun devel
294if [ "$1" = 0 ]; then
295# /sbin/install-info --delete %{_infodir}/autosprintf.info %{_infodir}/dir || :
296fi
297
298
299#%postun devel -p /sbin/ldconfig
300
301#%post libs -p /sbin/ldconfig
302#%postun libs -p /sbin/ldconfig
303
304%files -f %{name}.lang
305%defattr(-,root,root,-)
306%doc AUTHORS gettext-runtime/BUGS
307%doc COPYING gettext-tools/misc/DISCLAIM README
308%doc NEWS THANKS
309%doc gettext-runtime/man/*.1.html
310%doc gettext-runtime/intl/COPYING*
311%{_bindir}/*
312%exclude %{_bindir}/autopoint
313%exclude %{_bindir}/gettextize
314%{_infodir}/gettext*
315%exclude %{_mandir}/man1/autopoint.1*
316%{_mandir}/man1/*
317%{_libdir}/%{name}
318%if %{with_java}
319%exclude %{_libdir}/%{name}/gnu.gettext.*
320%endif
321%dir %{_datadir}/%{name}
322%dir %{_datadir}/%{name}/its
323%{_datadir}/%{name}/ABOUT-NLS
324%{_datadir}/%{name}/po
325%{_datadir}/%{name}/styles
326%dir %{_datadir}/%{name}-%{archiveversion}
327%{_datadir}/%{name}-%{archiveversion}/its
328
329%files common-devel
330%{_datadir}/%{name}/archive.*.tar.xz
331
332
333%files devel
334%defattr(-,root,root,-)
335%doc gettext-runtime/man/*.3.html ChangeLog
336%{_bindir}/autopoint
337%{_bindir}/gettextize
338%{_datadir}/%{name}/projects/
339%{_datadir}/%{name}/config.rpath
340%{_datadir}/%{name}/*.h
341%{_datadir}/%{name}/msgunfmt.tcl
342%{_datadir}/aclocal/*
343%{_includedir}/*
344%{_infodir}/autosprintf*
345%{_libdir}/*.a
346%{_mandir}/man1/autopoint.1*
347%{_mandir}/man3/*
348%{_datadir}/%{name}/intl
349%{_datadir}/%{name}/javaversion.class
350%if %{with_java}
351%doc gettext-runtime/intl-java/javadoc*
352%{_libdir}/%{name}/gnu.gettext.*
353%endif
354
355%files libs
356%defattr(-,root,root,-)
357%{_libdir}/*.dll
358%exclude %{_libdir}/kintl.dll
359%if %{with_jar}
360%{_datadir}/%{name}/libintl.jar
361%endif
362
363%if %{with_emacs}
364%files -n emacs-%{name}
365%defattr(-,root,root,-)
366%dir %{_emacs_sitelispdir}/%{name}
367%{_emacs_sitelispdir}/%{name}/*.elc
368%{_emacs_sitelispdir}/%{name}/*.el
369%{_emacs_sitestartdir}/*.el
370%endif
371
372%files legacy
373%defattr(-,root,root)
374%{_libdir}/kintl.dll
375
376%changelog
377* Thu Jun 30 2016 yd <yd@os2power.com> 0.19.8.1-3
378- r1641, disable drive letter mapping. ticket#109.
379
380* Thu Jun 30 2016 Silvan Scherrer <silvan.scherrer@aroa.ch> 0.19.8.1-2
381- r1635, remove a ABI break from upstream, fixes ticket #108.
382- r1633, use dll names as in upstream gettext, remove our changes.
383
384* Mon Jun 27 2016 Silvan Scherrer <silvan.scherrer@aroa.ch> 0.19.8.1-1
385- updated to version 0.19.8.1
386
387* Sat Jun 18 2016 yd <yd@os2power.com> 0.18.3.2-2
388- rebuild for glib2 2.33.
389
390* Fri Feb 13 2015 yd <yd@os2power.com> 0.18.3.2-1
391- r1005 and others, updated source code to 0.18.3.2.
392
393* Mon Feb 02 2015 yd <yd@os2power.com> 0.18.1.1-7
394- rebuilt with gcc 4.9.2.
395
396* Sun Jan 25 2015 yd
397- r982, revert r981, ignore pthreads rwlock(), they are only stubs.
398
399* Sat Jan 24 2015 yd
400- r981, ignore pthreads rwlock(), they are only stubs.
401
402* Wed Jan 14 2015 yd
403- r963, rebuilt with new libtool, which gave new dll names
404- added legacy package.
405- added debug package with symbolic info for exceptq.
Note: See TracBrowser for help on using the repository browser.