From 38839c46d904ae2ffd595d009a017a54527f32f2 Mon Sep 17 00:00:00 2001 From: leeffo Date: Tue, 30 May 2023 09:04:05 +0000 Subject: [PATCH] fix install warning Signed-off-by: leeffo --- deepin-reader.spec | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/deepin-reader.spec b/deepin-reader.spec index ad5bb10..794d4c6 100644 --- a/deepin-reader.spec +++ b/deepin-reader.spec @@ -1,7 +1,7 @@ #%%global debug_package %{nil} -%define specrelease 5%{?dist} +%define specrelease 6%{?dist} %if 0%{?openeuler} -%define specrelease 5 +%define specrelease 6 %endif Name: deepin-reader @@ -54,6 +54,7 @@ popd %install %make_install -C build INSTALL_ROOT="%buildroot" +pushd %{buildroot}/usr/lib/%{name} mapfile -t dups <<<"$(fdupes -1 .)" for line in "${dups[@]}"; do realfile="$(echo "${line}" | tr '[:space:]' '\n' | sort -r | head -1)" @@ -63,11 +64,22 @@ for line in "${dups[@]}"; do ln -s -f "${realfile}" "${dup}" done done +popd + +# remove rpath info +for file in $(find %{buildroot}/ -executable -type f -exec file {} ';' | grep "\" | awk -F ':' '{print $1}') +do + if [ ! -u "$file" ]; then + if [ -w "$file" ]; then + chrpath -d $file + fi + fi +done -chrpath -d %{buildroot}%{_bindir}/%{name} -chrpath -d %{buildroot}/usr/lib/%{name}/* -mkdir -p %{buildroot}/etc/ld.so.conf.d -echo "/usr/lib/%{name}" > %{buildroot}/etc/ld.so.conf.d/%{name}-%{_arch}.conf +# add rpath path in ld.so.conf.d +mkdir -p %{buildroot}%{_sysconfdir}/ld.so.conf.d +echo "%{_bindir}/%{name}" > %{buildroot}/etc/ld.so.conf.d/%{name}-%{_arch}.conf +echo "/usr/lib/%{name}" >> %{buildroot}/etc/ld.so.conf.d/%{name}-%{_arch}.conf %files %doc README.md @@ -82,6 +94,9 @@ echo "/usr/lib/%{name}" > %{buildroot}/etc/ld.so.conf.d/%{name}-%{_arch}.conf %config(noreplace) /etc/ld.so.conf.d/%{name}-%{_arch}.conf %changelog +* Tue May 30 2023 leeffo - 5.9.9-6 +- fix: fix install warning + * Tue Mar 07 2023 liweiganga - 5.9.9-5 - fix: enable debug -- Gitee