new version (0.4.17beta1), added qt5 build
This commit is contained in:
parent
3bd66963cf
commit
a903fac902
|
@ -1,3 +1,4 @@
|
|||
/qpdfview-0.4.1.tar.gz
|
||||
/qpdfview-0.4.15.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
|
||||
Version: 0.4.16
|
||||
Release: 3%{?dist}
|
||||
Version: 0.4.17
|
||||
Release: 0.1.%{?prerelease}%{?dist}
|
||||
License: GPLv2+
|
||||
Summary: Tabbed PDF Viewer
|
||||
Url: https://launchpad.net/qpdfview
|
||||
Source0: https://launchpad.net/qpdfview/trunk/%{version}/+download/%{name}-%{version}.tar.gz
|
||||
BuildRequires: desktop-file-utils file-devel cups-devel hicolor-icon-theme pkgconfig(poppler-qt4) pkgconfig(libspectre) pkgconfig(QtGui) pkgconfig(QtDBus) pkgconfig(zlib)
|
||||
%if 0%{?centos_version}
|
||||
Requires: qt-sqlite
|
||||
%else
|
||||
BuildRequires: pkgconfig(ddjvuapi)
|
||||
Source0: https://launchpad.net/qpdfview/trunk/%{version}%{?prerelease}/+download/%{name}-%{version}%{?prerelease}.tar.gz
|
||||
BuildRequires: desktop-file-utils
|
||||
BuildRequires: file-devel
|
||||
BuildRequires: cups-devel
|
||||
BuildRequires: hicolor-icon-theme
|
||||
BuildRequires: pkgconfig(libspectre)
|
||||
BuildRequires: pkgconfig(zlib)
|
||||
%if 0%{?fedora}
|
||||
BuildRequires: pkgconfig(ddjvuapi)
|
||||
%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
|
||||
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.
|
||||
|
||||
%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
|
||||
%setup0 -q
|
||||
%setup -qc
|
||||
|
||||
|
||||
%build
|
||||
cp -a %{name}-%{version}%{?prerelease} build-qt4
|
||||
cp -a %{name}-%{version}%{?prerelease} build-qt5
|
||||
pushd build-qt4
|
||||
lrelease-qt4 qpdfview.pro
|
||||
%{qmake_qt4} \
|
||||
PLUGIN_INSTALL_PATH="%{_libdir}/%{name}" \
|
||||
DATA_INSTALLPATH="%{_datadir}/%{name}" \
|
||||
%if 0%{?centos_version}
|
||||
%if 0%{?rhel}
|
||||
CONFIG+=without_djvu \
|
||||
%endif
|
||||
qpdfview.pro
|
||||
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
|
||||
pushd build-qt4
|
||||
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
|
||||
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
|
||||
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
|
||||
%doc CHANGES CONTRIBUTORS COPYING README TODO
|
||||
%posttrans qt5
|
||||
/usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
|
||||
|
||||
%endif # build with Qt5 for Fedora
|
||||
|
||||
%files
|
||||
%{_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}
|
||||
%{_datadir}/%{name}/help*.html
|
||||
%{_datadir}/applications/%{name}.desktop
|
||||
%{_datadir}/appdata/%{name}.appdata.xml
|
||||
%{_datadir}/icons/hicolor/scalable/apps/%{name}.svg
|
||||
%{_mandir}/man?/*
|
||||
|
||||
%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
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
|
||||
|
||||
|
|
Loading…
Reference in New Issue