!72 add relocation package for ncurse on master

From: @a-carter-bear 
Reviewed-by: @yanan-rock 
Signed-off-by: @yanan-rock
This commit is contained in:
openeuler-ci-bot 2023-08-09 07:45:10 +00:00 committed by Gitee
commit f6df0868ea
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -1,6 +1,12 @@
Name: ncurses
%global ENABLE_RELOC 1
%if %{ENABLE_RELOC}
%global ldflags_options -Wl,--emit-relocs
%endif
name: ncurses
Version: 6.4
Release: 4
Release: 5
Summary: Terminal control library
License: MIT
URL: https://invisible-island.net/ncurses/ncurses.html
@ -90,6 +96,16 @@ Requires: %{name} = %{version}-%{release}
This package contains development documentation, manuals
for interface function, and related documents.
%if %{?ENABLE_RELOC}
%package relocation
Summary: Relocation for %{name}
Requires: %{name} = %{version}-%{release}
BuildRequires: native-turbo-tools
%description relocation
This package contains relocations file for %{name}.
%endif
%prep
%autosetup -n %{name}-%{version} -p1
@ -126,7 +142,7 @@ for abi in 5 6; do
[ $abi = 5 ] && echo $abi5_options
[ $char = widec ] && echo --enable-widec
[ $progs = yes ] || echo --without-progs
)
) LDFLAGS="%{?ldflags_options}"
%make_build libs
[ $progs = yes ] && %make_build -C progs
@ -148,6 +164,12 @@ chmod 644 ${RPM_BUILD_ROOT}%{_libdir}/lib*.a
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/terminfo
%if %{?ENABLE_RELOC}
objreloc widec6/lib/libtinfo.so.%{version}
mkdir -p ${RPM_BUILD_ROOT}/usr/lib/relocation/%{_libdir}
mv -f widec6/lib/libtinfo.so.%{version}.relocation ${RPM_BUILD_ROOT}/usr/lib/relocation/%{_libdir}/libtinfo.so.%{version}.relocation
%endif
baseterms=
# prepare -base and -term file lists
@ -247,7 +269,20 @@ xz NEWS
%{_mandir}/man5/*
%{_mandir}/man7/*
%if %{?ENABLE_RELOC}
%files relocation
%dir %attr(500, root, root) /usr/lib/relocation
%dir %attr(500, root, root) /usr/lib/relocation/%{_libdir}
%attr(400, root, root) /usr/lib/relocation/%{_libdir}/libtinfo.so.%{version}.relocation
%endif
%changelog
* Sat Aug 05 2023 longwei <longwei27@huawei.com> - 6.4-5
- Type:requirement
- CVE:NA
- SUG:NA
- DESC:add relocation package for sysboost
* Tue Jul 04 2023 yanglu <yanglu72@h-partners.com> - 6.4-4
- Type:bugfix
- CVE:NA