update deepin-reader package

This commit is contained in:
hanshuang 2023-11-07 16:47:51 +08:00
parent 350f78d4a1
commit 5625ff2c70
2 changed files with 69 additions and 13 deletions

View File

@ -1,8 +1,12 @@
%global debug_package %{nil}
#%%global debug_package %{nil}
%define specrelease 6%{?dist}
%if 0%{?openeuler}
%define specrelease 6
%endif
Name: deepin-reader
Version: 5.9.9.2
Release: 1%{?dist}.01
Version: 5.9.9
Release: %{specrelease}
Summary: A simple PDF reader, supporting bookmarks, highlights and annotations
License: GPLv3+
URL: https://github.com/linuxdeepin/%{name}
@ -12,7 +16,9 @@ BuildRequires: gcc-c++
BuildRequires: cmake
BuildRequires: qt5-devel
BuildRequires: pkgconfig(dtkwidget)
BuildRequires: dtkwidget-devel
BuildRequires: dtkcore-devel
BuildRequires: dtkgui-devel
BuildRequires: pkgconfig(ddjvuapi)
BuildRequires: pkgconfig(nss)
BuildRequires: pkgconfig(libjpeg)
@ -27,13 +33,9 @@ BuildRequires: nspr-devel
BuildRequires: fontconfig-devel
BuildRequires: lcms2-devel
BuildRequires: libX11-devel
# BuildRequires: libicu-devel
# BuildRequires: libpng-devel
# BuildRequires: zlib-devel
# BuildRequires: gtest-devel
# BuildRequires: libchardet-devel
BuildRequires: qt5-qtbase-private-devel
BuildRequires: chrpath
BuildRequires: fdupes
%description
%{summary}.
@ -52,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
@ -62,8 +91,35 @@ 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
* Mon Jun 13 2022 uoser <uoser@uniontech.com> - 5.9.9.2-1.01
- update: update to 5.9.9.2-1.01
* 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
* Thu Feb 10 2022 liweigang <liweiganga@uniontech.com> - 5.7.0.21-2
- fix build error
* Wed Jul 07 2021 weidong <weidong@uniontech.com> - 5.7.0.21-1
- Update to 5.7.0.21
* Tue Sep 1 2020 chenbo pan <panchenbo@uniontech.com> - 5.6.9-2
- fix compile fail
* Thu Jul 30 2020 openEuler Buildteam <buildteam@openeuler.org> - 5.6.2-1
- Package init