| 1 | %global prerelease beta1 | 
|---|
| 2 |  | 
|---|
| 3 | Name:           qpdfview | 
|---|
| 4 | Version:        0.4.17 | 
|---|
| 5 | Release:        2%{?prerelease}%{?dist} | 
|---|
| 6 | License:        GPLv2+ | 
|---|
| 7 | Summary:        Tabbed PDF Viewer | 
|---|
| 8 | Url:            https://launchpad.net/qpdfview | 
|---|
| 9 |  | 
|---|
| 10 | Vendor:         bww bitwise works GmbH | 
|---|
| 11 | %scm_source github https://github.com/bitwiseworks/qpdfview %{version} | 
|---|
| 12 |  | 
|---|
| 13 | Requires:       bwwres | 
|---|
| 14 | Requires:       libqt4 | 
|---|
| 15 | Requires:       cups | 
|---|
| 16 | Requires:       poppler-qt4 | 
|---|
| 17 | Requires:       libspectre ghostscript | 
|---|
| 18 | Requires:       zlib | 
|---|
| 19 | Requires:       djvulibre | 
|---|
| 20 | Requires:       libjpeg libtiff libpng | 
|---|
| 21 | Requires:       %{name}-common = %{version}-%{release} | 
|---|
| 22 |  | 
|---|
| 23 | BuildRequires:  libqt4-devel | 
|---|
| 24 | BuildRequires:  cups-devel | 
|---|
| 25 | BuildRequires:  poppler-qt4-devel | 
|---|
| 26 | BuildRequires:  libspectre-devel ghostscript-devel | 
|---|
| 27 | BuildRequires:  zlib-devel | 
|---|
| 28 | BuildRequires:  djvulibre-devel | 
|---|
| 29 | BuildRequires:  libjpeg-devel libtiff-devel libpng-devel | 
|---|
| 30 |  | 
|---|
| 31 | %description | 
|---|
| 32 | qpdfview is a tabbed PDF viewer. | 
|---|
| 33 | It uses the Poppler library for rendering and CUPS for printing. | 
|---|
| 34 | It provides a clear and simple graphical user interface using the Qt framework. | 
|---|
| 35 |  | 
|---|
| 36 | %package common | 
|---|
| 37 | Summary:        Common files for %{name} | 
|---|
| 38 | BuildArch:      noarch | 
|---|
| 39 |  | 
|---|
| 40 | %description common | 
|---|
| 41 | This package provides common files for %{name}. | 
|---|
| 42 |  | 
|---|
| 43 | %prep | 
|---|
| 44 | %scm_setup | 
|---|
| 45 |  | 
|---|
| 46 |  | 
|---|
| 47 | %build | 
|---|
| 48 | export QMAKE_SH=$SHELL | 
|---|
| 49 | # do a fast qt build, as runmapsym and wmapsym is not needed here | 
|---|
| 50 | export FAST_BUILD=1 | 
|---|
| 51 | LDFLAGS="-Zhigh-mem -Zomf -Zargs-wild -Zargs-resp" | 
|---|
| 52 |  | 
|---|
| 53 | /@unixroot/usr/lib/qt4/bin/lrelease qpdfview.pro | 
|---|
| 54 | qmake \ | 
|---|
| 55 | TARGET_INSTALL_PATH="%{_bindir}" \ | 
|---|
| 56 | PLUGIN_INSTALL_PATH="%{_libdir}/%{name}" \ | 
|---|
| 57 | DATA_INSTALL_PATH="%{_datadir}/%{name}" \ | 
|---|
| 58 | MANUAL_INSTALL_PATH="%{_mandir}/man1" \ | 
|---|
| 59 | ICON_INSTALL_PATH="%{_datadir}/icons/hicolor/scalable/apps" \ | 
|---|
| 60 | LAUNCHER_INSTALL_PATH="%{_datadir}/applications" \ | 
|---|
| 61 | APPDATA_INSTALL_PATH="%{_datadir}/appdata" \ | 
|---|
| 62 | "CONFIG+=no_install_debuginfo" "CONFIG+=without_dbus" "CONFIG+=without_magic" \ | 
|---|
| 63 | qpdfview.pro | 
|---|
| 64 | make %{?_smp_mflags} | 
|---|
| 65 |  | 
|---|
| 66 |  | 
|---|
| 67 | %install | 
|---|
| 68 | make INSTALL_ROOT=%{buildroot} install | 
|---|
| 69 | %find_lang %{name} --with-qt --without-mo | 
|---|
| 70 | # unknown language | 
|---|
| 71 | rm -f %{buildroot}/%{_datadir}/%{name}/%{name}_ast.qm | 
|---|
| 72 |  | 
|---|
| 73 | # remove not needed desktop files | 
|---|
| 74 | rm -rf %{buildroot}/%{_datadir}/appdata | 
|---|
| 75 | rm -rf %{buildroot}/%{_datadir}/applications | 
|---|
| 76 | rm -rf %{buildroot}/%{_datadir}/icons | 
|---|
| 77 |  | 
|---|
| 78 | # adjust install.os2 with the right version and build | 
|---|
| 79 | sed -i -e "s|_VERSION_|%{version}|" -e "s|_BUILD_|%{release}|" %{_builddir}/%{buildsubdir}/install.os2 | 
|---|
| 80 |  | 
|---|
| 81 |  | 
|---|
| 82 | %post | 
|---|
| 83 | if [ "$1" -ge 1 ]; then # (upon update) | 
|---|
| 84 | %wps_object_delete_all | 
|---|
| 85 | fi | 
|---|
| 86 | # for the definition of the parameters see macros.bww | 
|---|
| 87 | %define title Tabbed PDF viewer | 
|---|
| 88 | %bww_folder -e %{name} -t %{title} -r README -s Y -a *.pdf,*.ps,*.eps,*.djvu,*.djv | 
|---|
| 89 |  | 
|---|
| 90 |  | 
|---|
| 91 | %postun | 
|---|
| 92 | if [ "$1" -eq 0 ]; then # (upon removal) | 
|---|
| 93 | %wps_object_delete_all | 
|---|
| 94 | fi | 
|---|
| 95 |  | 
|---|
| 96 |  | 
|---|
| 97 | %files | 
|---|
| 98 | %{_bindir}/%{name}.exe | 
|---|
| 99 | %{_libdir}/%{name}/ | 
|---|
| 100 |  | 
|---|
| 101 | %files common -f %{name}.lang | 
|---|
| 102 | %license COPYING | 
|---|
| 103 | %doc CHANGES CONTRIBUTORS README TODO | 
|---|
| 104 | %doc install.os2 | 
|---|
| 105 | %dir %{_datadir}/%{name} | 
|---|
| 106 | %{_datadir}/%{name}/help*.html | 
|---|
| 107 | %{_mandir}/man?/* | 
|---|
| 108 |  | 
|---|
| 109 | %changelog | 
|---|
| 110 | * Mon Mar 20 2017 Silvan Scherrer <silvan.scherrer@aroa.ch> - 0.4.17-2.beta1 | 
|---|
| 111 | - rebuild with latest bwwres | 
|---|
| 112 | - added noarch rpm for the really noarch files | 
|---|
| 113 |  | 
|---|
| 114 | * Fri Mar 17 2017 Silvan Scherrer <silvan.scherrer@aroa.ch> - 0.4.17-1 | 
|---|
| 115 | - initial version | 
|---|