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