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: GPL-3.0+ and LGPL-2.0+
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: 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
29 BuildRequires: glibc-locale
32 The GNU gettext package provides a set of tools and documentation for
33 producing multi-lingual messages in programs. Tools include a set of
34 conventions about how programs should be written to support message
35 catalogs, a directory and file naming organization for the message
36 catalogs, a runtime library which supports the retrieval of translated
37 messages, and stand-alone programs for handling the translatable and
38 the already translated strings. Gettext provides an easy to use
39 library and tools for creating, using, and modifying natural language
40 catalogs and is a powerful and simple method for internationalizing
43 MeeGo's gettext is split into two packages: gettext-libs and
44 gettext-devel. gettext-libs is an LGPLv2+ package that contains
45 libraries and runtime needed by i18n programs; gettext-devel is used
46 only for development and building -- and shouldn't be needed by end
47 users. This gettext package is a meta-package that depends on
48 gettext-devel for transition.
52 Summary: Development files for %{name}
53 Group: Development/Tools
54 Requires: %{name}-runtime = %{version}
55 Obsoletes: gettext-devel <= 0.18.1.1-1.15
56 Provides: gettext-devel
59 This package contains all development related files necessary for
60 developing or compiling applications/libraries that needs
61 internationalization capability. You also need this package if you
62 want to add gettext support for your project.
66 Summary: Libraries for %{name}
67 Group: System/Libraries
68 Obsoletes: gettext-libs <= 0.18.1.1-1.15
69 Provides: gettext-libs
72 This package contains libraries used internationalization support.
80 [ -f %{_datadir}/automake/depcomp ] && cp -f %{_datadir}/automake/{depcomp,ylwrap} .
83 # We add a compile flag for ARM to deal with a bug in qemu (msgmerge using pthread/gomp)
84 # msgmerge will lockup during execution.
85 %define addconfflag --without-libpth-prefix --disable-openmp
89 mkdir -p gettext-tools/intl
91 %reconfigure --without-included-gettext --enable-nls --disable-static \
92 --enable-shared --with-pic-=yes --disable-csharp --without-libpth-prefix --disable-openmp
93 make %{?_smp_mflags} GCJFLAGS="-findirect-dispatch"
99 make install DESTDIR=%{buildroot} INSTALL="install -p" \
100 lispdir=%{_datadir}/emacs/site-lisp \
101 aclocaldir=%{_datadir}/aclocal EXAMPLESFILES=""
103 install -pm 755 %{SOURCE2} %{buildroot}%{_bindir}/msghack
105 # make preloadable_libintl.so executable
106 chmod 755 %{buildroot}%{_libdir}/preloadable_libintl.so
108 rm -f %{buildroot}%{_infodir}/dir
111 for i in gettext-runtime/man/*.html; do
112 rm %{buildroot}%{_datadir}/doc/gettext/`basename $i`
114 rm -r %{buildroot}%{_datadir}/doc/gettext/javadoc*
116 rm -rf %{buildroot}%{_datadir}/doc/gettext/examples
120 mv %{buildroot}%{_datadir}/doc/gettext/* %{buildroot}%{_datadir}/doc/libasprintf/* htmldoc
121 rm -r %{buildroot}%{_datadir}/doc/libasprintf
122 rm -r %{buildroot}%{_datadir}/doc/gettext
124 # remove unpackaged files from the buildroot
125 rm -rf %{buildroot}%{_datadir}/emacs
126 rm %{buildroot}%{_libdir}/lib*.la
129 %find_lang %{name}-runtime
130 %find_lang %{name}-tools
131 cat %{name}-*.lang > %{name}.lang
135 %post runtime -p /sbin/ldconfig
137 %postun runtime -p /sbin/ldconfig
139 %post tools -p /sbin/ldconfig
141 %postun tools -p /sbin/ldconfig
143 %files tools -f %{name}.lang
144 %manifest %{name}.manifest
145 %defattr(-,root,root,-)
147 %{_datadir}/%{name}/projects/*
148 %{_datadir}/%{name}/config.rpath
149 %{_datadir}/%{name}/*.h
150 %{_datadir}/%{name}/intl
151 %{_datadir}/%{name}/po
152 %{_datadir}/%{name}/msgunfmt.tcl
153 %{_datadir}/aclocal/*
155 %{_libdir}/libasprintf.so
156 %{_libdir}/libgettextpo.so
157 %{_libdir}/libgettextlib*.so
158 %{_libdir}/libgettextsrc*.so
159 %{_libdir}/preloadable_libintl.so
160 %{_libdir}/gettext/hostname
161 %{_libdir}/gettext/project-id
162 %{_libdir}/gettext/urlget
163 %{_libdir}/gettext/user-email
164 %{_libdir}/libgettextpo.so.*
165 %{_datadir}/%{name}/javaversion.class
166 %{_datadir}/%{name}/archive*.tar.xz
167 %{_datadir}/%{name}/styles
169 %{_bindir}/gettextize
185 %{_bindir}/recode-sr-latin
188 # Don't include language files here since that may inadvertently
189 # involve unneeded files. If you need to include a file in -libs, list
192 %manifest %{name}.manifest
193 %defattr(-,root,root,-)
194 # Files listed here should be of LGPL license only, refer to upstream
195 # statement in PACKAGING file
196 %license gettext-runtime/intl/COPYING*
197 %doc %{_datadir}/gettext/ABOUT-NLS
201 %{_bindir}/gettext.sh
202 %{_libdir}/libasprintf.so.*