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

Last change on this file since 500 was 500, checked in by Yuri Dario, 11 years ago

spec: gettext, ignore pthreads rwlock(), they are only stubs.

File size: 9.4 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 981
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.1.1
13Release: 5%{?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
35#Buildrequires: 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.1.1-3
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%package debug
121Summary: HLL debug data for exception handling support.
122
123%description debug
124HLL debug data for exception handling support.
125
126
127%prep
128%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}
129%setup -q
130%else
131%setup -n "%{name}-%{version}" -Tc -a 1
132echo %{svn_rev}
133svn export %{?svn_rev:-r %{svn_rev}} %{svn_url} . --force
134rm -f "%{_sourcedir}/%{name}-%{version}%{?svn_rev:-r%{svn_rev}}.zip"
135(cd .. && zip -SrX9 "%{_sourcedir}/%{name}-%{version}%{?svn_rev:-r%{svn_rev}}.zip" "%{name}-%{version}")
136%endif
137
138%build
139%if %{with java}
140export JAVAC=gcj
141%if %{with jar}
142export JAR=fastjar
143%endif
144%endif
145
146export LDFLAGS="-Zbin-files -Zhigh-mem -Zomf -Zargs-wild -Zargs-resp" ; \
147export LIBS="-lurpo -lmmap" ; \
148
149autogen.sh --skip-gnulib --quick
150
151%configure \
152 --without-included-gettext --enable-nls \
153 --without-included-libxml \
154 --disable-csharp \
155 --disable-java --disable-native-java\
156 --disable-git \
157 --disable-rpath \
158 --enable-shared --disable-static
159
160cd gettext-tools/gnulib-lib
161make fcntl.h
162cd ../..
163
164make %{?_smp_mflags} %{?with_java:GCJFLAGS="-findirect-dispatch"}
165
166
167%install
168rm -rf %{buildroot}
169#INSTALL="%{__install} -p"
170make install DESTDIR=${RPM_BUILD_ROOT} \
171 lispdir=%{_datadir}/emacs/site-lisp/gettext \
172 aclocaldir=%{_datadir}/aclocal EXAMPLESFILES=""
173
174rm -f ${RPM_BUILD_ROOT}%{_datadir}/gettext/archive.git.tar.gz
175
176# OS/2 specific files
177rm -f ${RPM_BUILD_ROOT}%{_libdir}/charset.alias
178cp -p kintl.dll %{buildroot}%{_libdir}
179
180
181# move gettext to /bin
182#mkdir -p ${RPM_BUILD_ROOT}/bin
183#mv ${RPM_BUILD_ROOT}%{_bindir}/gettext ${RPM_BUILD_ROOT}/bin
184#ln -s ../../bin/gettext ${RPM_BUILD_ROOT}%{_bindir}/gettext
185
186#install -pm 755 %SOURCE2 ${RPM_BUILD_ROOT}/%{_bindir}/msghack
187
188
189# make preloadable_libintl.so executable
190#chmod 755 ${RPM_BUILD_ROOT}%{_libdir}/preloadable_libintl.so
191
192rm -f ${RPM_BUILD_ROOT}%{_infodir}/dir
193
194# doc relocations
195for i in gettext-runtime/man/*.html; do
196 rm ${RPM_BUILD_ROOT}%{_datadir}/doc/gettext/`basename $i`
197done
198rm -r ${RPM_BUILD_ROOT}%{_datadir}/doc/gettext/javadoc*
199
200rm -rf ${RPM_BUILD_ROOT}%{_datadir}/doc/gettext/examples
201
202rm -rf htmldoc
203mkdir htmldoc
204mv ${RPM_BUILD_ROOT}%{_datadir}/doc/gettext/* ${RPM_BUILD_ROOT}/%{_datadir}/doc/libasprintf/* htmldoc
205rm -r ${RPM_BUILD_ROOT}%{_datadir}/doc/libasprintf
206rm -r ${RPM_BUILD_ROOT}%{_datadir}/doc/gettext
207
208## note libintl.jar does not build with gcj < 4.3
209## since it would not be fully portable
210%if %{with jar}
211### this is no longer needed since examples not packaged
212## set timestamp of examples ChangeLog timestamp for brp-java-repack-jars
213#for i in `find ${RPM_BUILD_ROOT} examples -newer ChangeLog -type f -name ChangeLog`; do
214# touch -r ChangeLog $i
215#done
216%else
217# in case another java compiler is installed
218rm -f ${RPM_BUILD_ROOT}%{_datadir}/%{name}/libintl.jar
219%endif
220
221rm -f ${RPM_BUILD_ROOT}%{_datadir}/%{name}/gettext.jar
222
223# remove unpackaged files from the buildroot
224rm ${RPM_BUILD_ROOT}%{_libdir}/lib*.la
225
226# move po-mode initialization elisp file to the right place, and remove byte
227# compiled file
228#install -d ${RPM_BUILD_ROOT}%{_emacs_sitestartdir}
229#mv ${RPM_BUILD_ROOT}%{_emacs_sitelispdir}/%{name}/start-po.el ${RPM_BUILD_ROOT}%{_emacs_sitestartdir}
230#rm ${RPM_BUILD_ROOT}%{_emacs_sitelispdir}/%{name}/start-po.elc
231
232#%find_lang %{name}-runtime
233#%find_lang %{name}-tools
234#cat %{name}-*.lang > %{name}.lang
235
236# cleanup rpaths
237#for i in $RPM_BUILD_ROOT%{_bindir}/* `find $RPM_BUILD_ROOT%{_libdir} -type f`; do
238# if file $i | grep "ELF 64-bit" >/dev/null; then
239# chrpath -l $i && chrpath --delete $i
240# fi
241#done
242
243
244%clean
245rm -rf ${RPM_BUILD_ROOT}
246
247
248#%if %{with check}
249#%check
250## this takes quite a lot of time to run
251#make check
252#%endif
253
254
255#%post
256#/sbin/ldconfig
257#/sbin/install-info %{_infodir}/gettext.info.gz %{_infodir}/dir || :
258
259
260#%preun
261#if [ "$1" = 0 ]; then
262# /sbin/install-info --delete %{_infodir}/gettext.info.gz %{_infodir}/dir || :
263#fi
264
265
266#%postun -p /sbin/ldconfig
267
268
269#%post devel
270#/sbin/ldconfig
271#/sbin/install-info %{_infodir}/autosprintf.info %{_infodir}/dir || :
272
273
274#%preun devel
275#if [ "$1" = 0 ]; then
276# /sbin/install-info --delete %{_infodir}/autosprintf.info %{_infodir}/dir || :
277#fi
278
279
280#%postun devel -p /sbin/ldconfig
281
282#%post libs -p /sbin/ldconfig
283#%postun libs -p /sbin/ldconfig
284
285%files
286# -f %{name}.lang
287%defattr(-,root,root,-)
288%doc AUTHORS gettext-runtime/BUGS
289%doc COPYING gettext-tools/misc/DISCLAIM README
290%doc NEWS THANKS
291%doc gettext-runtime/man/*.1.html
292%doc gettext-runtime/intl/COPYING*
293#/bin/*
294#%exclude %{_bindir}/autopoint
295%{_bindir}/*
296%{_infodir}/gettext*
297%exclude %{_mandir}/man1/autopoint.1*
298%{_mandir}/man1/*
299%{_libdir}/%{name}
300%if %{with java}
301%exclude %{_libdir}/%{name}/gnu.gettext.*
302%endif
303%dir %{_datadir}/%{name}
304%{_datadir}/%{name}/ABOUT-NLS
305%{_datadir}/%{name}/intl
306%{_datadir}/%{name}/po
307%{_datadir}/%{name}/styles
308%{_datadir}/locale/*
309
310%files devel
311%defattr(-,root,root,-)
312#%doc gettext-runtime/man/*.3.html ChangeLog
313#%{_bindir}/autopoint
314#%{_datadir}/%{name}/archive.*.tar.gz
315%{_datadir}/%{name}/projects/
316%{_datadir}/%{name}/config.rpath
317%{_datadir}/%{name}/*.h
318%{_datadir}/%{name}/msgunfmt.tcl
319%{_datadir}/aclocal/*
320%{_includedir}/*
321%{_infodir}/autosprintf*
322%{_libdir}/*.a
323%{_mandir}/man1/autopoint.1*
324%{_mandir}/man3/*
325%{_datadir}/%{name}/javaversion.class
326#%doc gettext-runtime/intl-java/javadoc*
327%if %{with java}
328%{_libdir}/%{name}/gnu.gettext.*
329%endif
330
331%files libs
332%defattr(-,root,root,-)
333%{_libdir}/*.dll
334%exclude %{_libdir}/kintl.dll
335%if %{with jar}
336%{_datadir}/%{name}/libintl.jar
337%endif
338
339#%files -n emacs-%{name}
340#%defattr(-,root,root,-)
341#%dir %{_emacs_sitelispdir}/%{name}
342#%{_emacs_sitelispdir}/%{name}/*.elc
343#%{_emacs_sitestartdir}/*.el
344
345#%files -n emacs-%{name}-el
346#%defattr(-,root,root,-)
347#%{_emacs_sitelispdir}/%{name}/*.el
348
349%files legacy
350%defattr(-,root,root)
351%{_libdir}/kintl.dll
352
353%files debug
354%defattr(-,root,root)
355%{_bindir}/*.dbg
356%{_libdir}/*.dbg
357
358%changelog
359* Sat Jan 24 2015 yd
360- r981, ignore pthreads rwlock(), they are only stubs.
361
362* Wed Jan 14 2015 yd
363- r963, rebuilt with new libtool, which gave new dll names
364- added legacy package.
365- added debug package with symbolic info for exceptq.
Note: See TracBrowser for help on using the repository browser.