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