gettext/gettext.spec

298 lines
8.4 KiB
RPMSpec
Raw Normal View History

2019-09-30 10:40:17 -04:00
%bcond_with jar
%bcond_with java
%bcond_without check
2020-09-01 15:59:06 +08:00
%global archiveversion 0.21
2019-09-30 10:40:17 -04:00
2019-11-06 19:07:38 +08:00
Name: gettext
2020-09-01 15:59:06 +08:00
Version: 0.21
Release: 5
2019-09-30 10:40:17 -04:00
License: GPLv3+ and LGPLv2+
Summary: GNU gettext utilities are a set of tools that provides a framework to help other GNU packages produce multi-lingual messages.
2019-11-06 19:07:38 +08:00
URL: https://www.gnu.org/software/gettext/
Source: https://ftp.gnu.org/pub/gnu/gettext/%{name}-%{version}.tar.gz
2019-09-30 10:40:17 -04:00
BuildRequires: gcc-c++, emacs, xz, chrpath, autoconf
BuildRequires: ncurses-devel, libxml2-devel, glib2-devel, libunistring-devel
2019-09-30 10:40:17 -04:00
%if %{with java}
BuildRequires: gcc-java, libgcj
BuildRequires: java-1.6.0-openjdk-devel
%if %{with jar}
BuildRequires: %{_bindir}/fastjar
BuildRequires: zip, unzip
%endif
%endif
# Requires: %{name}-libs%{_isa} = %{version}-%{release}
Conflicts: filesystem < 3
Provides: /bin/gettext
Provides: bundled(gnulib)
Provides: bundled(libcroco) = 0.6.12
2019-09-30 10:40:17 -04:00
Provides: %{name}-libs
Obsoletes: %{name}-libs
%description
GNU gettext is an important step for the GNU Translation Project, as it
is an asset on which we may build many other steps. This package offers
to programmers, translators, and even users, a well integrated set of
tools and documentation. Specifically, the GNU gettext utilities are a
set of tools that provides a framework to help other GNU packages
produce multi-lingual messages. These tools include a set of conventions
about how programs should be written to support message catalogs, a
directory and file naming organization for the message catalogs themselves,
a runtime library supporting the retrieval of translated messages, and
a few stand-alone programs to massage in various ways the sets of
translatable strings, or already translated strings. A special GNU Emacs
mode also helps interested parties in preparing these sets, or bringing
them up to date.
%package devel
Summary: Development files for %{name}
License: LGPLv2+ and GPLv3+
Requires: %{name} = %{version}-%{release}
Requires(post): info
Requires(preun): info
Requires: xz
Obsoletes: gettext-autopoint < 0.18.1.1-3
Provides: gettext-autopoint = %{version}-%{release}
Obsoletes: %{name}-common-devel
Provides: %{name}-common-devel
Obsoletes: msghack
Provides: msghack
%description devel
This package provides development files and tools which help edit/alter
po files, if you need to compile gettext related application/library or
edit/alter po files, you should install this package.
want to add gettext support for your project.
%package -n emacs-%{name}
Summary: Support for editing po files within GNU Emacs
Group: Application/Editors
BuildArch: noarch
# help users find po-mode.el
Provides: emacs-po-mode
Requires: emacs(bin) >= %{_emacs_version}
Provides: emacs-%{name}-el = %{version}-%{release}
Obsoletes: emacs-%{name}-el < %{version}-%{release}
%description -n emacs-%{name}
This package provides a major mode for editing po files within GUN Emacs
2019-09-30 10:40:17 -04:00
%package help
Summary: help info for %{name}
%description help
This package contains man, license, info, readme, copyright, license.
%prep
%autosetup -n %{name}-%{version} -p1
2019-09-30 10:40:17 -04:00
sed -e 's/\(gl_cv_libxml_force_included=\)yes/\1no/' \
2019-11-06 19:07:38 +08:00
-i libtextstyle/configure
2019-09-30 10:40:17 -04:00
%build
%if %{with java}
export JAVAC=gcj
%if %{with jar}
export JAR=fastjar
%endif
%endif
%ifarch ppc ppc64 ppc64le
export CFLAGS="$RPM_OPT_FLAGS -D__SUPPORT_SNAN__"
%endif
export CPPFLAGS="-I%{_includedir}/libxml2"
export LIBS="-lxml2"
2019-09-30 10:40:17 -04:00
%configure --without-included-gettext --enable-nls --disable-static \
--enable-shared --with-pic --disable-csharp --disable-rpath \
%if %{with java}
--enable-java \
%else
--disable-java --disable-native-java \
%endif
--with-xz
make %{?_smp_mflags} %{?with_java:GCJFLAGS="-findirect-dispatch"}
%install
make install DESTDIR=${RPM_BUILD_ROOT} INSTALL="%{__install} -p" \
lispdir=%{_datadir}/emacs/site-lisp/gettext \
aclocaldir=%{_datadir}/aclocal EXAMPLESFILES=""
# make preloadable_libintl.so executable
chmod 755 ${RPM_BUILD_ROOT}%{_libdir}/preloadable_libintl.so
rm -f ${RPM_BUILD_ROOT}%{_infodir}/dir
# doc relocations
for i in gettext-runtime/man/*.html; do
rm ${RPM_BUILD_ROOT}%{_datadir}/doc/gettext/`basename $i`
done
rm -r ${RPM_BUILD_ROOT}%{_datadir}/doc/gettext/javadoc*
rm -rf ${RPM_BUILD_ROOT}%{_datadir}/doc/gettext/examples
rm -rf htmldoc
mkdir htmldoc
mv ${RPM_BUILD_ROOT}%{_datadir}/doc/gettext/* ${RPM_BUILD_ROOT}/%{_datadir}/doc/libasprintf/* htmldoc
rm -r ${RPM_BUILD_ROOT}%{_datadir}/doc/libasprintf
rm -r ${RPM_BUILD_ROOT}%{_datadir}/doc/gettext
%if %{with jar}
%else
rm -f ${RPM_BUILD_ROOT}%{_datadir}/%{name}/libintl.jar
%endif
rm -f ${RPM_BUILD_ROOT}%{_datadir}/%{name}/gettext.jar
mkdir -p $RPM_BUILD_ROOT%{_datadir}/%{name}/its
rm ${RPM_BUILD_ROOT}%{_libdir}/lib*.la
rm ${RPM_BUILD_ROOT}%{_libdir}/libgettext{src,lib}.so
install -d ${RPM_BUILD_ROOT}%{_emacs_sitestartdir}
mv ${RPM_BUILD_ROOT}%{_emacs_sitelispdir}/%{name}/start-po.el ${RPM_BUILD_ROOT}%{_emacs_sitestartdir}
rm ${RPM_BUILD_ROOT}%{_emacs_sitelispdir}/%{name}/start-po.elc
%find_lang %{name}-runtime
%find_lang %{name}-tools
cat %{name}-*.lang > %{name}.lang
# cleanup rpaths
for i in $RPM_BUILD_ROOT%{_bindir}/* `find $RPM_BUILD_ROOT%{_libdir} -type f`; do
if file $i | grep "ELF 64-bit" >/dev/null; then
chrpath -l $i && chrpath --delete $i
fi
done
%if %{with check}
%check
2019-11-06 19:07:38 +08:00
export LD_LIBRARY_PATH=$RPM_BUILD_ROOT%{_libdir}:$PWD/gettext-tools/intl/.libs
2019-09-30 10:40:17 -04:00
make check LIBUNISTRING=-lunistring
%endif
%ldconfig_scriptlets libs
%files -f %{name}.lang
2019-11-06 19:07:38 +08:00
%doc gettext-runtime/BUGS
%doc gettext-tools/misc/DISCLAIM README
2019-09-30 10:40:17 -04:00
%doc NEWS THANKS
%doc gettext-runtime/man/*.1.html
%doc gettext-runtime/intl/COPYING*
2019-11-06 19:07:38 +08:00
%license COPYING AUTHORS
2019-09-30 10:40:17 -04:00
%{_bindir}/*
%exclude %{_bindir}/autopoint
%exclude %{_bindir}/gettextize
%{_libdir}/%{name}
%if %{with java}
%exclude %{_libdir}/%{name}/gnu.gettext.*
%endif
%dir %{_datadir}/%{name}
%dir %{_datadir}/%{name}/its
%{_datadir}/%{name}/ABOUT-NLS
%{_datadir}/%{name}/po
%{_datadir}/%{name}/styles
%dir %{_datadir}/%{name}-%{archiveversion}
%{_datadir}/%{name}-%{archiveversion}/its
%{_libdir}/libasprintf.so.0*
%{_libdir}/libgettextpo.so.0*
2019-11-06 19:07:38 +08:00
%{_libdir}/libtextstyle.so.0*
2019-09-30 10:40:17 -04:00
%{_libdir}/libgettextlib-0.*.so
%{_libdir}/libgettextsrc-0.*.so
%if %{with jar}
%{_datadir}/%{name}/libintl.jar
%endif
%files devel
%doc gettext-runtime/man/*.3.html ChangeLog
%{_bindir}/autopoint
%{_bindir}/gettextize
%{_datadir}/%{name}/projects/
%{_datadir}/%{name}/config.rpath
%{_datadir}/%{name}/*.h
%{_datadir}/%{name}/msgunfmt.tcl
%{_datadir}/aclocal/*
%{_includedir}/*
%{_infodir}/autosprintf*
%{_libdir}/libasprintf.so
%{_libdir}/libgettextpo.so
2019-11-06 19:07:38 +08:00
%{_libdir}/libtextstyle.so
2019-09-30 10:40:17 -04:00
%{_libdir}/preloadable_libintl.so
%{_mandir}/man1/autopoint.1*
%{_datadir}/%{name}/javaversion.class
%doc gettext-runtime/intl-java/javadoc*
2019-11-06 19:07:38 +08:00
%{_docdir}/libtextstyle/
2019-09-30 10:40:17 -04:00
%if %{with java}
%{_libdir}/%{name}/gnu.gettext.*
%endif
%{_datadir}/%{name}/archive.*.tar.xz
%license COPYING
%files -n emacs-%{name}
2019-09-30 10:40:17 -04:00
%dir %{_emacs_sitelispdir}/%{name}
%{_emacs_sitelispdir}/%{name}/*.elc
%{_emacs_sitelispdir}/%{name}/*.el
%{_emacs_sitestartdir}/*.el
%files help
%{_infodir}/gettext*
2019-11-06 19:07:38 +08:00
%{_infodir}/libtextstyle*
2019-09-30 10:40:17 -04:00
%{_mandir}/man1/*
2019-11-06 19:07:38 +08:00
%{_mandir}/man3/*
2019-09-30 10:40:17 -04:00
%exclude %{_mandir}/man1/autopoint.1*
%changelog
* Sat Jul 31 2021 chenyanpanHW <chenyanpan@huawei.com> - 0.21-5
- DESC: delete -S git from %autosetup, and delete BuildRequires git
* Fri May 14 2021 yangzhuangzhuang<yangzhuangzhuang1@Huawei.com> - 0.21-4
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:detach the sub package emacs-gettext from gettex-devel
* Fri Apr 30 2021 yangzhuangzhuang<yangzhuangzhuang1@Huawei.com> - 0.21-3
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:Add version number for Obsoletes: emacs-gettext
* Fri Dec 4 2020 panxiaohe<panxiaohe@huawei.com> - 0.21-2
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:Delete libcroco dependency and bundle it
2020-09-01 15:59:06 +08:00
* Tue Sep 1 2020 wangchen<wangchen137@huawei.com> - 0.21-1
- Type:enhancement
- ID:NA
- SUG:NA
- DESC:update to 0.21
2020-07-27 15:37:50 +08:00
* Mon Jul 27 2020 yang_zhuang_zhuang<yangzhuangzhuang1@huawei.com> - 0.20.2-1
- Type:enhancement
- ID:NA
- SUG:NA
- DESC:update to 0.20.2
2020-01-12 17:54:51 +08:00
* Tue Jan 7 2020 chengquan<chengquan3@huawei.com> - 0.20.1-2
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:fixbug in main package and help package
2019-11-06 19:07:38 +08:00
* Fri Oct 11 2019 hanzhijun<hanzhijun1@huawei.com> - 0.20.1-1
- Type:enhancement
- ID:NA
- SUG:NA
- DESC:update to 0.20.1
* Mon Sep 30 2019 openEuler Buildteam <buildteam@openeuler.org> - 0.19.8.1-20
- modify CVE patch name
2019-09-30 10:40:17 -04:00
* Fri Sep 27 2019 openEuler Buildteam <buildteam@openeuler.org> - 0.19.8.1-19
- fix CVE-2018-18751
* Tue Sep 17 2019 openEuler Buildteam <buildteam@openeuler.org> - 0.19.8.1-18
- Package init