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

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

spec: gettext, cairo, pkgconfig, rebuild for glib2 2.33.

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