File grafana-natel-discrete-panel.spec of Package grafana-natel-discrete-panel

#
# spec file for package grafana-natel-discrete-panel
#
# 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/
#


%define plugins_dir %{_localstatedir}/lib/grafana/plugins/

Name:           grafana-natel-discrete-panel
Version:        0.0.9
Release:        0
Summary:        Discrete panel plugin for Grafana
License:        MIT
Group:          Monitoring/Tools
URL:            https://github.com/NatelEnergy/grafana-discrete-panel
Source0:        grafana-natel-discrete-panel-0.0.9.tar.gz 

BuildArch:      noarch
BuildRequires:  systemd-rpm-macros
%{?systemd_requires}
Requires:       grafana
BuildRequires:  fdupes
BuildRequires:  grafana

%description
This package adds a graphing panel for displaying discrete status information
such as service reachability to Grafana.

%prep
%setup -n %{name}-%{version}

%build

%install
%{__install} -d -m 755 %{buildroot}/%{plugins_dir}%{name}-%{version}
cp -a * %{buildroot}%{plugins_dir}%{name}-%{version}
%fdupes %{buildroot}%{plugins_dir}%{name}-%{version}

%post
%restart_on_update grafana-server

%postun
%restart_on_update grafana-server

%files
%defattr(-,root,root)
%{plugins_dir}/%{name}-%{version}

%changelog
openSUSE Build Service is sponsored by