icu/icu.spec

197 lines
5.1 KiB
RPMSpec
Raw Normal View History

2019-09-30 10:53:06 -04:00
Name: icu
2024-01-24 06:26:06 +00:00
Version: 74.1
Release: 1
2019-09-30 10:53:06 -04:00
Summary: International Components for Unicode
License: MIT and UCD and Public Domain
URL: http://site.icu-project.org/
2024-01-24 06:26:06 +00:00
Source0: https://github.com/unicode-org/icu/releases/download/release-74-1/icu4c-74_1-src.tgz
2019-09-30 10:53:06 -04:00
Source1: icu-config.sh
2024-01-24 06:26:06 +00:00
BuildRequires: gcc gcc-c++ doxygen autoconf python3 git libicu
2021-11-10 12:28:48 +08:00
Requires: lib%{name} = %{version}-%{release}
2019-09-30 10:53:06 -04:00
Patch1: gennorm2-man.patch
Patch2: icuinfo-man.patch
2022-06-25 17:32:42 +08:00
Patch3: backport-remove-TestJitterbug6175.patch
%ifarch loongarch
Patch4: 0001-add-support-loongarch64.patch
%endif
%ifarch sw_64
Patch5: icu-Add-sw64-architecture.patch
%endif
2023-06-13 03:17:53 +00:00
Patch9000: delete-taboo-words.patch
2019-09-30 10:53:06 -04:00
%description
Tools and utilities for developing with icu.
%package -n libicu
Summary: libs package for icu
%description -n libicu
libs package for icu
e
%package -n libicu-devel
Summary: header files for libicu
2020-07-22 10:06:10 +08:00
Requires: libicu = %{version}-%{release} pkgconfig
2019-09-30 10:53:06 -04:00
%description -n libicu-devel
header files for libicu
%package_help
2020-10-29 16:46:47 +08:00
%{!?endian: %global endian %(%{__python3} -c "import sys;print (0 if sys.byteorder=='big' else 1)")}
2019-09-30 10:53:06 -04:00
# " this line just fixes syntax highlighting for vim that is confused by the above and continues literal
%prep
2023-06-13 03:17:53 +00:00
%autosetup -n %{name} -p1 -S git
2019-09-30 10:53:06 -04:00
%build
pushd source
autoconf
CFLAGS='%optflags -fno-strict-aliasing'
CXXFLAGS='%optflags -fno-strict-aliasing'
# Endian: BE=0 LE=1
%if ! 0%{?endian}
CPPFLAGS='-DU_IS_BIG_ENDIAN=1'
%endif
OPTIONS='--with-data-packaging=library --disable-samples'
%if 0%{?debugtrace}
OPTIONS=$OPTIONS' --enable-debug --enable-tracing'
%endif
%configure $OPTIONS
sed -i 's|-nodefaultlibs -nostdlib||' config/mh-linux
sed -i 's| \$(docfilesdir)/installdox||' Makefile
sed -i '/^\s\+\$(INSTALL_DATA) \$(docsrchfiles) \$(DESTDIR)\$(docdir)\/\$(docsubsrchdir)\s*$/d' Makefile
test -f uconfig.h.prepend && sed -e '/^#define __UCONFIG_H__/ r uconfig.h.prepend' -i common/unicode/uconfig.h
sed -i -r 's|(PKGDATA_OPTS = )|\1-v |' data/Makefile
make %{?_smp_mflags} VERBOSE=1
make %{?_smp_mflags} doc
%install
rm -rf $RPM_BUILD_ROOT source/__docs
make %{?_smp_mflags} -C source install DESTDIR=$RPM_BUILD_ROOT
make %{?_smp_mflags} -C source install-doc docdir=__docs
chmod +x $RPM_BUILD_ROOT%{_libdir}/*.so.*
(
cd $RPM_BUILD_ROOT%{_bindir}
mv icu-config icu-config-%{__isa_bits}
)
install -p -m755 -D %{SOURCE1} $RPM_BUILD_ROOT%{_bindir}/icu-config
2024-01-24 06:26:06 +00:00
cp -a %{_libdir}/libicu*.so.73* %{buildroot}%{_libdir}
2019-09-30 10:53:06 -04:00
%check
if grep -q @VERSION@ source/tools/*/*.8 source/tools/*/*.1 source/config/*.1; then
exit 1
fi
make %{?_smp_mflags} -C source check
pushd source
LD_LIBRARY_PATH=lib:stubdata:tools/ctestfw:$LD_LIBRARY_PATH bin/uconv -l
%ldconfig_scriptlets libicu
%files
%defattr(-,root,root)
%license license.html LICENSE
%exclude %{_datadir}/%{name}/*/LICENSE
%{_bindir}/derb
%{_bindir}/gen*
%{_bindir}/makeconv
%{_bindir}/pkgdata
%{_bindir}/uconv
2022-11-15 09:49:00 +00:00
%{_bindir}/icuexportdata
2019-09-30 10:53:06 -04:00
%{_sbindir}/*
%files -n libicu
%defattr(-,root,root)
%license license.html LICENSE
%{_libdir}/*.so.*
%files -n libicu-devel
%defattr(-,root,root)
%{_bindir}/%{name}-config*
%{_bindir}/icuinfo
%{_includedir}/unicode
%{_libdir}/*.so
%{_libdir}/pkgconfig/*.pc
%{_libdir}/%{name}
%{_datadir}/%{name}/%{version}/install-sh
%{_datadir}/%{name}/%{version}/mkinstalldirs
%{_datadir}/%{name}/%{version}/config
%files help
%defattr(-,root,root)
%doc readme.html
%doc source/__docs/%{name}/html/*
%{_mandir}/man1/*
%{_mandir}/man8/*
%changelog
2024-01-24 06:26:06 +00:00
* Wed Jan 24 2024 zhangpan<zhangpan103@h-partners.com> - 74.1-1
- update to 74.1
* Tue Sep 19 2023 zhouwenpei<zhouwenpei@h-partners.com> - 73.2-3
- Fix broken TestHebrewCalendarInTemporalLeapYear
* Mon Sep 11 2023 zhangpan<zhangpan103@h-partners.com> - 73.2-2
- delete libicu*.so.72*
2023-07-24 11:07:04 +08:00
* Mon Jul 24 2023 zhangpan<zhangpan103@h-partners.com> - 73.2-1
- update to 73.2
2023-06-13 03:17:53 +00:00
* Tue Jun 13 2023 zhangpan<zhangpan103@h-partners.com> - 72.1-6
- delete taboo words
2022-12-15 07:30:57 +00:00
* Thu Dec 15 2022 zhouwenpei<zhouwenpei1@h-partners.com> - 72.1-5
- delete redundant files
* Mon Nov 21 2022 zhouwenpei<zhouwenpei1@h-partners.com> - 72.1-4
- Optimize the patch for add loongarch64 architecture
* Mon Nov 21 2022 wuzx <wuzx1226@qq.com> - 72.1-3
- Add sw64 architecture
* Fri Nov 18 2022 huajingyun <huajingyun@loongson.cn> - 72.1-2
- add loongarch64 support
* Tue Nov 15 2022 zhouwenpei <zhouwenpei1@h-partners.com> - 72.1-1
2022-11-15 09:49:00 +00:00
- update to icu4c-72.1
2022-06-25 17:32:42 +08:00
* Sat Jun 25 2020 hanhui <hanhui15@h-partners.com> - 69.1-3
- fix build failed
2022-03-25 14:41:04 +08:00
* Thu Jul 16 2020 hanhui <hanhui15@h-partners.com> - 69.1-2
- delete libicu*.so.67*
* Sun Nov 07 2021 sdlzx <hdu_sdlzx@163.com> - 69.1
- update to icu4c-69.1
2020-10-29 16:46:47 +08:00
* Wed Oct 21 2020 jinzhimin<jinzhimin2@huawei.com> - 67.1-2
- modify buildrequire to python3
2020-07-21 17:12:18 +08:00
* Thu Jul 16 2020 hanhui <hanhui15@huawei.com> - 67.1
- update to icu4c-67.1
2020-03-20 14:47:25 +08:00
* Fri Mar 20 2020 gulining <gulining1@huawei.com> - 62.1-5
- fix CVE-2020-10531
2020-03-10 10:52:48 +08:00
* Tue Mar 10 2020 songnannan <songnannan2@huawei.com> - 62.1-4
- bugfix memory leak
* Sat Jan 11 2020 openEuler Buildteam <buildteam@openeuler.org> - 62.1-3
- Type:bugfix
- Id:NA
- SUG:NA
- DESC:optimization the spec
2019-12-13 15:28:47 +08:00
* Fri Nov 1 2019 openEuler Buildteam <buildteam@openeuler.org> - 62.1-2
2019-09-30 10:53:06 -04:00
- Package init