diff --git a/ncurses.spec b/ncurses.spec index 006b8ddd6d9f7120421dc028b1a3c55a78337b5b..b08be2d5a53148d7d768a829f5931cd4d7a1d3b7 100644 --- a/ncurses.spec +++ b/ncurses.spec @@ -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 - 6.4-5 +- Type:requirement +- CVE:NA +- SUG:NA +- DESC:add relocation package for sysboost + * Tue Jul 04 2023 yanglu - 6.4-4 - Type:bugfix - CVE:NA