File monasca-grafana-datasource.spec of Package monasca-grafana-datasource
#
# spec file for package monasca-grafana-datasource
#
# Copyright (c) 2017 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 http://bugs.opensuse.org/
#
%define plugins_dir %{_localstatedir}/lib/grafana/plugins/
Name: monasca-grafana-datasource
Version: 1.2.0
Release: 0
Summary: Monasca data source plugin for Grafana
License: Apache-2.0
Group: Monitoring/Tools
Url: https://github.com/openstack/monasca-grafana-datasource
Source0: %{name}-%{version}.tar
BuildArch: noarch
BuildRequires: systemd-rpm-macros
%{?systemd_requires}
Requires: grafana
Requires(post): grafana
BuildRequires: grafana
%description
This package allows Grafana to use the Monasca metrics API as a data source.
%prep
%setup -n %{name}-%{version}
%build
%install
%{__install} -d -m 755 %{buildroot}/%{plugins_dir}%{name}-%{version}
cp -a * %{buildroot}%{plugins_dir}%{name}-%{version}
%post
%restart_on_update grafana-server
%postun
%restart_on_update grafana-server
%files
%defattr(-,root,root)
%doc LICENSE
%doc README.md
%{plugins_dir}/%{name}-%{version}
%changelog