!31 update package
From: @hanshuang123456 Reviewed-by: @HelloWorld_lvcongqing Signed-off-by: @HelloWorld_lvcongqing
This commit is contained in:
commit
23b4178953
Binary file not shown.
BIN
deepin-reader-5.9.9.tar.gz
Normal file
BIN
deepin-reader-5.9.9.tar.gz
Normal file
Binary file not shown.
@ -1,77 +1,123 @@
|
||||
%bcond_with check
|
||||
|
||||
%global with_debug 1
|
||||
%if 0%{?with_debug}
|
||||
%global debug_package %{nil}
|
||||
#%%global debug_package %{nil}
|
||||
%define specrelease 6%{?dist}
|
||||
%if 0%{?openeuler}
|
||||
%define specrelease 6
|
||||
%endif
|
||||
|
||||
Name: deepin-reader
|
||||
Version: 5.6.2
|
||||
Release: 2
|
||||
Summary: Document Viewer is a simple PDF reader, supporting bookmarks, highlights and annotations.
|
||||
Version: 5.9.9
|
||||
Release: %{specrelease}
|
||||
Summary: A simple PDF reader, supporting bookmarks, highlights and annotations
|
||||
License: GPLv3+
|
||||
URL: https://uos-packages.deepin.com/uos/pool/main/d/deepin-reader/
|
||||
Source0: %{name}-%{version}.orig.tar.xz
|
||||
URL: https://github.com/linuxdeepin/%{name}
|
||||
Source0: %{url}/archive/%{version}/%{name}-%{version}.tar.gz
|
||||
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: cmake
|
||||
BuildRequires: qt5-devel
|
||||
|
||||
BuildRequires: qt5-qtbase-devel
|
||||
BuildRequires: dtkcore-devel
|
||||
BuildRequires: dtkwidget-devel
|
||||
BuildRequires: kf5-karchive-devel
|
||||
BuildRequires: qt5-linguist
|
||||
BuildRequires: poppler-qt5
|
||||
BuildRequires: dtkcore-devel
|
||||
BuildRequires: dtkgui-devel
|
||||
BuildRequires: pkgconfig(ddjvuapi)
|
||||
BuildRequires: pkgconfig(nss)
|
||||
BuildRequires: pkgconfig(libjpeg)
|
||||
BuildRequires: pkgconfig(cairo)
|
||||
BuildRequires: openjpeg2-devel
|
||||
BuildRequires: poppler-qt5-devel
|
||||
BuildRequires: poppler
|
||||
BuildRequires: poppler-devel
|
||||
BuildRequires: djvulibre-devel
|
||||
BuildRequires: djvulibre-libs
|
||||
BuildRequires: libspectre-devel
|
||||
BuildRequires: libspectre
|
||||
BuildRequires: qt5-qtsvg-devel
|
||||
BuildRequires: qt5-qtmultimedia-devel
|
||||
BuildRequires: qt5-qtx11extras-devel
|
||||
BuildRequires: libtiff
|
||||
BuildRequires: kf5-karchive-devel
|
||||
BuildRequires: libtiff-devel
|
||||
BuildRequires: libuuid-devel
|
||||
BuildRequires: libuuid
|
||||
BuildRequires: freetype-devel
|
||||
BuildRequires: nspr-devel
|
||||
BuildRequires: fontconfig-devel
|
||||
BuildRequires: lcms2-devel
|
||||
BuildRequires: libX11-devel
|
||||
BuildRequires: qt5-qtbase-private-devel
|
||||
BuildRequires: chrpath
|
||||
BuildRequires: fdupes
|
||||
|
||||
%description
|
||||
Document Viewer is a simple PDF reader, supporting bookmarks, highlights and annotations.
|
||||
|
||||
%{summary}.
|
||||
|
||||
%prep
|
||||
%autosetup
|
||||
|
||||
%build
|
||||
sed -i '/^SUBDIRS/,$d' deepin_reader.pro
|
||||
echo 'SUBDIRS += \' >> deepin_reader.pro
|
||||
echo ' DBService \' >> deepin_reader.pro
|
||||
echo ' ModelService \' >> deepin_reader.pro
|
||||
echo ' application' >> deepin_reader.pro
|
||||
|
||||
export PATH=$PATH:/usr/lib64/qt5/bin
|
||||
mkdir build && cd build
|
||||
%{_libdir}/qt5/bin/qmake ..
|
||||
%{__make}
|
||||
|
||||
%install
|
||||
pushd %{_builddir}/%{name}-%{version}/build
|
||||
%make_install INSTALL_ROOT=%{buildroot}
|
||||
# help find (and prefer) qt5 utilities, e.g. qmake, lrelease
|
||||
export PATH=%{_qt5_bindir}:$PATH
|
||||
mkdir build && pushd build
|
||||
%qmake_qt5 ../ DAPP_VERSION=%{version} DEFINES+="VERSION=%{version}"
|
||||
%make_build
|
||||
popd
|
||||
|
||||
mkdir -p %{?buildroot}%{_libdir}
|
||||
mv %{?buildroot}//usr/lib/* %{?buildroot}%{_libdir}
|
||||
%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
|
||||
%{_bindir}/deepin-reader
|
||||
%{_libdir}/*
|
||||
%{_datadir}/applications/deepin-reader.desktop
|
||||
%{_datadir}/deepin-reader/translations/deepin-reader_en_US.qm
|
||||
%{_datadir}/deepin-reader/translations/deepin-reader_zh_CN.qm
|
||||
%{_datadir}/icons/hicolor/scalable/apps/deepin-reader.svg
|
||||
|
||||
%doc README.md
|
||||
%license LICENSE
|
||||
%{_bindir}/%{name}
|
||||
%{_datadir}/icons/hicolor/scalable/apps/%{name}.svg
|
||||
%{_datadir}/%{name}/translations/*.qm
|
||||
%{_datadir}/applications/%{name}.desktop
|
||||
# /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
|
||||
|
||||
* 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
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user