]> granicus.if.org Git - icinga2/blob - icinga2.spec
Update graphing section in the docs
[icinga2] / icinga2.spec
1 #/******************************************************************************
2 # * Icinga 2                                                                   *
3 # * Copyright (C) 2012-2015 Icinga Development Team (http://www.icinga.org)    *
4 # *                                                                            *
5 # * This program is free software; you can redistribute it and/or              *
6 # * modify it under the terms of the GNU General Public License                *
7 # * as published by the Free Software Foundation; either version 2             *
8 # * of the License, or (at your option) any later version.                     *
9 # *                                                                            *
10 # * This program is distributed in the hope that it will be useful,            *
11 # * but WITHOUT ANY WARRANTY; without even the implied warranty of             *
12 # * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the              *
13 # * GNU General Public License for more details.                               *
14 # *                                                                            *
15 # * You should have received a copy of the GNU General Public License          *
16 # * along with this program; if not, write to the Free Software Foundation     *
17 # * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.             *
18 # ******************************************************************************/
19
20 %define revision 1
21
22 # make sure that _rundir is working on older systems
23 %if ! %{defined _rundir}
24 %define _rundir %{_localstatedir}/run
25 %endif
26
27 %define _libexecdir %{_prefix}/lib/
28
29 %if "%{_vendor}" == "redhat"
30 %define apachename httpd
31 %define apacheconfdir %{_sysconfdir}/httpd/conf.d
32 %define apacheuser apache
33 %define apachegroup apache
34 %if 0%{?el5}%{?el6}
35 %define use_systemd 0
36 %if %(uname -m) != "x86_64"
37 %define march_flag -march=i686
38 %endif
39 %else
40 # fedora and el>=7
41 %define use_systemd 1
42 %endif
43 %endif
44
45 %if "%{_vendor}" == "suse"
46 %define apachename apache2
47 %define apacheconfdir  %{_sysconfdir}/apache2/conf.d
48 %define apacheuser wwwrun
49 %define apachegroup www
50 %if 0%{?suse_version} >= 1310
51 %define use_systemd 1
52 %else
53 %define use_systemd 0
54 %endif
55 %endif
56
57 %define icinga_user icinga
58 %define icinga_group icinga
59 %define icingacmd_group icingacmd
60 %define icingaweb2name icingaweb2
61 %define icingaweb2version 2.0.0
62
63 %define icingaclassicconfdir %{_sysconfdir}/icinga
64
65 %define logmsg logger -t %{name}/rpm
66
67 Summary: Network monitoring application
68 Name: icinga2
69 Version: 2.3.10
70 Release: %{revision}%{?dist}
71 License: GPL-2.0+
72 Group: Applications/System
73 Source: https://github.com/Icinga/%{name}/archive/v%{version}.tar.gz
74 URL: https://www.icinga.org/
75 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
76 Requires: %{name}-bin = %{version}-%{release}
77
78 %description
79 Meta package for Icinga 2 Core, DB IDO and Web.
80
81 %package bin
82 Summary:      Icinga 2 binaries and libraries
83 Group:        Applications/System
84
85 %if "%{_vendor}" == "suse"
86 PreReq:        permissions
87 Provides:      monitoring_daemon
88 Recommends:    monitoring-plugins
89 %if 0%{?suse_version} >= 1310
90 BuildRequires: libyajl-devel
91 %endif
92 %endif
93 BuildRequires: libedit-devel
94 BuildRequires: ncurses-devel
95 %if "%{_vendor}" == "suse" && 0%{?suse_version} < 1210
96 BuildRequires: gcc47-c++
97 BuildRequires: libstdc++47-devel
98 BuildRequires: libopenssl1-devel
99 %else
100 BuildRequires: gcc-c++
101 BuildRequires: libstdc++-devel
102 BuildRequires: openssl-devel
103 %endif
104 BuildRequires: cmake
105 BuildRequires: flex >= 2.5.35
106 BuildRequires: bison
107 BuildRequires: make
108
109 %if 0%{?build_icinga_org} && "%{_vendor}" == "redhat" && (0%{?el5} || 0%{?rhel} == 5 || "%{?dist}" == ".el5" || 0%{?el6} || 0%{?rhel} == 6 || "%{?dist}" == ".el6")
110 # el5 and el6 require packages.icinga.org
111 BuildRequires: boost153-devel
112 %else
113 %if 0%{?build_icinga_org} && "%{_vendor}" == "suse" && 0%{?suse_version} < 1310
114 # sles 11 sp3 requires packages.icinga.org
115 BuildRequires: boost153-devel
116 %else
117 BuildRequires: boost-devel >= 1.41
118 %endif
119 %endif
120
121 %if 0%{?use_systemd}
122 BuildRequires: systemd
123 Requires: systemd
124 %endif
125
126 Requires: %{name}-common = %{version}-%{release}
127
128 %description bin
129 Icinga 2 is a general-purpose network monitoring application.
130 Provides binaries and libraries for Icinga 2 Core.
131
132 %package common
133 Summary:      Common Icinga 2 configuration
134 Group:        Applications/System
135 %if "%{_vendor}" == "redhat"
136 Requires(pre): shadow-utils
137 Requires(post): shadow-utils
138 %endif
139 %if "%{_vendor}" == "suse"
140 Recommends:   logrotate
141 %endif
142
143 %description common
144 Provides common directories, uid and gid among Icinga 2 related
145 packages.
146
147
148 %package doc
149 Summary:      Documentation for Icinga 2
150 Group:        Applications/System
151 Requires:     %{name} = %{version}-%{release}
152
153 %description doc
154 Provides documentation for Icinga 2.
155
156
157 %package ido-mysql
158 Summary:      IDO MySQL database backend for Icinga 2
159 Group:        Applications/System
160 %if "%{_vendor}" == "suse"
161 BuildRequires: libmysqlclient-devel
162 %if 0%{?suse_version} >= 1310
163 BuildRequires: mysql-devel
164 %endif
165
166 %else
167 BuildRequires: mysql-devel
168 %endif #suse
169
170 Requires: %{name} = %{version}-%{release}
171
172 %description ido-mysql
173 Icinga 2 IDO mysql database backend. Compatible with Icinga 1.x
174 IDOUtils schema >= 1.12
175
176
177 %package ido-pgsql
178 Summary:      IDO PostgreSQL database backend for Icinga 2
179 Group:        Applications/System
180 BuildRequires: postgresql-devel
181 Requires: %{name} = %{version}-%{release}
182
183 %description ido-pgsql
184 Icinga 2 IDO PostgreSQL database backend. Compatible with Icinga 1.x
185 IDOUtils schema >= 1.12
186
187
188 %package classicui-config
189 Summary:      Icinga 2 Classic UI Standalone configuration
190 Group:        Applications/System
191 BuildRequires: %{apachename}
192 Requires:     %{apachename}
193 Requires:     %{name} = %{version}-%{release}
194 %if "%{_vendor}" == "suse"
195 Recommends:   icinga-www
196 %endif
197 Provides:     icinga-classicui-config
198 Conflicts:    icinga-gui-config
199
200 %description classicui-config
201 Icinga 1.x Classic UI Standalone configuration with locations
202 for Icinga 2.
203
204 %if "%{_vendor}" == "redhat" && !(0%{?el5} || 0%{?rhel} == 5 || "%{?dist}" == ".el5" || 0%{?el6} || 0%{?rhel} == 6 || "%{?dist}" == ".el6")
205 %global selinux_variants mls targeted
206 %{!?_selinux_policy_version: %global _selinux_policy_version %(sed -e 's,.*selinux-policy-\\([^/]*\\)/.*,\\1,' /usr/share/selinux/devel/policyhelp 2>/dev/null)}
207 %global modulename %{name}
208
209 %package selinux
210 Summary:        SELinux policy module supporting icinga2
211 Group:          System Environment/Base
212 BuildRequires:  checkpolicy, selinux-policy-devel, /usr/share/selinux/devel/policyhelp, hardlink
213 %if "%{_selinux_policy_version}" != ""
214 Requires:       selinux-policy >= %{_selinux_policy_version}
215 %endif
216 Requires:       %{name} = %{version}-%{release}
217 Requires(post):   /usr/sbin/semodule, /sbin/restorecon
218 Requires(postun): /usr/sbin/semodule, /sbin/restorecon
219
220 %description selinux
221 SELinux policy module supporting icinga2
222 %endif
223
224
225 %prep
226 %setup -q -n %{name}-%{version}
227
228 %build
229 CMAKE_OPTS="-DCMAKE_INSTALL_PREFIX=/usr \
230          -DCMAKE_INSTALL_SYSCONFDIR=/etc \
231          -DCMAKE_INSTALL_LOCALSTATEDIR=/var \
232          -DCMAKE_BUILD_TYPE=RelWithDebInfo \
233          -DCMAKE_VERBOSE_MAKEFILE=ON \
234          -DBoost_NO_BOOST_CMAKE=ON \
235          -DICINGA2_RUNDIR=%{_rundir} \
236          -DICINGA2_USER=%{icinga_user} \
237          -DICINGA2_GROUP=%{icinga_group} \
238          -DICINGA2_COMMAND_GROUP=%{icingacmd_group}"
239 %if "%{_vendor}" == "redhat"
240 %if 0%{?el5} || 0%{?rhel} == 5 || "%{?dist}" == ".el5" || 0%{?el6} || 0%{?rhel} == 6 || "%{?dist}" == ".el6"
241 # Boost_VERSION 1.41.0 vs 101400 - disable build tests
242 # details in https://dev.icinga.org/issues/5033
243 CMAKE_OPTS="$CMAKE_OPTS -DBOOST_LIBRARYDIR=/usr/lib/boost153 \
244  -DBOOST_INCLUDEDIR=/usr/include/boost153 \
245  -DBoost_ADDITIONAL_VERSIONS='1.53;1.53.0' \
246  -DBoost_NO_SYSTEM_PATHS=TRUE \
247  -DBUILD_TESTING=FALSE \
248  -DBoost_NO_BOOST_CMAKE=TRUE"
249 %endif
250 %if 0%{?el6} || 0%{?rhel} == 6 || "%{?dist}" == ".el6"
251 CMAKE_OPTS="$CMAKE_OPTS -DBUILD_TESTING=FALSE"
252 %endif
253 %endif
254
255 %if "%{_vendor}" != "suse"
256 CMAKE_OPTS="$CMAKE_OPTS -DICINGA2_PLUGINDIR=%{_libdir}/nagios/plugins"
257 %else
258 %if 0%{?suse_version} < 1310
259 CMAKE_OPTS="$CMAKE_OPTS -DBOOST_LIBRARYDIR=/usr/lib/boost153 \
260  -DBOOST_INCLUDEDIR=/usr/include/boost153 \
261  -DBoost_ADDITIONAL_VERSIONS='1.53;1.53.0' \
262  -DBoost_NO_SYSTEM_PATHS=TRUE \
263  -DBUILD_TESTING=FALSE \
264  -DBoost_NO_BOOST_CMAKE=TRUE"
265 %endif
266 CMAKE_OPTS="$CMAKE_OPTS -DICINGA2_PLUGINDIR=%{_prefix}/lib/nagios/plugins"
267 %endif
268
269 %if 0%{?use_systemd}
270 CMAKE_OPTS="$CMAKE_OPTS -DUSE_SYSTEMD=ON"
271 %endif
272
273 cmake $CMAKE_OPTS -DCMAKE_C_FLAGS:STRING="%{optflags} %{?march_flag}" -DCMAKE_CXX_FLAGS:STRING="%{optflags} %{?march_flag}" .
274
275 make %{?_smp_mflags}
276
277 %if "%{_vendor}" == "redhat" && !(0%{?el5} || 0%{?rhel} == 5 || "%{?dist}" == ".el5" || 0%{?el6} || 0%{?rhel} == 6 || "%{?dist}" == ".el6")
278 cd tools/selinux
279 for selinuxvariant in %{selinux_variants}
280 do
281   make NAME=${selinuxvariant} -f /usr/share/selinux/devel/Makefile
282   mv %{modulename}.pp %{modulename}.pp.${selinuxvariant}
283   make NAME=${selinuxvariant} -f /usr/share/selinux/devel/Makefile clean
284 done
285 cd -
286 %endif
287
288 %install
289 make install \
290         DESTDIR="%{buildroot}"
291
292 # install classicui config
293 install -D -m 0644 etc/icinga/icinga-classic.htpasswd %{buildroot}%{icingaclassicconfdir}/passwd
294 install -D -m 0644 etc/icinga/cgi.cfg %{buildroot}%{icingaclassicconfdir}/cgi.cfg
295 install -D -m 0644 etc/icinga/icinga-classic-apache.conf %{buildroot}%{apacheconfdir}/icinga.conf
296
297 # remove features-enabled symlinks
298 rm -f %{buildroot}/%{_sysconfdir}/%{name}/features-enabled/*.conf
299
300 # enable suse rc links
301 %if "%{_vendor}" == "suse"
302 %if 0%{?use_systemd}
303   ln -sf /usr/sbin/service %{buildroot}%{_sbindir}/rc%{name}
304 %else
305   ln -sf ../../%{_initrddir}/%{name} "%{buildroot}%{_sbindir}/rc%{name}"
306 %endif
307 mkdir -p "%{buildroot}%{_localstatedir}/adm/fillup-templates/"
308 mv "%{buildroot}%{_sysconfdir}/sysconfig/%{name}" "%{buildroot}%{_localstatedir}/adm/fillup-templates/sysconfig.%{name}"
309 %endif
310
311 %if "%{_vendor}" == "redhat" && !(0%{?el5} || 0%{?rhel} == 5 || "%{?dist}" == ".el5" || 0%{?el6} || 0%{?rhel} == 6 || "%{?dist}" == ".el6")
312 cd tools/selinux
313 for selinuxvariant in %{selinux_variants}
314 do
315   install -d %{buildroot}%{_datadir}/selinux/${selinuxvariant}
316   install -p -m 644 %{modulename}.pp.${selinuxvariant} \
317     %{buildroot}%{_datadir}/selinux/${selinuxvariant}/%{modulename}.pp
318 done
319 cd -
320
321 /usr/sbin/hardlink -cv %{buildroot}%{_datadir}/selinux
322 %endif
323
324 %clean
325 [ "%{buildroot}" != "/" ] && [ -d "%{buildroot}" ] && rm -rf %{buildroot}
326
327 %pre common
328 getent group %{icinga_group} >/dev/null || %{_sbindir}/groupadd -r %{icinga_group}
329 getent group %{icingacmd_group} >/dev/null || %{_sbindir}/groupadd -r %{icingacmd_group}
330 getent passwd %{icinga_user} >/dev/null || %{_sbindir}/useradd -c "icinga" -s /sbin/nologin -r -d %{_localstatedir}/spool/%{name} -G %{icingacmd_group} -g %{icinga_group} %{icinga_user}
331
332 %if "%{_vendor}" == "suse"
333 %if 0%{?use_systemd}
334   %service_add_pre %{name}.service
335 %endif
336 %endif
337
338 %if "%{_vendor}" == "suse"
339 %verifyscript bin
340 %verify_permissions -e %{_rundir}/%{name}/cmd
341 %endif
342
343 %post bin
344
345 # install the api setup
346 %{_sbindir}/%{name} api setup
347
348 # suse
349 %if "%{_vendor}" == "suse"
350
351 %if 0%{?suse_version} >= 1310
352 %set_permissions %{_rundir}/%{name}/cmd
353 %endif
354
355 %endif #suse/rhel
356
357 %post common
358 # suse
359 %if "%{_vendor}" == "suse"
360 %if 0%{?use_systemd}
361 %fillup_only  %{name}
362 %service_add_post %{name}.service
363 %else
364 %fillup_and_insserv %{name}
365 %endif
366
367 # initial installation, enable default features
368 for feature in checker notification mainlog; do
369         ln -sf ../features-available/${feature}.conf %{_sysconfdir}/%{name}/features-enabled/${feature}.conf
370 done
371
372 exit 0
373
374 %else
375 # rhel
376
377 %if 0%{?use_systemd}
378 %systemd_post %{name}.service
379 %else
380 /sbin/chkconfig --add %{name}
381 %endif
382
383 if [ ${1:-0} -eq 1 ]
384 then
385         # initial installation, enable default features
386         for feature in checker notification mainlog; do
387                 ln -sf ../features-available/${feature}.conf %{_sysconfdir}/%{name}/features-enabled/${feature}.conf
388         done
389 fi
390
391 exit 0
392
393 %endif
394 # suse/rhel
395
396 %postun common
397 # suse
398 %if "%{_vendor}" == "suse"
399 %if 0%{?using_systemd}
400   %service_del_postun %{name}.service
401 %else
402   %restart_on_update %{name}
403   %insserv_cleanup
404 %endif
405
406 %else
407 # rhel
408
409 %if 0%{?use_systemd}
410 %systemd_postun_with_restart %{name}.service
411 %else
412 if [ "$1" -ge  "1" ]; then
413         /sbin/service %{name} condrestart >/dev/null 2>&1 || :
414 fi
415 %endif
416
417 %endif
418 # suse / rhel
419
420 if [ "$1" = "0" ]; then
421         # deinstallation of the package - remove enabled features
422         rm -rf %{_sysconfdir}/%{name}/features-enabled
423 fi
424
425 exit 0
426
427 %preun common
428 # suse
429 %if "%{_vendor}" == "suse"
430
431 %if 0%{?use_systemd}
432   %service_del_preun %{name}.service
433 %else
434   %stop_on_removal %{name}
435 %endif
436
437 exit 0
438
439 %else
440 # rhel
441
442 %if 0%{?use_systemd}
443 %systemd_preun %{name}.service
444 %else
445 if [ "$1" = "0" ]; then
446         /sbin/service %{name} stop > /dev/null 2>&1 || :
447         /sbin/chkconfig --del %{name} || :
448 fi
449 %endif
450
451 exit 0
452
453 %endif
454 # suse / rhel
455
456 %post ido-mysql
457 if [ ${1:-0} -eq 1 ]
458 then
459         # initial installation, enable ido-mysql feature
460         ln -sf ../features-available/ido-mysql.conf %{_sysconfdir}/%{name}/features-enabled/ido-mysql.conf
461 fi
462
463 exit 0
464
465 %postun ido-mysql
466 if [ "$1" = "0" ]; then
467         # deinstallation of the package - remove feature
468         rm -f %{_sysconfdir}/%{name}/features-enabled/ido-mysql.conf
469 fi
470
471 exit 0
472
473 %post ido-pgsql
474 if [ ${1:-0} -eq 1 ]
475 then
476         # initial installation, enable ido-pgsql feature
477         ln -sf ../features-available/ido-pgsql.conf %{_sysconfdir}/%{name}/features-enabled/ido-pgsql.conf
478 fi
479
480 exit 0
481
482 %postun ido-pgsql
483 if [ "$1" = "0" ]; then
484         # deinstallation of the package - remove feature
485         rm -f %{_sysconfdir}/%{name}/features-enabled/ido-pgsql.conf
486 fi
487
488 exit 0
489
490 %post classicui-config
491 if [ ${1:-0} -eq 1 ]
492 then
493         # initial installation, enable features
494         for feature in statusdata compatlog command; do
495                 ln -sf ../features-available/${feature}.conf %{_sysconfdir}/%{name}/features-enabled/${feature}.conf
496         done
497 fi
498
499 exit 0
500
501 %postun classicui-config
502 if [ "$1" = "0" ]; then
503         # deinstallation of the package - remove feature
504         for feature in statusdata compatlog command; do
505                 rm -f %{_sysconfdir}/%{name}/features-enabled/${feature}.conf
506         done
507 fi
508
509 exit 0
510
511 %if "%{_vendor}" == "redhat" && !(0%{?el5} || 0%{?rhel} == 5 || "%{?dist}" == ".el5" || 0%{?el6} || 0%{?rhel} == 6 || "%{?dist}" == ".el6")
512 %post selinux
513 for selinuxvariant in %{selinux_variants}
514 do
515   /usr/sbin/semodule -s ${selinuxvariant} -i \
516     %{_datadir}/selinux/${selinuxvariant}/%{modulename}.pp &> /dev/null || :
517 done
518 /sbin/fixfiles -R icinga2-bin restore &> /dev/null || :
519 /sbin/fixfiles -R icinga2-common restore &> /dev/null || :
520 /sbin/semanage port -a -t icinga2_port_t -p tcp 5665 &> /dev/null || :
521
522 %postun selinux
523 if [ $1 -eq 0 ] ; then
524   /sbin/semanage port -d -t icinga2_port_t -p tcp 5665 &> /dev/null || :
525   for selinuxvariant in %{selinux_variants}
526   do
527      /usr/sbin/semodule -s ${selinuxvariant} -r %{modulename} &> /dev/null || :
528   done
529   /sbin/fixfiles -R icinga2-bin restore &> /dev/null || :
530   /sbin/fixfiles -R icinga2-common restore &> /dev/null || :
531 fi
532 %endif
533
534
535 %files
536 %defattr(-,root,root,-)
537 %doc COPYING
538
539 %files bin
540 %defattr(-,root,root,-)
541 %doc COPYING COPYING.Exceptions README.md NEWS AUTHORS ChangeLog
542 %{_sbindir}/%{name}
543 %exclude %{_libdir}/%{name}/libdb_ido_mysql*
544 %exclude %{_libdir}/%{name}/libdb_ido_pgsql*
545 %dir %{_libdir}/%{name}
546 %{_libdir}/%{name}/*.so*
547 %dir %{_libdir}/%{name}/sbin
548 %{_libdir}/%{name}/sbin/%{name}
549 %{_datadir}/%{name}
550 %exclude %{_datadir}/%{name}/include
551 %{_mandir}/man8/%{name}.8.gz
552
553 %attr(0750,%{icinga_user},%{icingacmd_group}) %{_localstatedir}/cache/%{name}
554 %attr(0750,%{icinga_user},%{icingacmd_group}) %dir %{_localstatedir}/log/%{name}
555 %attr(0750,%{icinga_user},%{icinga_group}) %dir %{_localstatedir}/log/%{name}/crash
556 %attr(0750,%{icinga_user},%{icingacmd_group}) %dir %{_localstatedir}/log/%{name}/compat
557 %attr(0750,%{icinga_user},%{icingacmd_group}) %dir %{_localstatedir}/log/%{name}/compat/archives
558 %attr(0750,%{icinga_user},%{icinga_group}) %{_localstatedir}/lib/%{name}
559
560 %attr(0750,%{icinga_user},%{icingacmd_group}) %ghost %{_rundir}/%{name}
561 %attr(2750,%{icinga_user},%{icingacmd_group}) %ghost %{_rundir}/%{name}/cmd
562
563 %files common
564 %defattr(-,root,root,-)
565 %doc COPYING COPYING.Exceptions README.md NEWS AUTHORS ChangeLog tools/syntax
566 %attr(0750,%{icinga_user},%{icingacmd_group}) %dir %{_localstatedir}/log/%{name}
567 %config(noreplace) %{_sysconfdir}/logrotate.d/%{name}
568 %{_sysconfdir}/bash_completion.d/%{name}
569 %if 0%{?use_systemd}
570 %attr(644,root,root) %{_unitdir}/%{name}.service
571 %else
572 %attr(755,root,root) %{_sysconfdir}/init.d/%{name}
573 %endif
574 %if "%{_vendor}" == "suse"
575 %{_sbindir}/rc%{name}
576 %{_localstatedir}/adm/fillup-templates/sysconfig.%{name}
577 %else
578 %config(noreplace) %{_sysconfdir}/sysconfig/%{name}
579 %endif
580 %attr(0750,root,%{icinga_group}) %dir %{_sysconfdir}/%{name}
581 %attr(0750,%{icinga_user},%{icinga_group}) %dir %{_sysconfdir}/%{name}/conf.d
582 %attr(0750,%{icinga_user},%{icinga_group}) %dir %{_sysconfdir}/%{name}/features-available
583 %exclude %{_sysconfdir}/%{name}/features-available/ido-*.conf
584 %attr(0750,%{icinga_user},%{icinga_group}) %dir %{_sysconfdir}/%{name}/features-enabled
585 %attr(0750,%{icinga_user},%{icinga_group}) %dir %{_sysconfdir}/%{name}/repository.d
586 %attr(0750,%{icinga_user},%{icinga_group}) %dir %{_sysconfdir}/%{name}/scripts
587 %attr(0750,%{icinga_user},%{icinga_group}) %dir %{_sysconfdir}/%{name}/repository.d
588 %attr(0750,%{icinga_user},%{icinga_group}) %dir %{_sysconfdir}/%{name}/zones.d
589 %config(noreplace) %attr(0640,%{icinga_user},%{icinga_group}) %{_sysconfdir}/%{name}/%{name}.conf
590 %config(noreplace) %attr(0640,root,%{icinga_group}) %{_sysconfdir}/%{name}/init.conf
591 %config(noreplace) %attr(0640,%{icinga_user},%{icinga_group}) %{_sysconfdir}/%{name}/constants.conf
592 %config(noreplace) %attr(0640,%{icinga_user},%{icinga_group}) %{_sysconfdir}/%{name}/zones.conf
593 %config(noreplace) %attr(0640,%{icinga_user},%{icinga_group}) %{_sysconfdir}/%{name}/conf.d/*.conf
594 %config(noreplace) %attr(0640,%{icinga_user},%{icinga_group}) %{_sysconfdir}/%{name}/features-available/*.conf
595 %config(noreplace) %attr(0640,%{icinga_user},%{icinga_group}) %{_sysconfdir}/%{name}/repository.d/*
596 %config(noreplace) %attr(0640,%{icinga_user},%{icinga_group}) %{_sysconfdir}/%{name}/zones.d/*
597 %config(noreplace) %{_sysconfdir}/%{name}/scripts/*
598 %dir %{_libexecdir}/%{name}
599 %{_libexecdir}/%{name}/prepare-dirs
600 %{_libexecdir}/%{name}/safe-reload
601 %attr(0750,%{icinga_user},%{icinga_group}) %dir %{_localstatedir}/spool/%{name}
602 %attr(0770,%{icinga_user},%{icinga_group}) %dir %{_localstatedir}/spool/%{name}/perfdata
603 %attr(0750,%{icinga_user},%{icinga_group}) %dir %{_localstatedir}/spool/%{name}/tmp
604 %attr(0750,%{icinga_user},%{icinga_group}) %dir %{_datadir}/%{name}/include
605 %{_datadir}/%{name}/include
606
607 %files doc
608 %defattr(-,root,root,-)
609 %{_datadir}/doc/%{name}
610 %docdir %{_datadir}/doc/%{name}
611
612 %files ido-mysql
613 %defattr(-,root,root,-)
614 %doc COPYING COPYING.Exceptions README.md NEWS AUTHORS ChangeLog
615 %config(noreplace) %attr(0640,%{icinga_user},%{icinga_group}) %{_sysconfdir}/%{name}/features-available/ido-mysql.conf
616 %{_libdir}/%{name}/libdb_ido_mysql*
617 %{_datadir}/icinga2-ido-mysql
618
619 %files ido-pgsql
620 %defattr(-,root,root,-)
621 %doc COPYING COPYING.Exceptions README.md NEWS AUTHORS ChangeLog
622 %config(noreplace) %attr(0640,%{icinga_user},%{icinga_group}) %{_sysconfdir}/%{name}/features-available/ido-pgsql.conf
623 %{_libdir}/%{name}/libdb_ido_pgsql*
624 %{_datadir}/icinga2-ido-pgsql
625
626 %files classicui-config
627 %defattr(-,root,root,-)
628 %attr(0751,%{icinga_user},%{icinga_group}) %dir %{icingaclassicconfdir}
629 %config(noreplace) %{icingaclassicconfdir}/cgi.cfg
630 %config(noreplace) %{apacheconfdir}/icinga.conf
631 %config(noreplace) %attr(0640,root,%{apachegroup}) %{icingaclassicconfdir}/passwd
632
633 %if "%{_vendor}" == "redhat" && !(0%{?el5} || 0%{?rhel} == 5 || "%{?dist}" == ".el5" || 0%{?el6} || 0%{?rhel} == 6 || "%{?dist}" == ".el6")
634 %files selinux
635 %defattr(-,root,root,0755)
636 %doc tools/selinux/*
637 %{_datadir}/selinux/*/%{modulename}.pp
638 %endif
639
640 %changelog