File boomaga.spec of Package boomaga

# spec file for package boomaga
# Copyright (c) 2021 SUSE LLC
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via

Name:           boomaga
Version:        3.0.0
Release:        0
Summary:        Virtual Printer for Viewing a Document before Printing
License:        GPL-2.0-only AND LGPL-2.1-or-later
Group:          Productivity/Publishing/Other
BuildRequires:  cmake
# SLE12 needs special BuildRequires.
# For suse_version values see
%if 0%{?suse_version} == 1315 && 0%{?is_opensuse} != 1
# For SLE12 by default CUPS 1.7.5 is provided and alternatively CUPS 1.5.4 is provided in the "legacy" module.
# For SLE12 build it with traditional CUPS 1.5.4 to ensure it works on SLE12 both with CUPS 1.7.5 and CUPS 1.5.4
# because libcups and libcupsimage in CUPS 1.7.5 are backward compatible with CUPS 1.5.4 so that applications
# that have been built with CUPS 1.5.4 also work under CUPS 1.7.5 but the libraries in CUPS 1.7.5 provide
# some additional functions so that applications that have been built with CUPS 1.7.5 and use those
# additional functions would not work under CUPS 1.7.5.
# Only in the Printing project for SLE12 use cups154-ddk (a sub package of the cups154-SLE12 source package):
BuildRequires:  cups154
BuildRequires:  cups154-devel
# Anything what is not SLE12 (i.e. SLE11 and all openSUSE versions) have "normal" BuildRequires:
BuildRequires:  cups
BuildRequires:  cups-devel
BuildRequires:  hicolor-icon-theme
BuildRequires:  snappy-devel
BuildRequires:  update-desktop-files
BuildRequires:  cmake(Qt5Core)
BuildRequires:  cmake(Qt5DBus)
BuildRequires:  cmake(Qt5Gui)
BuildRequires:  cmake(Qt5LinguistTools)
BuildRequires:  cmake(Qt5PrintSupport)
BuildRequires:  cmake(Qt5Widgets)
BuildRequires:  pkgconfig(poppler) >= 0.18
BuildRequires:  pkgconfig(poppler-cpp)
BuildRequires:  pkgconfig(zlib)
Requires:       ghostscript
Requires(post): %{_sbindir}/lpadmin
Requires(postun): %{_sbindir}/lpadmin
Recommends:     %{name}-lang

Boomaga (BOOklet MAnager) is a virtual printer for viewing a document
before printing it out using the physical printer.
Select the "Boomaga" printer in any program and the Boomaga window
opens in several seconds (CUPS takes some time to respond).
If you print out one more document, it gets added to the previous one,
and you can also print them out as one.
Regardless of whether your printer supports duplex printing or not, you
would be able to easily print on both sides of the sheet.


%setup -q

%cmake \
make %{?_smp_mflags} VERBOSE=1

%find_lang %{name} --with-qt
%suse_update_desktop_file -r %{name} Office Presentation

if [ "$1" -eq 1 ] ; then
    %{_sbindir}/lpadmin -h localhost -p "Boomaga" -v "boomaga:/" -E -m "boomaga.ppd" -o printer-is-shared=no -o PageSize=A4

if [ "$1" -eq 0 ] ; then
     %{_sbindir}/lpadmin -h localhost -x "Boomaga"


%files lang -f %{name}.lang
%dir %{_datadir}/%{name}/
%dir %{_datadir}/%{name}/translations/

openSUSE Build Service is sponsored by