fix install warning
Signed-off-by: leeffo <liweiganga@uniontech.com> (cherry picked from commit 38839c46d904ae2ffd595d009a017a54527f32f2)
This commit is contained in:
parent
dd06226368
commit
cd7a8f2aca
@ -1,7 +1,7 @@
|
|||||||
#%%global debug_package %{nil}
|
#%%global debug_package %{nil}
|
||||||
%define specrelease 5%{?dist}
|
%define specrelease 6%{?dist}
|
||||||
%if 0%{?openeuler}
|
%if 0%{?openeuler}
|
||||||
%define specrelease 5
|
%define specrelease 6
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
Name: deepin-reader
|
Name: deepin-reader
|
||||||
@ -54,6 +54,7 @@ popd
|
|||||||
%install
|
%install
|
||||||
%make_install -C build INSTALL_ROOT="%buildroot"
|
%make_install -C build INSTALL_ROOT="%buildroot"
|
||||||
|
|
||||||
|
pushd %{buildroot}/usr/lib/%{name}
|
||||||
mapfile -t dups <<<"$(fdupes -1 .)"
|
mapfile -t dups <<<"$(fdupes -1 .)"
|
||||||
for line in "${dups[@]}"; do
|
for line in "${dups[@]}"; do
|
||||||
realfile="$(echo "${line}" | tr '[:space:]' '\n' | sort -r | head -1)"
|
realfile="$(echo "${line}" | tr '[:space:]' '\n' | sort -r | head -1)"
|
||||||
@ -63,11 +64,22 @@ for line in "${dups[@]}"; do
|
|||||||
ln -s -f "${realfile}" "${dup}"
|
ln -s -f "${realfile}" "${dup}"
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
|
popd
|
||||||
|
|
||||||
chrpath -d %{buildroot}%{_bindir}/%{name}
|
# remove rpath info
|
||||||
chrpath -d %{buildroot}/usr/lib/%{name}/*
|
for file in $(find %{buildroot}/ -executable -type f -exec file {} ';' | grep "\<ELF\>" | awk -F ':' '{print $1}')
|
||||||
mkdir -p %{buildroot}/etc/ld.so.conf.d
|
do
|
||||||
echo "/usr/lib/%{name}" > %{buildroot}/etc/ld.so.conf.d/%{name}-%{_arch}.conf
|
if [ ! -u "$file" ]; then
|
||||||
|
if [ -w "$file" ]; then
|
||||||
|
chrpath -d $file
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
# 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
|
%files
|
||||||
%doc README.md
|
%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
|
%config(noreplace) /etc/ld.so.conf.d/%{name}-%{_arch}.conf
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue May 30 2023 leeffo <liweiganga@uniontech.com> - 5.9.9-6
|
||||||
|
- fix: fix install warning
|
||||||
|
|
||||||
* Tue Mar 07 2023 liweiganga <liweiganga@uniontech.com> - 5.9.9-5
|
* Tue Mar 07 2023 liweiganga <liweiganga@uniontech.com> - 5.9.9-5
|
||||||
- fix: enable debug
|
- fix: enable debug
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user