File phpPrintAnalyzer.spec of Package phpPrintAnalyzer

# spec file for package phpPrintAnalyzer
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
# 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

%define         installdir /srv/www/%{name}
Name:           phpPrintAnalyzer
Version:        1.2
Release:        0
Summary:        Graphics statistics from CUPS page_log
License:        GPL-2.0-only
Group:          Productivity/Networking/Web/Utilities
Source:         %{name}-%{version}.tar.gz
Requires:       config(apache2-mod_php7)
Recommends:     cups
Requires:       jpgraph
BuildArch:      noarch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

phpPrintAnalyzer is a Web Application for CUPS system to analyze the "page_log"
files and get HTML graphics (with JpGraph).

%setup -q -n %{name}


mkdir -p %{buildroot}/%{installdir}
cp -r * %{buildroot}/%{installdir}/
rm -rf  %{buildroot}/%{installdir}/docs
sed -i "s|%{_localstatedir}/www/jpgraph/src|%{_datadir}/jpgraph/src|g" %{buildroot}/%{installdir}/inc/

%doc docs/*
%dir %{installdir}