]> git.pld-linux.org Git - packages/nagios-ncpa.git/blame - nagios-ncpa.spec
new, version 1.8.1
[packages/nagios-ncpa.git] / nagios-ncpa.spec
CommitLineData
4a6112a9
ER
1# TODO
2# - pldize initscript
3# - install only needed stuff
4# - fix paths
5Summary: A Cross Platform Monitoring Agent
6Name: nagios-ncpa
7Version: 1.8.1
8Release: 0.1
9# License states that NCPA can be used only with Nagios LLC products (#6 in LICENSE.md)
10License: NOSL v1.3
11Group: Networking
12URL: https://assets.nagios.com/downloads/ncpa/docs/html/index.html
13Source0: https://github.com/NagiosEnterprises/ncpa/archive/v%{version}/%{name}-%{version}.tar.gz
14# Source0-md5: ee7e11c7ecc12ddd7bc4bc63a4308980
15BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
16
17%define _appdir %{_prefix}/lib/ncpa
18%define _sysconfdir /etc/nagios
19
20%description
21Installs on your system with zero requirements and allows for
22monitoring via Nagios.
23
24%prep
25%setup -q -n ncpa-%{version}
26
27%install
28rm -rf $RPM_BUILD_ROOT
29install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,%{_sysconfdir},%{_appdir}}
30
31cp -a agent/* $RPM_BUILD_ROOT%{_appdir}
32mv $RPM_BUILD_ROOT{%{_appdir}/etc/*,%{_sysconfdir}}
33
34mv $RPM_BUILD_ROOT{%{_appdir}/build_resources/listener_init,/etc/rc.d/init.d/ncpa_listener}
35mv $RPM_BUILD_ROOT{%{_appdir}/build_resources/passive_init,/etc/rc.d/init.d/ncpa_passive}
36
37%clean
38rm -rf $RPM_BUILD_ROOT
39
40%post
41/sbin/chkconfig --add ncpa_listener
42/sbin/chkconfig --add ncpa_passive
43%service ncpa_listener restart
44%service ncpa_passive restart
45
46%preun
47if [ "$1" = "0" ]; then
48 /sbin/chkconfig --del ncpa_listener
49 /sbin/chkconfig --del ncpa_passive
50 %service ncpa_listener stop
51 %service ncpa_passive stop
52fi
53
54%files
55%defattr(644,root,root,755)
56%doc CHANGES.rst CONTRIBUTING.rst README.rst VERSION.md LICENSE.md
57%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ncpa.cfg
58%dir %{_sysconfdir}/ncpa.cfg.d
59%{_sysconfdir}/ncpa.cfg.d/README
60%attr(754,root,root) /etc/rc.d/init.d/ncpa_listener
61%attr(754,root,root) /etc/rc.d/init.d/ncpa_passive
62%{_appdir}
This page took 0.231945 seconds and 4 git commands to generate.