Package boomaga: Specfile

Name: boomaga
Version: 3.0.0
Release: alt1.2
Group: System/Configuration/Printing
License: GPLv2 and LGPLv2+

Summary: A virtual printer for viewing a document before printing
# Source:
Source: %name-%version.tar
Patch1: boomaga-alt-workaround-for-ALT_38564.patch
BuildRequires: cmake libcups-devel libpoppler-cpp-devel qt5-tools-devel zlib-devel

Requires(pre): ghostscript
Requires(pre): a2ps
Requires(pre): cups
Requires(pre): cups-filters
Requires(pre): foomatic-db
Requires: libsnappy
Requires(preun): cups-common
Requires(post): /usr/bin/paperconf

Boomaga (BOOklet MAnager) is a virtual printer for viewing a document
before printing it out using the physical printer. The program is very
simple to work with. Running any program, click "print" and select
"Boomaga" to see in several seconds (CUPS takes some time to respond)
the Boomaga window open. 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. If your printer does not support duplex printing,
point this out in the settings, and Booklet would ask you to turn
over the pages half way through printing your document.

The program can also help you get your documents prepared a bit
before printing. At this stage Boomaga makes it possible to:

 * Paste several documents together.
 * Print several pages on one sheet.
 * 1, 2, 4, 8 pages per sheet
 * Booklet. Folding the sheets in two, you'll get a book.

%patch1 -p2



mkdir -p %buildroot%_datadir/%name/scripts
install -m 755 scripts/ %buildroot%_datadir/%name/scripts/
chmod +x %buildroot%_datadir/%name/scripts/
mkdir -p %buildroot%_cachedir/%name

%find_lang %name

/sbin/service cups condrestart ||:

# Install the printer to cups backends
if [ $1 = 1 ]; then
    sh %_datadir/%name/scripts/

# Uninstall the printer
lpadmin -x "Boomaga" || :

%files -f %name.lang
%dir %_datadir/%name
%dir %_datadir/%name/scripts
%dir %_datadir/%name/translations
%attr(700,root,root) %_prefix/lib/cups/backend/%name
%dir %_cachedir/%name

* Wed Jul 19 2023 Mikhail Tergoev <> 3.0.0-alt1.2
- NMU: replacement BR libpaper to /usr/bin/paperconf

* Sun May 31 2020 Andrey Cherepanov <> 3.0.0-alt1.1
- FTBFS: fix build by strictly set DEF_CUPS_BACKEND_DIR (see ALT bug 38564)

* Mon May 20 2019 Oleg Solovyov <> 3.0.0-alt1
- version 3.0.0 (Closes ALT#36748)

* Tue May 29 2018 Oleg Solovyov <> 1.3.0-alt1
- Initial build for ALT