From a8737d7e50f9ffb9e544b9212e4cf825deafa04c Mon Sep 17 00:00:00 2001 From: Tie Liu Date: Mon, 28 Aug 2023 14:38:17 +0800 Subject: [PATCH] fix issues about not stripped --- ncurses.spec | 37 +++++++++++++++++++++++++++++++------ 1 file changed, 31 insertions(+), 6 deletions(-) diff --git a/ncurses.spec b/ncurses.spec index b08be2d..2b2c290 100644 --- a/ncurses.spec +++ b/ncurses.spec @@ -1,4 +1,6 @@ +%if %{?openEuler:1}0 %global ENABLE_RELOC 1 +%endif %if %{ENABLE_RELOC} %global ldflags_options -Wl,--emit-relocs @@ -6,7 +8,7 @@ name: ncurses Version: 6.4 -Release: 5 +Release: 6 Summary: Terminal control library License: MIT URL: https://invisible-island.net/ncurses/ncurses.html @@ -129,6 +131,25 @@ common_options="--enable-colorfgbg --enable-hard-tabs --enable-overwrite \ " abi5_options="--with-chtype=long" +%if %{?ENABLE_RELOC} +mkdir relocation +pushd relocation +ln -s ../configure . + +progs=yes + +%configure $( + echo $common_options --with-abi-version=6 + echo --enable-widec + [ $progs = yes ] || echo --without-progs +) LDFLAGS="%{?ldflags_options}" + +%make_build libs +%make_build -C progs + +popd +%endif + for abi in 5 6; do for char in narrowc widec; do mkdir $char$abi @@ -142,7 +163,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 @@ -165,9 +186,9 @@ chmod 644 ${RPM_BUILD_ROOT}%{_libdir}/lib*.a mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/terminfo %if %{?ENABLE_RELOC} -objreloc widec6/lib/libtinfo.so.%{version} +objreloc relocation/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 +mv -f relocation/lib/libtinfo.so.%{version}.relocation ${RPM_BUILD_ROOT}/usr/lib/relocation/%{_libdir}/libtinfo.so.%{version}.relocation %endif baseterms= @@ -271,12 +292,16 @@ xz NEWS %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 +* Mon Aug 28 2023 liutie - 6.4-6 +- Type:requirement +- CVE:NA +- SUG:NA +- DESC:fix issues about not stripped + * Sat Aug 05 2023 longwei - 6.4-5 - Type:requirement - CVE:NA -- Gitee