1 # The split of gettext into two packages is suggested by upstream (see
2 # the PACKAGING file). Here we name gettext-runtime as
3 # gettext-lib. Please be noted that gettext-runtime is LGPL while the
4 # others parts are of GPL. You should be careful of the license when
5 # adding files into these sub-packages.
8 %define enable_testing 0
13 License: GPLv3+ and LGPLv2+
14 Summary: GNU libraries and utilities for producing multi-lingual messages
15 Url: http://www.gnu.org/software/gettext/
16 Group: Development/Tools
17 Source: ftp://ftp.gnu.org/gnu/gettext/%{name}-%{version}.tar.gz
19 Source1001: packaging/gettext.manifest
20 Patch0: no_examples.patch
21 Patch1: getext-stdio.in.patch
23 BuildRequires: autoconf >= 2.5
25 # need expat for xgettext on glade
26 BuildRequires: expat-devel
27 BuildRequires: gcc-c++
28 BuildRequires: libtool
29 #needed for ANSI to UTF8 conversion using msgconn
30 BuildRequires: libunistring
33 The GNU gettext package provides a set of tools and documentation for
34 producing multi-lingual messages in programs. Tools include a set of
35 conventions about how programs should be written to support message
36 catalogs, a directory and file naming organization for the message
37 catalogs, a runtime library which supports the retrieval of translated
38 messages, and stand-alone programs for handling the translatable and
39 the already translated strings. Gettext provides an easy to use
40 library and tools for creating, using, and modifying natural language
41 catalogs and is a powerful and simple method for internationalizing
44 MeeGo's gettext is split into two packages: gettext-libs and
45 gettext-devel. gettext-libs is an LGPLv2+ package that contains
46 libraries and runtime needed by i18n programs; gettext-devel is used
47 only for development and building -- and shouldn't be needed by end
48 users. This gettext package is a meta-package that depends on
49 gettext-devel for transition.
53 Summary: Development files for %{name}
54 Group: Development/Tools
55 Requires: %{name}-runtime = %{version}
56 Obsoletes: gettext-devel <= 0.18.1.1-1.15
57 Provides: gettext-devel
60 This package contains all development related files necessary for
61 developing or compiling applications/libraries that needs
62 internationalization capability. You also need this package if you
63 want to add gettext support for your project.
67 Summary: Libraries for %{name}
68 Group: System/Libraries
69 Obsoletes: gettext-libs <= 0.18.1.1-1.15
70 Provides: gettext-libs
73 This package contains libraries used internationalization support.
83 [ -f %{_datadir}/automake/depcomp ] && cp -f %{_datadir}/automake/{depcomp,ylwrap} .
86 # We add a compile flag for ARM to deal with a bug in qemu (msgmerge using pthread/gomp)
87 # msgmerge will lockup during execution.
88 %define addconfflag --without-libpth-prefix --disable-openmp
92 %reconfigure --without-included-gettext --enable-nls --disable-static \
93 --enable-shared --with-pic-=yes --disable-csharp --without-libpth-prefix --disable-openmp
94 make %{?_smp_mflags} GCJFLAGS="-findirect-dispatch"
100 make install DESTDIR=%{buildroot} INSTALL="install -p" \
101 lispdir=%{_datadir}/emacs/site-lisp \
102 aclocaldir=%{_datadir}/aclocal EXAMPLESFILES=""
104 install -pm 755 %{SOURCE2} %{buildroot}%{_bindir}/msghack
106 # make preloadable_libintl.so executable
107 chmod 755 %{buildroot}%{_libdir}/preloadable_libintl.so
109 rm -f %{buildroot}%{_infodir}/dir
112 for i in gettext-runtime/man/*.html; do
113 rm %{buildroot}%{_datadir}/doc/gettext/`basename $i`
115 rm -r %{buildroot}%{_datadir}/doc/gettext/javadoc*
117 rm -rf %{buildroot}%{_datadir}/doc/gettext/examples
121 mv %{buildroot}%{_datadir}/doc/gettext/* %{buildroot}%{_datadir}/doc/libasprintf/* htmldoc
122 rm -r %{buildroot}%{_datadir}/doc/libasprintf
123 rm -r %{buildroot}%{_datadir}/doc/gettext
125 # remove unpackaged files from the buildroot
126 rm -rf %{buildroot}%{_datadir}/emacs
127 rm %{buildroot}%{_libdir}/lib*.la
130 %find_lang %{name}-runtime
131 %find_lang %{name}-tools
132 cat %{name}-*.lang > %{name}.lang
136 %post runtime -p /sbin/ldconfig
138 %postun runtime -p /sbin/ldconfig
141 %files tools -f %{name}.lang
142 %manifest gettext.manifest
143 %defattr(-,root,root,-)
145 %{_datadir}/%{name}/projects/*
146 %{_datadir}/%{name}/config.rpath
147 %{_datadir}/%{name}/*.h
148 %{_datadir}/%{name}/intl
149 %{_datadir}/%{name}/po
150 %{_datadir}/%{name}/msgunfmt.tcl
151 %{_datadir}/aclocal/*
153 %{_libdir}/libasprintf.so
154 %{_libdir}/libgettextpo.so
155 %{_libdir}/libgettextlib*.so
156 %{_libdir}/libgettextsrc*.so
157 %{_libdir}/preloadable_libintl.so
158 %{_libdir}/gettext/hostname
159 %{_libdir}/gettext/project-id
160 %{_libdir}/gettext/urlget
161 %{_libdir}/gettext/user-email
162 %{_libdir}/libgettextpo.so.*
163 %{_datadir}/%{name}/javaversion.class
164 %{_datadir}/%{name}/archive*.tar.gz
165 %{_datadir}/%{name}/styles
167 %{_bindir}/gettextize
183 %{_bindir}/recode-sr-latin
186 # Don't include language files here since that may inadvertently
187 # involve unneeded files. If you need to include a file in -libs, list
190 %manifest gettext.manifest
191 %defattr(-,root,root,-)
192 # Files listed here should be of LGPL license only, refer to upstream
193 # statement in PACKAGING file
194 %doc gettext-runtime/intl/COPYING*
195 %doc %{_datadir}/gettext/ABOUT-NLS
199 %{_bindir}/gettext.sh
200 %{_libdir}/libasprintf.so.*