new version (0.4.17beta1), added qt5 build
This commit is contained in:
parent
3bd66963cf
commit
a903fac902
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,3 +1,4 @@
|
|||||||
/qpdfview-0.4.1.tar.gz
|
/qpdfview-0.4.1.tar.gz
|
||||||
/qpdfview-0.4.15.tar.gz
|
/qpdfview-0.4.15.tar.gz
|
||||||
/qpdfview-0.4.16.tar.gz
|
/qpdfview-0.4.16.tar.gz
|
||||||
|
/qpdfview-0.4.17beta1.tar.gz
|
||||||
|
155
qpdfview.spec
155
qpdfview.spec
@ -1,66 +1,187 @@
|
|||||||
|
%global prerelease beta1
|
||||||
|
|
||||||
Name: qpdfview
|
Name: qpdfview
|
||||||
Version: 0.4.16
|
Version: 0.4.17
|
||||||
Release: 3%{?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}/+download/%{name}-%{version}.tar.gz
|
Source0: https://launchpad.net/qpdfview/trunk/%{version}%{?prerelease}/+download/%{name}-%{version}%{?prerelease}.tar.gz
|
||||||
BuildRequires: desktop-file-utils file-devel cups-devel hicolor-icon-theme pkgconfig(poppler-qt4) pkgconfig(libspectre) pkgconfig(QtGui) pkgconfig(QtDBus) pkgconfig(zlib)
|
BuildRequires: desktop-file-utils
|
||||||
%if 0%{?centos_version}
|
BuildRequires: file-devel
|
||||||
Requires: qt-sqlite
|
BuildRequires: cups-devel
|
||||||
%else
|
BuildRequires: hicolor-icon-theme
|
||||||
BuildRequires: pkgconfig(ddjvuapi)
|
BuildRequires: pkgconfig(libspectre)
|
||||||
|
BuildRequires: pkgconfig(zlib)
|
||||||
|
%if 0%{?fedora}
|
||||||
|
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
|
||||||
|
Summary: Common files for %{name}
|
||||||
|
BuildArch: noarch
|
||||||
|
|
||||||
|
%description common
|
||||||
|
This package provides common files for %{name}.
|
||||||
|
|
||||||
|
%if 0%{?fedora}
|
||||||
|
%package qt5
|
||||||
|
Summary: Tabbed PDF Viewer
|
||||||
|
Requires: %{name}-common = %{version}-%{release}
|
||||||
|
|
||||||
|
%description qt5
|
||||||
|
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 # with Qt5 for Fedora
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup0 -q
|
%setup -qc
|
||||||
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
|
cp -a %{name}-%{version}%{?prerelease} build-qt4
|
||||||
|
cp -a %{name}-%{version}%{?prerelease} build-qt5
|
||||||
|
pushd build-qt4
|
||||||
lrelease-qt4 qpdfview.pro
|
lrelease-qt4 qpdfview.pro
|
||||||
%{qmake_qt4} \
|
%{qmake_qt4} \
|
||||||
PLUGIN_INSTALL_PATH="%{_libdir}/%{name}" \
|
PLUGIN_INSTALL_PATH="%{_libdir}/%{name}" \
|
||||||
DATA_INSTALLPATH="%{_datadir}/%{name}" \
|
DATA_INSTALLPATH="%{_datadir}/%{name}" \
|
||||||
%if 0%{?centos_version}
|
%if 0%{?rhel}
|
||||||
CONFIG+=without_djvu \
|
CONFIG+=without_djvu \
|
||||||
%endif
|
%endif
|
||||||
qpdfview.pro
|
qpdfview.pro
|
||||||
make %{?_smp_mflags}
|
make %{?_smp_mflags}
|
||||||
|
popd
|
||||||
|
|
||||||
|
%if 0%{?fedora}
|
||||||
|
pushd build-qt5
|
||||||
|
lrelease-qt5 qpdfview.pro
|
||||||
|
# Some adjustments to avoid conflict with Qt4 package
|
||||||
|
sed -i "s/TARGET = qpdfview/TARGET = qpdfview-qt5/g" application.pro
|
||||||
|
sed -i "s,DESKTOP_FILE = miscellaneous/qpdfview.desktop,DESKTOP_FILE = miscellaneous/qpdfview-qt5.desktop,g" application.pro
|
||||||
|
sed "s/Exec=qpdfview/Exec=qpdfview-qt5/g" miscellaneous/qpdfview.desktop.in > miscellaneous/qpdfview-qt5.desktop.in
|
||||||
|
sed -i "s/Name=qpdfview/Name=qpdfview (Qt5)/g" miscellaneous/qpdfview-qt5.desktop.in
|
||||||
|
%{qmake_qt5} \
|
||||||
|
PLUGIN_INSTALL_PATH="%{_libdir}/%{name}-qt5" \
|
||||||
|
DATA_INSTALLPATH="%{_datadir}/%{name}" \
|
||||||
|
%if 0%{?rhel}
|
||||||
|
CONFIG+=without_djvu \
|
||||||
|
%endif
|
||||||
|
qpdfview.pro
|
||||||
|
make %{?_smp_mflags}
|
||||||
|
popd
|
||||||
|
%endif # build with Qt5 for Fedora
|
||||||
|
|
||||||
%install
|
%install
|
||||||
|
pushd build-qt4
|
||||||
make INSTALL_ROOT=%{buildroot} install
|
make INSTALL_ROOT=%{buildroot} install
|
||||||
|
popd
|
||||||
|
|
||||||
|
%if 0%{?fedora}
|
||||||
|
pushd build-qt5
|
||||||
|
make INSTALL_ROOT=%{buildroot} install
|
||||||
|
popd
|
||||||
|
%endif # build with Qt5 for Fedora
|
||||||
|
|
||||||
|
%find_lang %{name} --with-qt --without-mo
|
||||||
|
# Common files are equal for both Qt4 and Qt5
|
||||||
|
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
|
||||||
desktop-file-validate %{buildroot}/%{_datadir}/applications/%{name}.desktop
|
desktop-file-validate %{buildroot}/%{_datadir}/applications/%{name}.desktop
|
||||||
%find_lang %{name} --with-qt --without-mo
|
%if 0%{?fedora}
|
||||||
|
desktop-file-validate %{buildroot}/%{_datadir}/applications/%{name}-qt5.desktop
|
||||||
|
%endif # build with Qt5 for Fedora
|
||||||
# unknown language
|
# unknown language
|
||||||
rm -f %{buildroot}/%{_datadir}/%{name}/%{name}_ast.qm
|
rm -f %{buildroot}/%{_datadir}/%{name}/%{name}_ast.qm
|
||||||
|
|
||||||
|
# Scriptlets main package
|
||||||
|
%post
|
||||||
|
/sbin/ldconfig
|
||||||
|
/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
|
||||||
|
/usr/bin/update-desktop-database &> /dev/null || :
|
||||||
|
|
||||||
%post -p /sbin/ldconfig
|
%postun
|
||||||
|
/sbin/ldconfig
|
||||||
|
if [ $1 -eq 0 ] ; then
|
||||||
|
/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null
|
||||||
|
/usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
|
||||||
|
fi
|
||||||
|
/usr/bin/update-desktop-database &> /dev/null || :
|
||||||
|
|
||||||
|
%posttrans
|
||||||
|
/usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
|
||||||
|
|
||||||
%postun -p /sbin/ldconfig
|
%if 0%{?fedora}
|
||||||
|
# Scriptlets qt5 subpackage
|
||||||
|
%post qt5
|
||||||
|
/sbin/ldconfig
|
||||||
|
/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
|
||||||
|
/usr/bin/update-desktop-database &> /dev/null || :
|
||||||
|
|
||||||
|
%postun qt5
|
||||||
|
/sbin/ldconfig
|
||||||
|
if [ $1 -eq 0 ] ; then
|
||||||
|
/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null
|
||||||
|
/usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
|
||||||
|
fi
|
||||||
|
/usr/bin/update-desktop-database &> /dev/null || :
|
||||||
|
|
||||||
%files -f %{name}.lang
|
%posttrans qt5
|
||||||
%doc CHANGES CONTRIBUTORS COPYING README TODO
|
/usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
|
||||||
|
|
||||||
|
%endif # build with Qt5 for Fedora
|
||||||
|
|
||||||
|
%files
|
||||||
%{_bindir}/%{name}
|
%{_bindir}/%{name}
|
||||||
%{_libdir}/%{name}/
|
%{_libdir}/%{name}
|
||||||
|
%{_datadir}/applications/%{name}.desktop
|
||||||
|
|
||||||
|
%if 0%{?fedora}
|
||||||
|
%files qt5
|
||||||
|
%{_bindir}/%{name}-qt5
|
||||||
|
%{_libdir}/%{name}-qt5
|
||||||
|
%{_datadir}/applications/%{name}-qt5.desktop
|
||||||
|
%endif # build with Qt5 for Fedora
|
||||||
|
|
||||||
|
%files common -f %{name}.lang
|
||||||
|
%license %{name}-%{version}%{?prerelease}/COPYING
|
||||||
|
%doc %{name}-%{version}%{?prerelease}/CHANGES %{name}-%{version}%{?prerelease}/CONTRIBUTORS %{name}-%{version}%{?prerelease}/README %{name}-%{version}%{?prerelease}/TODO
|
||||||
%dir %{_datadir}/%{name}
|
%dir %{_datadir}/%{name}
|
||||||
%{_datadir}/%{name}/help*.html
|
%{_datadir}/%{name}/help*.html
|
||||||
%{_datadir}/applications/%{name}.desktop
|
|
||||||
%{_datadir}/appdata/%{name}.appdata.xml
|
%{_datadir}/appdata/%{name}.appdata.xml
|
||||||
%{_datadir}/icons/hicolor/scalable/apps/%{name}.svg
|
%{_datadir}/icons/hicolor/scalable/apps/%{name}.svg
|
||||||
%{_mandir}/man?/*
|
%{_mandir}/man?/*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Jan 12 2017 Christian Dersch <lupinix@mailbox.org> - 0.4.17-0.1.beta1
|
||||||
|
- new version
|
||||||
|
- added Qt5 build
|
||||||
|
- added missing scriptlets for icon cache and desktop-database
|
||||||
|
|
||||||
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.4.16-3
|
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.4.16-3
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user