summaryrefslogtreecommitdiffstats
path: root/nagios-server-addons.spec.in
diff options
context:
space:
mode:
authorBala.FA <barumuga@redhat.com>2014-03-07 18:28:09 +0530
committerBala.FA <barumuga@redhat.com>2014-04-29 10:21:36 +0530
commit981d905fd08d4565f306344c11c560a8479cbf75 (patch)
tree7f0d0006ab7d7fbeea1e3e9e9a549280bd68a0a3 /nagios-server-addons.spec.in
parentfe7479d1c78555ee5f0dd219c690232c43c4938c (diff)
Initial commit
Change-Id: Iae865d7dce78de83f0931d99b67455b9a0f12e1c Signed-off-by: Bala.FA <barumuga@redhat.com>
Diffstat (limited to 'nagios-server-addons.spec.in')
-rw-r--r--nagios-server-addons.spec.in79
1 files changed, 79 insertions, 0 deletions
diff --git a/nagios-server-addons.spec.in b/nagios-server-addons.spec.in
new file mode 100644
index 0000000..3450ba2
--- /dev/null
+++ b/nagios-server-addons.spec.in
@@ -0,0 +1,79 @@
+%global _hardened_build 1
+
+%global _for_fedora_koji_builds 0
+
+%if ( 0%{?fedora} && 0%{?fedora} > 16 ) || ( 0%{?rhel} && 0%{?rhel} > 6 )
+%global _with_systemd true
+%endif
+
+# From https://fedoraproject.org/wiki/Packaging:Python#Macros
+%if ( 0%{?rhel} && 0%{?rhel} <= 5 )
+%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
+%{!?python_sitearch: %global python_sitearch %(python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
+%endif
+
+Summary: Gluster node management add-ons for Nagios
+Name: @PACKAGE_NAME@
+Version: @PACKAGE_VERSION@
+Release: @PACKAGE_RELEASE@%{?dist}
+License: GPLv2+
+Group: Applications/System
+URL: http://www.redhat.com
+Vendor: Red Hat, Inc.
+Source0: %{name}-%{version}.tar.gz
+BuildRoot: %{_tmppath}/%{name}-%{version}-root
+BuildRequires: pyflakes
+BuildRequires: python-pep8
+BuildRequires: python-nose
+BuildRequires: python-devel
+Requires: gluster-nagios-common
+Requires: python-argparse
+Requires: python-ethtool
+Requires: python-netaddr
+Requires: python-pthreading
+Requires: python-pyinotify
+Requires: python-selinux
+
+%description
+Nagios plugin, scripts, configuration files etc for gluster nodes.
+
+%package tests
+Summary: Unit/functional tests of Gluster node management add-ons for Nagios
+Group: Development/Tools
+Requires: %{name} = %{version}-%{release}
+Requires: pyflakes
+Requires: python-pep8
+Requires: python-nose
+Requires: python-devel
+
+%description tests
+Unit/functional tests for Nagios plugin, scripts, configuration files etc for gluster nodes.
+
+%prep
+%setup -q
+
+%build
+%{configure}
+make
+
+%check
+make check
+
+%install
+rm -rf %{buildroot}
+make install DESTDIR=%{buildroot}
+
+%clean
+rm -rf %{buildroot}
+
+%files
+%defattr(-,root,root,-)
+%{_libdir}/nagios/*
+
+%files tests
+%defattr(-,root,root,-)
+%{_datadir}/%{name}/tests/*
+
+%changelog
+* Sat Mar 08 2014 Bala FA <barumuga@redhat.com>
+- Initial build.