F34 fix
This commit is contained in:
parent
2fd7c47e3b
commit
1b6695ef06
126
qpdfview.spec
126
qpdfview.spec
@ -1,72 +1,92 @@
|
|||||||
#%%global prerelease beta1
|
#%%global prerelease beta1
|
||||||
|
# RHEL & Fedora <= 33
|
||||||
|
%global with_qt4 0%{?rhel} || 0%{?fedora} <= 33
|
||||||
|
# Fedora *
|
||||||
|
%global with_qt5 0%{?fedora}
|
||||||
|
|
||||||
|
|
||||||
Name: qpdfview
|
Name: qpdfview
|
||||||
Version: 0.4.18
|
Version: 0.4.18
|
||||||
Release: 4%{?dist}
|
Release: 5%{?dist}
|
||||||
# Use the following format for beta
|
# Use the following format for beta
|
||||||
#Release: 0.1.%%{?prerelease}%%{?dist}
|
#Release: 0.1.%%{?prerelease}%%{?dist}
|
||||||
License: GPLv2+
|
License: GPLv2+
|
||||||
Summary: Tabbed PDF Viewer
|
Summary: Tabbed PDF Viewer
|
||||||
Url: https://launchpad.net/qpdfview
|
Url: https://launchpad.net/qpdfview
|
||||||
Source0: https://launchpad.net/qpdfview/trunk/%{version}%{?prerelease}/+download/%{name}-%{version}%{?prerelease}.tar.gz
|
Source0: https://launchpad.net/qpdfview/trunk/%{version}%{?prerelease}/+download/%{name}-%{version}%{?prerelease}.tar.gz
|
||||||
|
Patch0: %{name}_model.patch
|
||||||
BuildRequires: desktop-file-utils
|
BuildRequires: desktop-file-utils
|
||||||
BuildRequires: file-devel
|
BuildRequires: file-devel
|
||||||
BuildRequires: cups-devel
|
BuildRequires: cups-devel
|
||||||
BuildRequires: hicolor-icon-theme
|
BuildRequires: hicolor-icon-theme
|
||||||
BuildRequires: pkgconfig(libspectre)
|
BuildRequires: pkgconfig(libspectre)
|
||||||
BuildRequires: pkgconfig(zlib)
|
BuildRequires: pkgconfig(zlib)
|
||||||
%if 0%{?fedora}
|
%if 0%{?fedora}
|
||||||
BuildRequires: pkgconfig(ddjvuapi)
|
# check if required for qt4
|
||||||
|
BuildRequires: pkgconfig(ddjvuapi)
|
||||||
%endif
|
%endif
|
||||||
# Qt4
|
|
||||||
BuildRequires: pkgconfig(poppler-qt4)
|
|
||||||
BuildRequires: pkgconfig(QtGui)
|
|
||||||
BuildRequires: pkgconfig(QtDBus)
|
|
||||||
%if 0%{?rhel}
|
|
||||||
Requires: qt-sqlite
|
|
||||||
%endif
|
|
||||||
# Build Qt5 only for Fedora
|
|
||||||
%if 0%{?fedora}
|
|
||||||
BuildRequires: qt5-qttools-devel
|
|
||||||
BuildRequires: pkgconfig(poppler-qt5)
|
|
||||||
BuildRequires: pkgconfig(Qt5DBus)
|
|
||||||
BuildRequires: pkgconfig(Qt5Gui)
|
|
||||||
BuildRequires: pkgconfig(Qt5Svg)
|
|
||||||
BuildRequires: pkgconfig(Qt5Widgets)
|
|
||||||
%endif # build with Qt5 for Fedora
|
|
||||||
|
|
||||||
Requires: %{name}-common = %{version}-%{release}
|
|
||||||
|
|
||||||
%description
|
%description
|
||||||
qpdfview is a tabbed PDF viewer.
|
qpdfview is a tabbed PDF viewer.
|
||||||
It uses the Poppler library for rendering and CUPS for printing.
|
It uses the Poppler library for rendering and CUPS for printing.
|
||||||
It provides a clear and simple graphical user interface using the Qt framework.
|
It provides a clear and simple graphical user interface using the Qt framework.
|
||||||
|
|
||||||
|
|
||||||
%package common
|
%package common
|
||||||
Summary: Common files for %{name}
|
Summary: Common files for %{name}
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
|
||||||
%description common
|
%description common
|
||||||
This package provides common files for %{name}.
|
This package provides common files for %{name}.
|
||||||
|
|
||||||
%if 0%{?fedora}
|
%if %{with_qt4}
|
||||||
|
%package qt4
|
||||||
|
Summary: Tabbed PDF Viewer
|
||||||
|
BuildRequires: pkgconfig(poppler-qt4)
|
||||||
|
BuildRequires: pkgconfig(QtGui)
|
||||||
|
BuildRequires: pkgconfig(QtDBus)
|
||||||
|
%if 0%{?rhel}
|
||||||
|
Requires: qt-sqlite
|
||||||
|
%endif
|
||||||
|
Requires: %{name}-common = %{version}-%{release}
|
||||||
|
Obsoletes: %{name} < %{version}-%{release}
|
||||||
|
|
||||||
|
%description qt4
|
||||||
|
qpdfview is a tabbed PDF viewer.
|
||||||
|
It uses the Poppler library for rendering and CUPS for printing.
|
||||||
|
It provides a clear and simple graphical user interface using the Qt framework.
|
||||||
|
%endif
|
||||||
|
|
||||||
|
|
||||||
|
%if %{with_qt5}
|
||||||
%package qt5
|
%package qt5
|
||||||
Summary: Tabbed PDF Viewer
|
Summary: Tabbed PDF Viewer
|
||||||
Requires: %{name}-common = %{version}-%{release}
|
BuildRequires: qt5-qttools-devel
|
||||||
|
BuildRequires: pkgconfig(poppler-qt5)
|
||||||
|
BuildRequires: pkgconfig(Qt5DBus)
|
||||||
|
BuildRequires: pkgconfig(Qt5Gui)
|
||||||
|
BuildRequires: pkgconfig(Qt5Svg)
|
||||||
|
BuildRequires: pkgconfig(Qt5Widgets)
|
||||||
|
Requires: %{name}-common = %{version}-%{release}
|
||||||
|
%if 0%{?fedora} > 33
|
||||||
|
Obsoletes: %{name} < %{version}-%{release}
|
||||||
|
%endif
|
||||||
|
|
||||||
%description qt5
|
%description qt5
|
||||||
qpdfview is a tabbed PDF viewer.
|
qpdfview is a tabbed PDF viewer.
|
||||||
It uses the Poppler library for rendering and CUPS for printing.
|
It uses the Poppler library for rendering and CUPS for printing.
|
||||||
It provides a clear and simple graphical user interface using the Qt framework.
|
It provides a clear and simple graphical user interface using the Qt framework.
|
||||||
%endif # with Qt5 for Fedora
|
%endif
|
||||||
|
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -qc
|
%setup -qc
|
||||||
|
%patch0 -p0
|
||||||
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
|
%if %{with_qt4}
|
||||||
cp -a %{name}-%{version}%{?prerelease} build-qt4
|
cp -a %{name}-%{version}%{?prerelease} build-qt4
|
||||||
cp -a %{name}-%{version}%{?prerelease} build-qt5
|
|
||||||
pushd build-qt4
|
pushd build-qt4
|
||||||
lrelease-qt4 qpdfview.pro
|
lrelease-qt4 qpdfview.pro
|
||||||
%{qmake_qt4} \
|
%{qmake_qt4} \
|
||||||
@ -78,8 +98,10 @@ lrelease-qt4 qpdfview.pro
|
|||||||
qpdfview.pro
|
qpdfview.pro
|
||||||
make %{?_smp_mflags}
|
make %{?_smp_mflags}
|
||||||
popd
|
popd
|
||||||
|
%endif
|
||||||
|
|
||||||
%if 0%{?fedora}
|
%if %{with_qt5}
|
||||||
|
cp -a %{name}-%{version}%{?prerelease} build-qt5
|
||||||
pushd build-qt5
|
pushd build-qt5
|
||||||
lrelease-qt5 qpdfview.pro
|
lrelease-qt5 qpdfview.pro
|
||||||
# Some adjustments to avoid conflict with Qt4 package
|
# Some adjustments to avoid conflict with Qt4 package
|
||||||
@ -96,48 +118,60 @@ sed -i "s/Name=qpdfview/Name=qpdfview (Qt5)/g" miscellaneous/qpdfview-qt5.deskto
|
|||||||
qpdfview.pro
|
qpdfview.pro
|
||||||
make %{?_smp_mflags}
|
make %{?_smp_mflags}
|
||||||
popd
|
popd
|
||||||
%endif # build with Qt5 for Fedora
|
%endif
|
||||||
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
|
%if %{with_qt4}
|
||||||
pushd build-qt4
|
pushd build-qt4
|
||||||
make INSTALL_ROOT=%{buildroot} install
|
make INSTALL_ROOT=%{buildroot} install
|
||||||
popd
|
popd
|
||||||
|
%endif
|
||||||
|
|
||||||
%if 0%{?fedora}
|
%if %{with_qt5}
|
||||||
pushd build-qt5
|
pushd build-qt5
|
||||||
make INSTALL_ROOT=%{buildroot} install
|
make INSTALL_ROOT=%{buildroot} install
|
||||||
popd
|
popd
|
||||||
%endif # build with Qt5 for Fedora
|
%endif
|
||||||
|
|
||||||
%find_lang %{name} --with-qt --without-mo
|
%find_lang %{name} --with-qt --without-mo
|
||||||
# Common files are equal for both Qt4 and Qt5
|
# Common files are equal for both Qt4 and Qt5
|
||||||
cd %{name}-%{version}%{?prerelease}
|
cd %{name}-%{version}%{?prerelease}
|
||||||
install -Dm 0644 icons/%{name}.svg %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/%{name}.svg
|
install -Dm 0644 icons/%{name}.svg %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/%{name}.svg
|
||||||
|
%if %{with_qt4}
|
||||||
desktop-file-validate %{buildroot}/%{_datadir}/applications/%{name}.desktop
|
desktop-file-validate %{buildroot}/%{_datadir}/applications/%{name}.desktop
|
||||||
%if 0%{?fedora}
|
%endif
|
||||||
|
%if %{with_qt5}
|
||||||
desktop-file-validate %{buildroot}/%{_datadir}/applications/%{name}-qt5.desktop
|
desktop-file-validate %{buildroot}/%{_datadir}/applications/%{name}-qt5.desktop
|
||||||
%endif # build with Qt5 for Fedora
|
%endif
|
||||||
# unknown language
|
# unknown language
|
||||||
rm -f %{buildroot}/%{_datadir}/%{name}/%{name}_ast.qm
|
rm -f %{buildroot}/%{_datadir}/%{name}/%{name}_ast.qm
|
||||||
|
|
||||||
%ldconfig_scriptlets
|
|
||||||
|
|
||||||
%if 0%{?fedora}
|
%if %{with_qt4}
|
||||||
|
%ldconfig_scriptlets
|
||||||
|
%endif
|
||||||
|
|
||||||
|
|
||||||
|
%if %{with_qt5}
|
||||||
# Scriptlets qt5 subpackage
|
# Scriptlets qt5 subpackage
|
||||||
%ldconfig_scriptlets qt5
|
%ldconfig_scriptlets qt5
|
||||||
%endif # build with Qt5 for Fedora
|
%endif
|
||||||
|
|
||||||
%files
|
|
||||||
|
%if %{with_qt4}
|
||||||
|
%files qt4
|
||||||
%{_bindir}/%{name}
|
%{_bindir}/%{name}
|
||||||
%{_libdir}/%{name}
|
%{_libdir}/%{name}
|
||||||
%{_datadir}/applications/%{name}.desktop
|
%{_datadir}/applications/%{name}.desktop
|
||||||
|
%endif
|
||||||
|
|
||||||
%if 0%{?fedora}
|
%if %{with_qt5}
|
||||||
%files qt5
|
%files qt5
|
||||||
%{_bindir}/%{name}-qt5
|
%{_bindir}/%{name}-qt5
|
||||||
%{_libdir}/%{name}-qt5
|
%{_libdir}/%{name}-qt5
|
||||||
%{_datadir}/applications/%{name}-qt5.desktop
|
%{_datadir}/applications/%{name}-qt5.desktop
|
||||||
%endif # build with Qt5 for Fedora
|
%endif
|
||||||
|
|
||||||
%files common -f %{name}.lang
|
%files common -f %{name}.lang
|
||||||
%license %{name}-%{version}%{?prerelease}/COPYING
|
%license %{name}-%{version}%{?prerelease}/COPYING
|
||||||
@ -149,6 +183,10 @@ rm -f %{buildroot}/%{_datadir}/%{name}/%{name}_ast.qm
|
|||||||
%{_mandir}/man?/*
|
%{_mandir}/man?/*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Jan 06 2021 TI_Eugene <ti.eugene@gmail.com> - 0.4.18-5
|
||||||
|
- Move Qt4 things into qpdfview-qt4 subpackage
|
||||||
|
- Disable Qt4 version for F34
|
||||||
|
|
||||||
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.4.18-4
|
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.4.18-4
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user