Compare commits
10 Commits
d66cb0befc
...
4bca8ff7c3
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4bca8ff7c3 | ||
|
|
cd7a8f2aca | ||
|
|
dd06226368 | ||
|
|
cc93658731 | ||
|
|
13c908665e | ||
|
|
fea8377f34 | ||
|
|
d1fe74db82 | ||
|
|
47040068cf | ||
|
|
6c3ea8a13b | ||
|
|
7337eab0fe |
@ -1,7 +1,7 @@
|
||||
%global debug_package %{nil}
|
||||
%define specrelease 1%{?dist}
|
||||
#%%global debug_package %{nil}
|
||||
%define specrelease 6%{?dist}
|
||||
%if 0%{?openeuler}
|
||||
%define specrelease 1
|
||||
%define specrelease 6
|
||||
%endif
|
||||
|
||||
Name: deepin-reader
|
||||
@ -34,8 +34,8 @@ BuildRequires: fontconfig-devel
|
||||
BuildRequires: lcms2-devel
|
||||
BuildRequires: libX11-devel
|
||||
BuildRequires: qt5-qtbase-private-devel
|
||||
|
||||
|
||||
BuildRequires: chrpath
|
||||
BuildRequires: fdupes
|
||||
|
||||
%description
|
||||
%{summary}.
|
||||
@ -54,6 +54,33 @@ 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)"
|
||||
mapfile -t dupes <<<"$(echo "${line}" | tr '[:space:]' '\n' | sort -r | tail --lines=+2)"
|
||||
for dup in "${dupes[@]}"; do
|
||||
test -z "${dup}" && continue
|
||||
ln -s -f "${realfile}" "${dup}"
|
||||
done
|
||||
done
|
||||
popd
|
||||
|
||||
# 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
|
||||
%license LICENSE
|
||||
@ -64,8 +91,24 @@ popd
|
||||
# /usr/lib/libdeepin-pdfium.*
|
||||
%{_datadir}/deepin-manual/manual-assets/application/deepin-reader/document-viewer/*
|
||||
/usr/lib/deepin-reader/libdeepin-poppler*
|
||||
%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
|
||||
|
||||
* Wed Dec 07 2022 liweiganga <liweiganga@uniontech.com> - 5.9.9-4
|
||||
- fix: remove rpath
|
||||
|
||||
* Mon Dec 05 2022 liweiganga <liweiganga@uniontech.com> - 5.9.9-3
|
||||
- fix: linkfile size and install warning
|
||||
|
||||
* Mon Dec 05 2022 liweiganga <liweiganga@uniontech.com> - 5.9.9-2
|
||||
- fix: remove rpath
|
||||
|
||||
* Tue Jul 19 2022 konglidong <konglidong@uniontech.com> - 5.9.9-1
|
||||
- update to 5.9.9
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user