Sophie

Sophie

distrib > Mageia > 8 > x86_64 > by-pkgid > 826e02b77065c63f12a8ac728166ff7f > files > 2

boomaga-3.0.0-3.2.mga8.src.rpm

Name:           boomaga
Version:        3.0.0
%define subrel  2
Release:        %mkrel 3
Summary:        A virtual printer for viewing a document before printing
Group:          System/Printing
License:        GPLv2 and LGPLv2+
Url:            http://boomaga.github.io/
Source0:        https://github.com/Boomaga/%{name}/archive/v%{version}/%{name}-%{version}.tar.gz

BuildRequires:  cmake
BuildRequires:  cups-devel
BuildRequires:  ghostscript-devel
BuildRequires:  pkgconfig(Qt5Core)
BuildRequires:  pkgconfig(Qt5Gui)
BuildRequires:  pkgconfig(Qt5PrintSupport)
BuildRequires:  pkgconfig(Qt5DBus)
BuildRequires:  pkgconfig(Qt5Help)
BuildRequires:  pkgconfig(poppler-cpp)
BuildRequires:  pkgconfig(poppler)
BuildRequires:  pkgconfig(snappy)

Requires(pre):  ghostscript
Requires:       snappy
Requires(preun):cups-common
Requires(post): paper-utils
Requires(pre):  task-printing-server


%description
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.

%prep
%setup -q
%autopatch -p1

%build
%cmake_qt5
%cmake_build

%install
%cmake_install

%__mkdir -p %{buildroot}%{_datadir}/%{name}/scripts
%__install -m 755 scripts/installPrinter.sh %{buildroot}%{_datadir}/%{name}/scripts/
chmod +x %{buildroot}%{_datadir}/%{name}/scripts/installPrinter.sh
mkdir -p %{buildroot}/%{_localstatedir}/cache/%{name}

# Add translation lang tags
(cd %{buildroot} && find . -name '*.qm') | sed -e 's|^.||' | sed -e \
    's:\(.*/translations/boomaga_\)\([a-z_A-Z]\+\)\(.*qm$\):%lang(\2) \1\2\3:'\
        >> %{name}.lang

%pre
if [ $1 = 1 ];then
# Start cups if is stopped
  if [ "$(systemctl is-active cups.service)" != "active" ]; then
    systemctl start cups
    sleep 2
  fi
fi

%post
# Install the printer to cups backends
if [ $1 = 1 ]; then
    sh %{_datadir}/%{name}/scripts/installPrinter.sh ||:
fi

%triggerun -- boomaga < 3.0.0-3.2
# Start cups if is stopped
if [ "$(systemctl is-active cups.service)" != "active" ]; then
    touch /run/cups.boomaga
    systemctl start cups
    sleep 2
fi

%triggerpostun -- boomaga < 3.0.0-3.2
if [ -f /run/cups.boomaga ]; then
    systemctl stop cups
    rm -rf /run/cups.boomaga
fi

%preun
# Uninstall the printer
if [ $1 = 0 ]; then
  if [ "$(systemctl is-active cups.service)" != "active" ]; then
    systemctl start cups
    sleep 2
    lpadmin -x "Boomaga" ||:
    systemctl stop cups
  else
    lpadmin -x "Boomaga" ||:
  fi
fi

