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}
|
||||
%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
|
||||
|
||||
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
|
||||
# remove rpath info
|
||||
for file in $(find %{buildroot}/ -executable -type f -exec file {} ';' | grep "\<ELF\>" | awk -F ':' '{print $1}')
|
||||
do
|
||||
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
|
||||
%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 <liweiganga@uniontech.com> - 5.9.9-6
|
||||
- fix: fix install warning
|
||||
|
||||
* Tue Mar 07 2023 liweiganga <liweiganga@uniontech.com> - 5.9.9-5
|
||||
- fix: enable debug
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user