2007-11-23 00:56:17 +01:00
|
|
|
#
|
2011-10-01 04:58:52 +02:00
|
|
|
# spec file for package gettext-runtime
|
2007-11-23 00:56:17 +01:00
|
|
|
#
|
2018-05-16 08:56:01 +02:00
|
|
|
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
|
2007-11-23 00:56:17 +01:00
|
|
|
#
|
2008-10-13 16:22:50 +02:00
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
2007-11-23 00:56:17 +01:00
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
|
|
|
|
2010-12-21 13:54:03 +01:00
|
|
|
%define pacname gettext
|
2016-06-20 14:51:16 +02:00
|
|
|
# datadir was not changed in 0.19.8.1 patch release
|
|
|
|
%define dataversion 0.19.8
|
2013-06-18 13:00:43 +02:00
|
|
|
%bcond_with mini
|
2008-04-10 13:16:55 +02:00
|
|
|
|
2007-11-23 00:56:17 +01:00
|
|
|
Name: gettext-runtime
|
2016-06-19 23:14:38 +02:00
|
|
|
Version: 0.19.8.1
|
2012-07-02 13:04:44 +02:00
|
|
|
Release: 0
|
|
|
|
BuildRequires: gcc-c++
|
2011-10-02 21:19:40 +02:00
|
|
|
BuildRequires: libtool
|
2007-11-23 00:56:17 +01:00
|
|
|
# To get an updated linkdupes.sh (in case there are new dupes), temproarily enable:
|
|
|
|
#BuildRequires: fdupes
|
2013-06-18 13:00:43 +02:00
|
|
|
%if %{without mini}
|
|
|
|
BuildRequires: glib2-devel
|
|
|
|
BuildRequires: libcroco-devel
|
|
|
|
BuildRequires: libxml2-devel
|
2013-06-18 13:57:28 +02:00
|
|
|
BuildRequires: perl-libintl-perl
|
|
|
|
BuildRequires: tcl
|
2014-06-11 12:44:03 +02:00
|
|
|
BuildRequires: xz
|
2009-01-14 17:46:22 +01:00
|
|
|
# bug437293
|
|
|
|
%ifarch ppc64
|
|
|
|
Obsoletes: gettext-64bit
|
|
|
|
%endif
|
|
|
|
#
|
2007-11-23 17:14:52 +01:00
|
|
|
#Rename done for openSUSE 11.0
|
|
|
|
Provides: gettext = %{version}
|
|
|
|
Obsoletes: gettext < %{version}
|
2013-06-18 13:11:19 +02:00
|
|
|
Conflicts: gettext-runtime-mini
|
2013-06-18 22:00:10 +02:00
|
|
|
Conflicts: gettext-tools-mini
|
2013-06-18 14:01:19 +02:00
|
|
|
%else
|
|
|
|
# to allow a prjconf preference which to take per build
|
|
|
|
Provides: gettext-runtime = %{version}
|
2017-07-19 13:54:22 +02:00
|
|
|
# rpm-build requires gettext-tools, but we will only just be building it
|
|
|
|
#!BuildIgnore: gettext-tools
|
2013-06-18 13:00:43 +02:00
|
|
|
%endif
|
2007-11-23 00:56:17 +01:00
|
|
|
Summary: Tools for Native Language Support (NLS)
|
2018-05-16 08:56:01 +02:00
|
|
|
License: GPL-3.0-or-later AND LGPL-2.0-or-later
|
2012-07-02 13:04:44 +02:00
|
|
|
Group: Development/Tools/Other
|
2013-06-18 13:00:43 +02:00
|
|
|
Url: http://www.gnu.org/software/gettext/
|
2007-11-23 00:56:17 +01:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
2014-06-11 12:44:03 +02:00
|
|
|
Source0: http://ftp.gnu.org/gnu/gettext/gettext-%{version}.tar.xz
|
2007-11-23 00:56:17 +01:00
|
|
|
Source1: gettext-rpmlintrc
|
|
|
|
Source2: suse-start-po-mode.el
|
|
|
|
Source3: gettext-linkdupes.sh
|
2009-12-18 12:30:29 +01:00
|
|
|
Source4: baselibs.conf
|
2014-06-11 12:44:03 +02:00
|
|
|
Source5: http://ftp.gnu.org/gnu/gettext/gettext-%{version}.tar.xz.sig
|
2014-01-13 07:03:11 +01:00
|
|
|
Source6: %name.keyring
|
2007-11-23 00:56:17 +01:00
|
|
|
Patch: gettext-0.12.1-sigfpe.patch
|
2014-12-29 10:04:48 +01:00
|
|
|
Patch1: gettext-0.19.3-fix-bashisms.patch
|
2007-11-23 00:56:17 +01:00
|
|
|
Patch2: gettext-0.12.1-gettextize.patch
|
2012-09-24 17:29:07 +02:00
|
|
|
Patch4: gettext-po-mode.diff
|
2007-11-23 00:56:17 +01:00
|
|
|
Patch5: gettext-initialize_vars.patch
|
2013-12-24 14:25:20 +01:00
|
|
|
# PATCH-FIX-OPENSUSE gettext-dont-test-gnulib.patch -- coolo@suse.de
|
|
|
|
Patch6: gettext-dont-test-gnulib.patch
|
2007-11-23 00:56:17 +01:00
|
|
|
Patch9: gettext-needlessly_init_vars.patch
|
2017-05-15 15:04:54 +02:00
|
|
|
# PATCH-FIX-UPSTREAM https://savannah.gnu.org/bugs/?49654 -- bmwiedemann@opensuse.org
|
|
|
|
Patch10: msgfmt-remove-pot-creation-date.patch
|
2015-09-04 12:04:31 +02:00
|
|
|
# PATCH-FIX-UPSTREAM boo#941629 -- pth@suse.com
|
|
|
|
Patch11: boo941629-unnessary-rpath-on-standard-path.patch
|
2018-09-19 10:26:18 +02:00
|
|
|
# PATCH-FIX-SUSE Bug boo#1106843
|
|
|
|
Patch12: msgfmt-reset-msg-length-after-remove.patch
|
2007-11-23 00:56:17 +01:00
|
|
|
|
|
|
|
%description
|
|
|
|
This package contains the intl library as well as tools that ease the
|
|
|
|
creation and maintenance of message catalogs. It allows you to extract
|
|
|
|
strings from source code. The supplied Emacs mode (po-mode.el) helps
|
|
|
|
editing these catalogs (called PO files, for portable object) and
|
|
|
|
adding translations. A special compiler turns these PO files into
|
|
|
|
binary catalogs.
|
|
|
|
|
2013-06-18 13:00:43 +02:00
|
|
|
%package -n gettext-tools%{?with_mini:-mini}
|
2007-11-23 00:56:17 +01:00
|
|
|
Summary: Tools for Native Language Support (NLS)
|
2018-05-16 08:56:01 +02:00
|
|
|
License: LGPL-2.1-or-later
|
2007-11-23 00:56:17 +01:00
|
|
|
Group: Development/Tools/Other
|
2012-01-12 16:07:04 +01:00
|
|
|
Requires: %{name} = %{version}
|
2018-05-16 08:56:01 +02:00
|
|
|
Requires(post): info
|
|
|
|
Requires(preun): info
|
2013-06-19 10:14:29 +02:00
|
|
|
Provides: gettext-devel = %{version}
|
2013-06-18 13:00:43 +02:00
|
|
|
%if %{without mini}
|
2009-01-14 17:46:22 +01:00
|
|
|
# bug437293
|
|
|
|
%ifarch ppc64
|
|
|
|
Obsoletes: gettext-devel-64bit
|
|
|
|
%endif
|
|
|
|
#
|
2008-01-25 17:05:35 +01:00
|
|
|
Obsoletes: gettext-devel < %{version}
|
2013-06-18 13:11:19 +02:00
|
|
|
Conflicts: gettext-tools-mini
|
2013-06-18 22:00:10 +02:00
|
|
|
Conflicts: gettext-runtime-mini
|
2013-06-18 13:26:39 +02:00
|
|
|
%else
|
|
|
|
# to allow a prjconf preference which to take per build
|
|
|
|
Provides: gettext-tools = %{version}
|
2013-06-18 13:00:43 +02:00
|
|
|
%endif
|
2015-12-09 12:46:46 +01:00
|
|
|
# Several tools use bison-runtime text domain:
|
2018-04-26 17:31:12 +02:00
|
|
|
%if 0%{?suse_version}
|
2015-12-09 12:46:46 +01:00
|
|
|
Recommends: bison-lang
|
2018-04-26 17:31:12 +02:00
|
|
|
%endif
|
2007-11-23 00:56:17 +01:00
|
|
|
|
2013-06-18 13:00:43 +02:00
|
|
|
%description -n gettext-tools%{?with_mini:-mini}
|
2007-11-23 00:56:17 +01:00
|
|
|
This package contains the `intl' library as well as tools that ease the
|
|
|
|
creation and maintenance of message catalogs. With it you can extract
|
|
|
|
strings from source code. The supplied Emacs mode (po-mode.el) will aid
|
|
|
|
in editing these catalogs (called PO files, for portable object) and
|
|
|
|
add translations. A special compiler will turn these PO files into
|
|
|
|
binary catalogs.
|
|
|
|
|
2013-10-30 09:42:35 +01:00
|
|
|
%package tools-doc
|
|
|
|
Summary: HTML documentation and examples for gettext-runtime
|
2018-05-16 08:56:01 +02:00
|
|
|
License: GPL-3.0-or-later AND LGPL-2.0-or-later
|
2013-10-30 09:42:35 +01:00
|
|
|
Group: Documentation/HTML
|
|
|
|
BuildArch: noarch
|
|
|
|
|
|
|
|
%description tools-doc
|
|
|
|
This subpackage contains the HTML version of the gettext documentation
|
|
|
|
as well as project examples.
|
|
|
|
|
2007-11-23 00:56:17 +01:00
|
|
|
%prep
|
|
|
|
%setup -q -n %{pacname}-%{version}
|
|
|
|
%patch
|
2014-12-29 10:04:48 +01:00
|
|
|
%patch1 -p1
|
2007-11-23 00:56:17 +01:00
|
|
|
%patch2
|
|
|
|
%patch4
|
|
|
|
%patch5
|
2013-12-24 14:25:20 +01:00
|
|
|
%patch6 -p1
|
2007-11-23 00:56:17 +01:00
|
|
|
%patch9
|
2017-05-15 15:04:54 +02:00
|
|
|
%patch10 -p1
|
2015-09-04 12:04:31 +02:00
|
|
|
%patch11 -p1
|
2018-09-19 10:26:18 +02:00
|
|
|
%patch12 -p0
|
2007-11-23 00:56:17 +01:00
|
|
|
|
|
|
|
%build
|
|
|
|
# expect a couple "You should update your `aclocal.m4' by running aclocal."
|
2017-07-03 13:49:03 +02:00
|
|
|
autoreconf -fiv
|
2007-11-23 00:56:17 +01:00
|
|
|
#sh autogen.sh
|
2010-12-21 13:54:03 +01:00
|
|
|
export CFLAGS="%{optflags} -pipe -W -Wall -Dgcc_is_lint"
|
2007-11-23 00:56:17 +01:00
|
|
|
export CXXFLAGS="$CFLAGS -Dgcc_is_lint"
|
2011-10-02 14:22:35 +02:00
|
|
|
%if 0%{?qemu_user_space_build:1}
|
|
|
|
OPTS="--disable-openmp"
|
|
|
|
%endif
|
|
|
|
%configure --enable-shared $OPTS
|
2012-09-24 17:29:07 +02:00
|
|
|
make %{?_smp_mflags} GMSGFMT=../src/msgfmt V=1
|
2007-11-23 00:56:17 +01:00
|
|
|
# use texinfo.tex supplied by the system (texinfo)
|
|
|
|
# make -C gettext-tools/doc gettext.pdf
|
|
|
|
|
|
|
|
%install
|
|
|
|
%define my_docdir %{_defaultdocdir}/%{name}
|
|
|
|
export LC_CTYPE=ISO-8859-15
|
2010-12-21 13:54:03 +01:00
|
|
|
make install DESTDIR=%{buildroot} docdir=%{my_docdir}
|
2018-05-28 19:35:16 +02:00
|
|
|
cp -pr AUTHORS NEWS README* %{buildroot}/%{my_docdir}
|
2010-12-21 13:54:03 +01:00
|
|
|
mkdir -p %{buildroot}/usr/share/emacs/site-lisp
|
|
|
|
install -m 644 %SOURCE2 %{buildroot}/usr/share/emacs/site-lisp
|
|
|
|
install -m 644 gettext-tools/misc/po-compat.el %{buildroot}/usr/share/emacs/site-lisp
|
|
|
|
install -m 644 gettext-tools/misc/po-mode.el %{buildroot}/usr/share/emacs/site-lisp
|
|
|
|
install -m 644 gettext-tools/misc/start-po.el %{buildroot}/usr/share/emacs/site-lisp
|
|
|
|
#make -C gettext-tools/doc docdir=%{buildroot}/%{my_docdir} install-pdf
|
|
|
|
if [ -e %{buildroot}/%{_libdir}/preloadable_libintl.so ];then
|
|
|
|
chmod 755 %{buildroot}/%{_libdir}/preloadable_libintl.so
|
2007-11-23 00:56:17 +01:00
|
|
|
fi
|
|
|
|
# fix rpmlint invalid-lc-messages-dir:
|
2010-12-21 13:54:03 +01:00
|
|
|
rm -rf %{buildroot}/%_datadir/locale/en@{bold,}quot
|
2007-11-23 00:56:17 +01:00
|
|
|
%{find_lang} gettext-tools
|
|
|
|
%{find_lang} gettext-runtime
|
|
|
|
#remove unwanted stuff
|
2010-12-21 13:54:03 +01:00
|
|
|
rm -f %{buildroot}/usr/share/doc/packages/gettext/README.{mingw,vms,woe32}
|
2007-11-23 00:56:17 +01:00
|
|
|
rm -f %_datadir/%name/gettext.jar
|
2010-12-21 13:54:03 +01:00
|
|
|
#find %{buildroot} -maxdepth 2 -name '*html' | xargs rm -f
|
2007-11-23 00:56:17 +01:00
|
|
|
# hardlink the dupes in the documentation:
|
2010-12-21 13:54:03 +01:00
|
|
|
cd %{buildroot}/%{my_docdir}/examples
|
2007-11-23 00:56:17 +01:00
|
|
|
sh %{SOURCE3}
|
|
|
|
# moved to gettext-java and gettext-csharp:
|
|
|
|
rm -rf *csharp* *java* ../javadoc* ../csharpdoc*
|
|
|
|
rm -f %{buildroot}%{_defaultdocdir}/%name/README.woe32
|
2018-04-26 17:31:12 +02:00
|
|
|
rm -f %{buildroot}%{_infodir}/dir
|
2010-12-21 13:54:03 +01:00
|
|
|
cd %{buildroot}/%{_mandir}/man3
|
2008-10-22 17:27:33 +02:00
|
|
|
echo ".so man3/dngettext.3" > dcngettext.3
|
|
|
|
echo ".so man3/dgettext.3" > dcgettext.3
|
2007-11-23 00:56:17 +01:00
|
|
|
|
2013-06-18 13:00:43 +02:00
|
|
|
%if %{without mini}
|
2007-11-23 00:56:17 +01:00
|
|
|
%check
|
|
|
|
# s390s fails this test,
|
|
|
|
# Starting test_recursive_lock ...test-lock: pthread_mutex_lock.c:66: __pthread_mutex_lock: Assertion `mutex->__data.__owner == 0' failed.
|
2011-10-01 04:58:52 +02:00
|
|
|
|
2012-01-13 14:23:34 +01:00
|
|
|
# These fails randomly, remove them from Makefile
|
|
|
|
sed -i -e 's/test-areadlink\$(EXEEXT) //g' \
|
|
|
|
-e 's/test-readlink\$(EXEEXT) //g' \
|
|
|
|
gettext-tools/gnulib-tests/Makefile
|
|
|
|
|
2007-11-23 00:56:17 +01:00
|
|
|
make check || {
|
|
|
|
%ifarch s390x
|
|
|
|
echo "got this during mbuild testing on s390x (on both times which make check ran):"
|
|
|
|
echo "Starting test_recursive_lock ...test-lock: pthread_mutex_lock.c:66: __pthread_mutex_lock: Assertion mutex->__data.__owner == 0 failed."
|
|
|
|
echo "s390x needs kernel/glibc/gcc fix, but let it continue bootstrap for now!"
|
2011-10-02 14:22:35 +02:00
|
|
|
%else
|
2007-11-23 00:56:17 +01:00
|
|
|
echo "make check failed, check it!"
|
|
|
|
exit 5
|
|
|
|
%endif
|
|
|
|
}
|
2013-06-18 13:00:43 +02:00
|
|
|
%endif
|
2007-11-23 00:56:17 +01:00
|
|
|
|
|
|
|
%clean
|
2010-12-21 13:54:03 +01:00
|
|
|
rm -rf %{buildroot}
|
2007-11-23 00:56:17 +01:00
|
|
|
|
2008-05-21 22:28:40 +02:00
|
|
|
%post -p /sbin/ldconfig
|
2007-11-23 00:56:17 +01:00
|
|
|
|
2008-05-21 22:28:40 +02:00
|
|
|
%postun -p /sbin/ldconfig
|
2007-11-23 00:56:17 +01:00
|
|
|
|
2013-06-18 13:00:43 +02:00
|
|
|
%post -n gettext-tools%{?with_mini:-mini}
|
2007-11-23 00:56:17 +01:00
|
|
|
%install_info --info-dir=%{_infodir} %{_infodir}/gettext.info.gz
|
|
|
|
%install_info --info-dir=%{_infodir} %{_infodir}/autosprintf.info.gz
|
|
|
|
|
2018-05-16 08:56:01 +02:00
|
|
|
%preun -n gettext-tools%{?with_mini:-mini}
|
2007-11-23 00:56:17 +01:00
|
|
|
%install_info_delete --info-dir=%{_infodir} %{_infodir}/gettext.info.gz
|
|
|
|
%install_info_delete --info-dir=%{_infodir} %{_infodir}/autosprintf.info.gz
|
|
|
|
|
|
|
|
%files -f gettext-runtime.lang
|
|
|
|
%defattr(-,root,root)
|
2018-05-28 19:35:16 +02:00
|
|
|
%license COPYING
|
2013-10-30 09:42:35 +01:00
|
|
|
%dir %_datadir/gettext
|
|
|
|
%doc %dir %_docdir/%name/
|
|
|
|
%doc %_docdir/%name/gettext.1.html
|
|
|
|
%doc %_docdir/%name/ngettext.1.html
|
|
|
|
%doc %_docdir/%name/envsubst.1.html
|
|
|
|
%doc %_docdir/%name/*.3.html
|
|
|
|
%doc %_docdir/%name/AUTHORS
|
|
|
|
%doc %_docdir/%name/NEWS
|
|
|
|
%doc %_docdir/%name/README
|
|
|
|
%doc %_docdir/%name/FAQ.html
|
2007-11-23 00:56:17 +01:00
|
|
|
%_bindir/gettext
|
|
|
|
%_bindir/ngettext
|
|
|
|
%_bindir/envsubst
|
|
|
|
%_bindir/gettext.sh
|
|
|
|
%_bindir/msgfmt
|
|
|
|
%_libdir/libgettextlib-*.so
|
|
|
|
%_libdir/libgettextsrc-*.so
|
|
|
|
%_libdir/libasprintf.so.*
|
|
|
|
%doc %_mandir/man1/gettext.1.gz
|
|
|
|
%doc %_mandir/man1/ngettext.1.gz
|
|
|
|
%doc %_mandir/man1/envsubst.1.gz
|
|
|
|
%doc %_mandir/man1/msgfmt.1.gz
|
|
|
|
%doc %_mandir/man3/*
|
|
|
|
%_datadir/gettext/ABOUT-NLS
|
2013-10-30 09:42:35 +01:00
|
|
|
%dir %_datadir/emacs
|
|
|
|
%dir %_datadir/emacs/site-lisp
|
|
|
|
%_datadir/emacs/site-lisp/po-compat.*
|
|
|
|
%_datadir/emacs/site-lisp/po-mode.*
|
|
|
|
%_datadir/emacs/site-lisp/start-po.*
|
|
|
|
%_datadir/emacs/site-lisp/suse-start-po-mode.el
|
2007-11-23 00:56:17 +01:00
|
|
|
|
2013-06-18 13:00:43 +02:00
|
|
|
%files -n gettext-tools%{?with_mini:-mini} -f gettext-tools.lang
|
2007-11-23 00:56:17 +01:00
|
|
|
%defattr(-,root,root)
|
|
|
|
%_bindir/msg[a-eg-u]*
|
|
|
|
%_bindir/msgfilter
|
|
|
|
%_bindir/xgettext
|
|
|
|
%_bindir/gettextize
|
|
|
|
%_bindir/autopoint
|
|
|
|
%_bindir/recode-sr-latin
|
|
|
|
%doc %_mandir/man1/msg[a-eg-u]*.1.gz
|
|
|
|
%doc %_mandir/man1/msgfilter.1.gz
|
|
|
|
%doc %_mandir/man1/xgettext.1.gz
|
|
|
|
%doc %_mandir/man1/gettextize.1.gz
|
|
|
|
%doc %_mandir/man1/autopoint.1.gz
|
|
|
|
%doc %_mandir/man1/recode-sr-latin.1.gz
|
|
|
|
%doc %_infodir/gettext.info*
|
|
|
|
%doc %_infodir/autosprintf.info*
|
|
|
|
%_includedir/gettext-po.h
|
|
|
|
%_includedir/autosprintf.h
|
|
|
|
%_libdir/libasprintf.*a
|
|
|
|
%_libdir/libasprintf.so
|
|
|
|
%_libdir/libgettextlib.*
|
|
|
|
%_libdir/libgettextsrc.*
|
|
|
|
%_libdir/libgettextpo*
|
|
|
|
%_libdir/preloadable_libintl.so
|
|
|
|
%_libdir/gettext
|
|
|
|
%_datadir/%pacname/config.rpath
|
|
|
|
%_datadir/%pacname/intl
|
|
|
|
%_datadir/%pacname/po
|
|
|
|
%_datadir/%pacname/projects
|
|
|
|
%_datadir/%pacname/gettext.h
|
|
|
|
%_datadir/%pacname/msgunfmt.tcl
|
|
|
|
%_datadir/%pacname/javaversion.class
|
|
|
|
%_datadir/%pacname/styles
|
2013-06-11 13:46:48 +02:00
|
|
|
%_datadir/%pacname/archive.dir.tar.xz
|
2007-11-23 00:56:17 +01:00
|
|
|
%_datadir/aclocal/*
|
2016-06-20 14:51:16 +02:00
|
|
|
%dir %{_datadir}/%{pacname}-%{dataversion}
|
|
|
|
%{_datadir}/%{pacname}-%{dataversion}/its
|
2007-11-23 00:56:17 +01:00
|
|
|
|
2013-10-30 09:42:35 +01:00
|
|
|
%files tools-doc
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%doc %dir %_docdir/%name/
|
|
|
|
%doc %_docdir/%name/examples/
|
|
|
|
%doc %_docdir/%name/auto*.html
|
|
|
|
%doc %_docdir/%name/gettext_*.html
|
|
|
|
%doc %_docdir/%name/gettextize*.html
|
|
|
|
%doc %_docdir/%name/msg*.html
|
|
|
|
%doc %_docdir/%name/tutorial*.html
|
|
|
|
%doc %_docdir/%name/xgettext*.html
|
|
|
|
%doc %_docdir/%name/recode-sr-latin.1.html
|
|
|
|
|
2007-11-23 00:56:17 +01:00
|
|
|
%changelog
|