%files -f %{name}.lang
%dir %{_datadir}/%{name}
%dir %{_datadir}/%{name}/scripts
%{_bindir}/%{name}
%attr(700,root,root) %{_prefix}/lib/cups/backend/%{name}
%dir %{_localstatedir}/cache/%{name}
%{_datadir}/dbus-1/services/org.%{name}.service
%{_mandir}/man1/%{name}.1*
%{_datadir}/ppd/%{name}/
%{_datadir}/%{name}/scripts/installPrinter.sh
%{_datadir}/applications/%{name}.desktop
%{_iconsdir}/hicolor/*/apps/%{name}.png
%{_datadir}/mime/packages/%{name}.xml


%changelog
* Sun Apr 04 2021 wally <wally> 3.0.0-3.2.mga8
+ Revision: 1713138
- handle install and uninstall better regardless of cups current status

* Sun Apr 04 2021 wally <wally> 3.0.0-3.1.mga8
+ Revision: 1713095
- fix upgrade from mga7 (mga#28430, mga#28419)
- make sure %%preun scriptlet doesn't fail

* Wed Dec 16 2020 umeabot <umeabot> 3.0.0-3.mga8
+ Revision: 1658156
- Rebuild for new Qt5
+ pterjan <pterjan>
- Remove usage of obsolete macros (https://github.com/rpm-software-management/rpm/issues/1211)

* Sat Feb 15 2020 umeabot <umeabot> 3.0.0-2.mga8
+ Revision: 1527998
- Mageia 8 Mass Rebuild
+ wally <wally>
- build with new cmake macros

* Sat Aug 03 2019 daviddavid <daviddavid> 3.0.0-1.mga8
+ Revision: 1427047
- new version: 3.0.0

* Sat Mar 30 2019 umeabot <umeabot> 1.3.0-3.mga7
+ Revision: 1381346
- Qt5 Rebuild

* Fri Sep 21 2018 umeabot <umeabot> 1.3.0-2.mga7
+ Revision: 1295593
- Mageia 7 Mass Rebuild

* Mon May 14 2018 daviddavid <daviddavid> 1.3.0-1.mga7
+ Revision: 1229638
- new version: 1.3.0

* Sat Feb 17 2018 daviddavid <daviddavid> 1.2.0-1.mga7
+ Revision: 1202021
- new version: 1.2.0
- remove upstreamed patch

* Wed Jan 10 2018 ns80 <ns80> 0.9.1-5.mga7
+ Revision: 1192049
- rebuild for new poppler

* Thu Oct 12 2017 tv <tv> 0.9.1-4.mga7
+ Revision: 1171324
- rebuild for new poppler

* Fri Sep 22 2017 daviddavid <daviddavid> 0.9.1-3.mga7
+ Revision: 1157469
- rebuild for new poppler 0.59.0
- add a patch to fix build with poppler 0.58 and higher
+ tv <tv>
- rebuild for new poppler

* Sun Aug 06 2017 daviddavid <daviddavid> 0.9.1-1.mga7
+ Revision: 1137687
- rebuild for new libpoppler 0.56
+ tv <tv>
- new release

* Thu Jan 26 2017 luigiwalser <luigiwalser> 0.7.1-11.mga6
+ Revision: 1083458
- use 700 perms for cups backend so it will execute as root (from fedora)
- also package /var/cache/boomaga directory (from fedora)

* Mon Jan 02 2017 luigiwalser <luigiwalser> 0.7.1-10.mga6
+ Revision: 1079504
- rebuild for poppler

* Mon Nov 28 2016 luigiwalser <luigiwalser> 0.7.1-9.mga6
+ Revision: 1070608
- rebuild for poppler

* Sat Aug 13 2016 luigiwalser <luigiwalser> 0.7.1-8.mga6
+ Revision: 1046168
- test rebuild for poppler

* Wed May 25 2016 luigiwalser <luigiwalser> 0.7.1-7.mga6
+ Revision: 1018534
- rebuild for poppler

* Mon May 09 2016 luigiwalser <luigiwalser> 0.7.1-6.mga6
+ Revision: 1011745
- rebuild for poppler

* Fri Jan 01 2016 luigiwalser <luigiwalser> 0.7.1-5.mga6
+ Revision: 917799
- rebuild for poppler

* Tue Sep 01 2015 cjw <cjw> 0.7.1-4.mga6
+ Revision: 871951
- rebuild with gcc 5

* Sat Jul 25 2015 tv <tv> 0.7.1-3.mga6
+ Revision: 857589
- rebuild for new poppler

* Sat Jul 25 2015 tv <tv> 0.7.1-2.mga6
+ Revision: 857574
- rebuild for new poppler

* Fri Jun 26 2015 dglent <dglent> 0.7.1-1.mga6
+ Revision: 844279
- Version 0.7.1

* Fri Jun 26 2015 sander85 <sander85> 0.7.0-2.mga6
+ Revision: 844235
- Rebuild for new poppler

* Sun Jun 21 2015 dglent <dglent> 0.7.0-1.mga6
+ Revision: 837625
- New version 0.7.0
  Qt5 build

* Wed Oct 15 2014 umeabot <umeabot> 0.6.0-3.mga5
+ Revision: 739733
- Second Mageia 5 Mass Rebuild

* Tue Sep 16 2014 umeabot <umeabot> 0.6.0-2.mga5
+ Revision: 678200
- Mageia 5 Mass Rebuild

* Mon Sep 01 2014 dglent <dglent> 0.6.0-1.mga5
+ Revision: 670402
- New version 0.6.0

* Thu May 01 2014 luigiwalser <luigiwalser> 0.5.0-2.mga5
+ Revision: 619132
- rebuild for poppler

* Mon Mar 31 2014 dglent <dglent> 0.5.0-1.mga5
+ Revision: 610985
- New version 0.5.0

* Sun Feb 23 2014 dglent <dglent> 0.4.0-1.mga5
+ Revision: 595863
- New version 0.4.0

* Sun Jan 05 2014 dglent <dglent> 0.3.0-2.mga5
+ Revision: 564711
- Search for translations and add them tags

* Sun Dec 15 2013 dglent <dglent> 0.3.0-1.mga4
+ Revision: 556923
- Change the URL ans Source to the project's site
- Add tags for the double licensing
- Remove br cups-filters (integrated in package)
- New version 0.3.0
- Add poppler and poppler-qt4 in br
- Install with exec permissions the script in %%post
- Add lang pl_PL
- Run cups service before installation
- Add %%dir in %%files
- Add Requires(pre) for ghostscript and task-printing-server (for cups service)
- Add Requires cups-filters for pstopdf
- Add %%mandir tag
- Add 2 more translations with tag
- Remove arch from br
- Add cups-common in Requires(preun): %%preun before uninstall
- Add Requires(post): paper-utils (part of the install script)
- Add lang tags
- Update spec file
- imported package boomaga