add relocation package for sysboost
This commit is contained in:
l00580197 2023-08-05 14:59:20 +08:00 committed by longwei
parent a32a74c01a
commit a44ecfd035

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 Version: 6.4
Release: 4 Release: 5
Summary: Terminal control library Summary: Terminal control library
License: MIT License: MIT
URL: https://invisible-island.net/ncurses/ncurses.html URL: https://invisible-island.net/ncurses/ncurses.html
@ -90,6 +96,16 @@ Requires: %{name} = %{version}-%{release}
This package contains development documentation, manuals This package contains development documentation, manuals
for interface function, and related documents. 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 %prep
%autosetup -n %{name}-%{version} -p1 %autosetup -n %{name}-%{version} -p1
@ -126,7 +142,7 @@ for abi in 5 6; do
[ $abi = 5 ] && echo $abi5_options [ $abi = 5 ] && echo $abi5_options
[ $char = widec ] && echo --enable-widec [ $char = widec ] && echo --enable-widec
[ $progs = yes ] || echo --without-progs [ $progs = yes ] || echo --without-progs
) ) LDFLAGS="%{?ldflags_options}"
%make_build libs %make_build libs
[ $progs = yes ] && %make_build -C progs [ $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 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= baseterms=
# prepare -base and -term file lists # prepare -base and -term file lists
@ -247,7 +269,20 @@ xz NEWS
%{_mandir}/man5/* %{_mandir}/man5/*
%{_mandir}/man7/* %{_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 %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 * Tue Jul 04 2023 yanglu <yanglu72@h-partners.com> - 6.4-4
- Type:bugfix - Type:bugfix
- CVE:NA - CVE:NA