]> git.pld-linux.org Git - packages/naemon-core.git/blob - naemon-core.spec
b2fd106936bc145c0e8e86d42a128ed443316ea1
[packages/naemon-core.git] / naemon-core.spec
1 #
2 # Conditional build:
3 %bcond_with     tests           # build with tests
4 %bcond_with     doc             # build doc
5
6 Summary:        Open Source Host, Service And Network Monitoring Program
7 Name:           naemon-core
8 Version:        1.0.3
9 Release:        0.1
10 License:        GPL v2
11 Group:          Applications/System
12 Source0:        http://labs.consol.de/naemon/release/v%{version}/src/%{name}-%{version}.tar.gz
13 # Source0-md5:  5eb9c6e9be29b993e8488d58f8b3de23
14 URL:            http://www.naemon.org/
15 BuildRequires:  chrpath
16 BuildRequires:  gperf
17 BuildRequires:  help2man
18 BuildRequires:  perl-ExtUtils-MakeMaker
19 BuildRequires:  pkgconfig
20 BuildRequires:  zlib-devel
21 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
22
23 %define         plugindir               %{_prefix}/lib/nagios/plugins
24
25 %description
26 Naemon is an application, system and network monitoring application.
27 It can escalate problems by email, pager or any other medium. It is
28 also useful for incident or SLA reporting. It is originally a fork of
29 Nagios, but with extended functionality, stability and performance.
30
31 %package devel
32 Summary:        Development Files For Naemon
33 Group:          Development/Libraries
34
35 %description devel
36 This package contains the header files, static libraries and
37 development documentation for naemon-core.
38
39 If you are a NEB-module author or wish to write addons for Naemon
40 using Naemons own APIs, you should install this package.
41
42 %prep
43 %setup -q
44
45 %build
46 %configure \
47         --with-logrotatedir=%{_sysconfdir}/logrotate.d \
48         --with-initdir=%{_initrddir} \
49         --with-pluginsdir=%{plugindir} \
50         --localstatedir=%{_localstatedir}/lib/naemon \
51         --with-checkresultdir=%{_localstatedir}/spool/naemon/checkresults \
52         %{__with_without tests} \
53         --enable-event-broker \
54         --with-naemon-user=naemon \
55         --with-naemon-group=naemon \
56         --with-mail=/bin/mail
57
58 %{__make}
59
60 %install
61 rm -rf $RPM_BUILD_ROOT
62 %{__make} install \
63     INSTALL_OPTS="" \
64     COMMAND_OPTS="" \
65     INIT_OPTS="" \
66     DESTDIR=$RPM_BUILD_ROOT
67
68 install -d $RPM_BUILD_ROOT%{_localstatedir}/{lib/naemon,log/naemon/archives}
69
70 %if %{with doc}
71 ### Install documentation
72 install -d $RPM_BUILD_ROOT%{_datadir}/%{name}/documentation/search
73 cp -a Documentation/html/* $RPM_BUILD_ROOT%{_datadir}/%{name}/documentation
74 chmod 0755 $RPM_BUILD_ROOT%{_datadir}/%{name}/documentation/search
75 rm $RPM_BUILD_ROOT%{_datadir}/%{name}/documentation/installdox
76 %endif
77
78 # Put the new RC sysconfig in place
79 install -d $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig
80 install -p sample-config/naemon.sysconfig $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/naemon
81
82 # Install systemd entry
83 install -D -p daemon-systemd $RPM_BUILD_ROOT%{systemdunitdir}/%{name}.service
84 install -D -p naemon.tmpfiles.conf $RPM_BUILD_ROOT%{systemdtmpfilesdir}/%{name}.conf
85 # Move SystemV init-script
86 #mv -f $RPM_BUILD_ROOT%{_initrddir}/%{name} $RPM_BUILD_ROOT%{_bindir}/%{name}-ctl
87
88 %clean
89 rm -rf $RPM_BUILD_ROOT
90
91 %post   -p /sbin/ldconfig
92 %postun -p /sbin/ldconfig
93
94 %files
95 %defattr(644,root,root,755)
96 %doc README.md
97 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/naemon
98 %attr(754,root,root) /etc/rc.d/init.d/naemon
99 %attr(755,root,root) %{_libdir}/libnaemon.so.*.*.*
100 %ghost %{_libdir}/libnaemon.so.0
101 %attr(755,root,root) %{_bindir}/naemon
102 %attr(755,root,root) %{_bindir}/naemonstats
103 %attr(755,root,root) %{_bindir}/oconfsplit
104 %attr(755,root,root) %{_bindir}/shadownaemon
105 %{_mandir}/man8/naemon.8*
106 %{_mandir}/man8/naemonstats.8*
107 %{_mandir}/man8/oconfsplit.8*
108 %{_mandir}/man8/shadownaemon.8*
109 %{systemdunitdir}/%{name}.service
110 %{systemdtmpfilesdir}/%{name}.conf
111 %config(noreplace) /etc/logrotate.d/naemon
112 %dir %{_sysconfdir}/naemon
113 %dir %{_sysconfdir}/naemon/conf.d
114 %dir %{_sysconfdir}/naemon/conf.d/templates
115 %config(noreplace) %{_sysconfdir}/naemon/naemon.cfg
116 %config(noreplace) %{_sysconfdir}/naemon/resource.cfg
117 %config(noreplace) %{_sysconfdir}/naemon/conf.d/*.cfg
118 %config(noreplace) %{_sysconfdir}/naemon/conf.d/templates/*.cfg
119 %attr(2775,naemon,http) %dir %{_localstatedir}/spool/naemon/checkresults
120 %attr(775,root,naemon) %dir %{_localstatedir}/lib/naemon
121 %attr(775,root,naemon) %dir %{_localstatedir}/log/naemon
122 %attr(775,root,naemon) %dir %{_localstatedir}/log/naemon/archives
123
124 %if %{with doc}
125 %attr(-,root,root) %{_datadir}/%{name}/documentation
126 %endif
127
128 %files devel
129 %defattr(644,root,root,755)
130 %{_includedir}/naemon
131 %{_libdir}/libnaemon.a
132 %{_libdir}/libnaemon.la
133 %{_libdir}/libnaemon.so
134 %{_pkgconfigdir}/naemon.pc
This page took 0.053531 seconds and 2 git commands to generate.