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.bz2
19 Source1001: gettext.manifest
21 BuildRequires: autoconf >= 2.5
23 # need expat for xgettext on glade
24 BuildRequires: expat-devel
25 BuildRequires: gcc-c++
26 BuildRequires: libtool
27 #needed for ANSI to UTF8 conversion using msgconn
28 BuildRequires: libunistring
31 The GNU gettext package provides a set of tools and documentation for
32 producing multi-lingual messages in programs. Tools include a set of
33 conventions about how programs should be written to support message
34 catalogs, a directory and file naming organization for the message
35 catalogs, a runtime library which supports the retrieval of translated
36 messages, and stand-alone programs for handling the translatable and
37 the already translated strings. Gettext provides an easy to use
38 library and tools for creating, using, and modifying natural language
39 catalogs and is a powerful and simple method for internationalizing
42 MeeGo's gettext is split into two packages: gettext-libs and
43 gettext-devel. gettext-libs is an LGPLv2+ package that contains
44 libraries and runtime needed by i18n programs; gettext-devel is used
45 only for development and building -- and shouldn't be needed by end
46 users. This gettext package is a meta-package that depends on
47 gettext-devel for transition.
51 Summary: Development files for %{name}
52 Group: Development/Tools
53 Requires: %{name}-runtime = %{version}
54 Obsoletes: gettext-devel <= 0.18.1.1-1.15
55 Provides: gettext-devel
58 This package contains all development related files necessary for
59 developing or compiling applications/libraries that needs
60 internationalization capability. You also need this package if you
61 want to add gettext support for your project.
65 Summary: Libraries for %{name}
66 Group: System/Libraries
67 Obsoletes: gettext-libs <= 0.18.1.1-1.15
68 Provides: gettext-libs
71 This package contains libraries used internationalization support.
79 [ -f %{_datadir}/automake/depcomp ] && cp -f %{_datadir}/automake/{depcomp,ylwrap} .
82 # We add a compile flag for ARM to deal with a bug in qemu (msgmerge using pthread/gomp)
83 # msgmerge will lockup during execution.
84 %define addconfflag --without-libpth-prefix --disable-openmp
88 mkdir -p gettext-tools/intl
90 %reconfigure --without-included-gettext --enable-nls --disable-static \
91 --enable-shared --with-pic-=yes --disable-csharp --without-libpth-prefix --disable-openmp
92 make %{?_smp_mflags} GCJFLAGS="-findirect-dispatch"
98 make install DESTDIR=%{buildroot} INSTALL="install -p" \
99 lispdir=%{_datadir}/emacs/site-lisp \
100 aclocaldir=%{_datadir}/aclocal EXAMPLESFILES=""
102 install -pm 755 %{SOURCE2} %{buildroot}%{_bindir}/msghack
104 # make preloadable_libintl.so executable
105 chmod 755 %{buildroot}%{_libdir}/preloadable_libintl.so
107 rm -f %{buildroot}%{_infodir}/dir
110 for i in gettext-runtime/man/*.html; do
111 rm %{buildroot}%{_datadir}/doc/gettext/`basename $i`
113 rm -r %{buildroot}%{_datadir}/doc/gettext/javadoc*
115 rm -rf %{buildroot}%{_datadir}/doc/gettext/examples
119 mv %{buildroot}%{_datadir}/doc/gettext/* %{buildroot}%{_datadir}/doc/libasprintf/* htmldoc
120 rm -r %{buildroot}%{_datadir}/doc/libasprintf
121 rm -r %{buildroot}%{_datadir}/doc/gettext
123 # remove unpackaged files from the buildroot
124 rm -rf %{buildroot}%{_datadir}/emacs
125 rm %{buildroot}%{_libdir}/lib*.la
128 %find_lang %{name}-runtime
129 %find_lang %{name}-tools
130 cat %{name}-*.lang > %{name}.lang
134 %post runtime -p /sbin/ldconfig
136 %postun runtime -p /sbin/ldconfig
139 %files tools -f %{name}.lang
140 %manifest %{name}.manifest
141 %defattr(-,root,root,-)
143 %{_datadir}/%{name}/projects/*
144 %{_datadir}/%{name}/config.rpath
145 %{_datadir}/%{name}/*.h
146 %{_datadir}/%{name}/intl
147 %{_datadir}/%{name}/po
148 %{_datadir}/%{name}/msgunfmt.tcl
149 %{_datadir}/aclocal/*
151 %{_libdir}/libasprintf.so
152 %{_libdir}/libgettextpo.so
153 %{_libdir}/libgettextlib*.so
154 %{_libdir}/libgettextsrc*.so
155 %{_libdir}/preloadable_libintl.so
156 %{_libdir}/gettext/hostname
157 %{_libdir}/gettext/project-id
158 %{_libdir}/gettext/urlget
159 %{_libdir}/gettext/user-email
160 %{_libdir}/libgettextpo.so.*
161 %{_datadir}/%{name}/javaversion.class
162 %{_datadir}/%{name}/archive*.tar.gz
163 %{_datadir}/%{name}/styles
165 %{_bindir}/gettextize
181 %{_bindir}/recode-sr-latin
184 # Don't include language files here since that may inadvertently
185 # involve unneeded files. If you need to include a file in -libs, list
188 %manifest %{name}.manifest
189 %defattr(-,root,root,-)
190 # Files listed here should be of LGPL license only, refer to upstream
191 # statement in PACKAGING file
192 %doc gettext-runtime/intl/COPYING*
193 %doc %{_datadir}/gettext/ABOUT-NLS
197 %{_bindir}/gettext.sh
198 %{_libdir}/libasprintf.so.*