File cacti-plugin-audit.spec of Package cacti-plugin-audit

#
# spec file for package cacti-plugin-audit
#
# Copyright (c) 2012 SUSE LINUX Products 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 realname   audit
Name:           cacti-plugin-audit
Version:        1.2+git38.gbbdd9ab
Release:        0
Summary:        Cacti audit plugin is used to track transactions in the Cacti database.
License:        LGPL-2.1
Group:          Development/Tools/Other
Url:            https://github.com/Cacti/plugin_audit
Source0:        %{realname}-v%{version}.zip
Requires:       cacti
BuildRequires:	unzip
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch
%if 0%{?suse_version} <= 1210
%define prefix %{_datadir}/cacti
%else
%define prefix /srv/www/cacti
%endif
Obsoletes:      cacti-PA-audit
Provides:       cacti-PA-audit

%description
The Cacti audit plugin is used to track transactions in the Cacti database, when they were made, by what IP address and by what login account. This can be used to determine the root cause of issues created by users of the Cacti system.

%prep
%setup -q  -n %{realname}
find . -type f -name "*.orig" -exec rm {} \;

%build

%install
mkdir -p %{buildroot}%{prefix}/plugins/%{realname}
cp -r * %{buildroot}%{prefix}/plugins/%{realname}/.
mkdir -p %{buildroot}%{_docdir}/cacti/plugins/%{realname}
mv %{buildroot}%{prefix}/plugins/%{realname}/LICENSE %{buildroot}%{_docdir}/cacti/plugins/%{realname}/.
mv %{buildroot}%{prefix}/plugins/%{realname}/README.md %{buildroot}%{_docdir}/cacti/plugins/%{realname}/.

%files
%defattr(-,root,root)
%{prefix}/
%dir %{_docdir}/cacti
%dir %{_docdir}/cacti/plugins
%{_docdir}/cacti/plugins/%{realname}/

%if 0%{?suse_version} >= 1210
%dir /srv/www/
%dir %{prefix}
%endif

%changelog
openSUSE Build Service is sponsored by