File icingaweb2-module-pdfexport.spec of Package icingaweb2-module-pdfexport
#
# spec file for package icingaweb2-module-pdfexport
#
# Copyright (c) 2020 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 https://bugs.opensuse.org/
#
# See also http://en.opensuse.org/openSUSE:Specfile_guidelines
%define basedir %{_datadir}/icingaweb2
%define module_name pdfexport
Name: icingaweb2-module-%{module_name}
Version: 0.11.0
Release: 0
Summary: PDF export functionality for Icinga Web 2
License: GPL-2.0-or-later
Group: System/Monitoring
URL: https://www.icinga.org
Source0: https://github.com/Icinga/icingaweb2-module-%{module_name}/archive/v%{version}/%{name}-%{version}.tar.gz
Patch1: %{name}-chromium.patch
BuildRequires: libOSMesa-devel
BuildRequires: fdupes
Requires: icinga-php-library >= 0.8.0
Requires: icinga-php-thirdparty >= 0.10.0
Requires: chromium
Requires: gnu-free-fonts
Requires: icingaweb2 >= 2.9
Requires: icingaweb2-module-director
Requires: ipa-gothic-fonts
Requires: ipa-pgothic-fonts
Requires: libOSMesa8
BuildArch: noarch
%description
PDF export functionality for Icinga Web 2 using Google Chrome/Chromium for rendering.
%prep
%setup -q
%patch -P 1 -p1
# rpmlint
sed -i 's|\/usr\/bin\/env php|\/usr\/bin\/php|g' vendor/tecnickcom/tcpdf/tools/tcpdf_addfont.php
find . -type f -name ".github" -delete
find . -type f -name ".gitignore" -delete
%build
%install
mkdir -p %{buildroot}%{basedir}/modules/%{module_name}
mkdir -p %{buildroot}%{basedir}/modules/%{module_name}/{application,doc,library}
cp -prv application doc library public vendor %{buildroot}%{basedir}/modules/%{module_name}
cp -pv *.md *.php *.info %{buildroot}%{basedir}/modules/%{module_name}
%fdupes %{buildroot}/%{basedir}/modules/%{module_name}/vendor
%files
%license LICENSE
%doc
%dir %{basedir}
%dir %{basedir}/modules
%dir %{basedir}/modules/%{module_name}
%{basedir}/modules/%{module_name}/*
%changelog