]> granicus.if.org Git - icinga2/blob - icinga2.spec
Release version 2.3.5
[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.5
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 BuildRequires: openssl-devel
96 BuildRequires: gcc-c++
97 BuildRequires: libstdc++-devel
98 BuildRequires: cmake
99 BuildRequires: flex >= 2.5.35
100 BuildRequires: bison
101 BuildRequires: make
102
103 %if 0%{?build_icinga_org} && "%{_vendor}" == "redhat" && (0%{?el5} || 0%{?rhel} == 5 || "%{?dist}" == ".el5" || 0%{?el6} || 0%{?rhel} == 6 || "%{?dist}" == ".el6")
104 # el5 and el6 require packages.icinga.org
105 BuildRequires: boost153-devel
106 %else
107 %if 0%{?build_icinga_org} && "%{_vendor}" == "suse" && 0%{?suse_version} < 1310
108 # sles 11 sp3 requires packages.icinga.org
109 BuildRequires: boost153-devel
110 %else
111 BuildRequires: boost-devel >= 1.41
112 %endif
113 %endif
114
115 %if 0%{?use_systemd}
116 BuildRequires: systemd
117 Requires: systemd
118 %endif
119
120 Requires: %{name}-common = %{version}-%{release}
121
122 %description bin
123 Icinga 2 is a general-purpose network monitoring application.
124 Provides binaries and libraries for Icinga 2 Core.
125
126 %package common
127 Summary:      Common Icinga 2 configuration
128 Group:        Applications/System
129 %if "%{_vendor}" == "redhat"
130 Requires(pre): shadow-utils
131 Requires(post): shadow-utils
132 %endif
133 %if "%{_vendor}" == "suse"
134 Recommends:   logrotate
135 %endif
136
137 %description common
138 Provides common directories, uid and gid among Icinga 2 related
139 packages.
140
141
142 %package doc
143 Summary:      Documentation for Icinga 2
144 Group:        Applications/System
145 Requires:     %{name} = %{version}-%{release}
146
147 %description doc
148 Provides documentation for Icinga 2.
149
150
151 %package ido-mysql
152 Summary:      IDO MySQL database backend for Icinga 2
153 Group:        Applications/System
154 %if "%{_vendor}" == "suse"
155 BuildRequires: libmysqlclient-devel
156 %endif
157 BuildRequires: mysql-devel
158 Requires: %{name} = %{version}-%{release}
159
160 %description ido-mysql
161 Icinga 2 IDO mysql database backend. Compatible with Icinga 1.x
162 IDOUtils schema >= 1.12
163
164
165 %package ido-pgsql
166 Summary:      IDO PostgreSQL database backend for Icinga 2
167 Group:        Applications/System
168 BuildRequires: postgresql-devel
169 Requires: %{name} = %{version}-%{release}
170
171 %description ido-pgsql
172 Icinga 2 IDO PostgreSQL database backend. Compatible with Icinga 1.x
173 IDOUtils schema >= 1.12
174
175
176 %package classicui-config
177 Summary:      Icinga 2 Classic UI Standalone configuration
178 Group:        Applications/System
179 BuildRequires: %{apachename}
180 Requires:     %{apachename}
181 Requires:     %{name} = %{version}-%{release}
182 %if "%{_vendor}" == "suse"
183 Recommends:   icinga-www
184 %endif
185 Provides:     icinga-classicui-config
186 Conflicts:    icinga-gui-config
187
188 %description classicui-config
189 Icinga 1.x Classic UI Standalone configuration with locations
190 for Icinga 2.
191
192 %if "%{_vendor}" == "redhat" && !(0%{?el5} || 0%{?rhel} == 5 || "%{?dist}" == ".el5" || 0%{?el6} || 0%{?rhel} == 6 || "%{?dist}" == ".el6")
193 %global selinux_variants mls targeted
194 %{!?_selinux_policy_version: %global _selinux_policy_version %(sed -e 's,.*selinux-policy-\\([^/]*\\)/.*,\\1,' /usr/share/selinux/devel/policyhelp 2>/dev/null)}
195 %global modulename %{name}
196
197 %package selinux
198 Summary:        SELinux policy module supporting icinga2
199 Group:          System Environment/Base
200 BuildRequires:  checkpolicy, selinux-policy-devel, /usr/share/selinux/devel/policyhelp, hardlink
201 %if "%{_selinux_policy_version}" != ""
202 Requires:       selinux-policy >= %{_selinux_policy_version}
203 %endif
204 Requires:       %{name} = %{version}-%{release}
205 Requires(post):   /usr/sbin/semodule, /sbin/restorecon
206 Requires(postun): /usr/sbin/semodule, /sbin/restorecon
207
208 %description selinux
209 SELinux policy module supporting icinga2
210 %endif
211
212
213 %prep
214 %setup -q -n %{name}-%{version}
215
216 %build
217 CMAKE_OPTS="-DCMAKE_INSTALL_PREFIX=/usr \
218          -DCMAKE_INSTALL_SYSCONFDIR=/etc \
219          -DCMAKE_INSTALL_LOCALSTATEDIR=/var \
220          -DCMAKE_BUILD_TYPE=RelWithDebInfo \
221          -DCMAKE_VERBOSE_MAKEFILE=ON \
222          -DBoost_NO_BOOST_CMAKE=ON \
223          -DICINGA2_RUNDIR=%{_rundir} \
224          -DICINGA2_USER=%{icinga_user} \
225          -DICINGA2_GROUP=%{icinga_group} \
226          -DICINGA2_COMMAND_GROUP=%{icingacmd_group}"
227 %if "%{_vendor}" == "redhat"
228 %if 0%{?el5} || 0%{?rhel} == 5 || "%{?dist}" == ".el5" || 0%{?el6} || 0%{?rhel} == 6 || "%{?dist}" == ".el6"
229 # Boost_VERSION 1.41.0 vs 101400 - disable build tests
230 # details in https://dev.icinga.org/issues/5033
231 CMAKE_OPTS="$CMAKE_OPTS -DBOOST_LIBRARYDIR=/usr/lib/boost153 \
232  -DBOOST_INCLUDEDIR=/usr/include/boost153 \
233  -DBoost_ADDITIONAL_VERSIONS='1.53;1.53.0' \
234  -DBoost_NO_SYSTEM_PATHS=TRUE \
235  -DBUILD_TESTING=FALSE \
236  -DBoost_NO_BOOST_CMAKE=TRUE"
237 %endif
238 %if 0%{?el6} || 0%{?rhel} == 6 || "%{?dist}" == ".el6"
239 CMAKE_OPTS="$CMAKE_OPTS -DBUILD_TESTING=FALSE"
240 %endif
241 %endif
242
243 %if "%{_vendor}" != "suse"
244 CMAKE_OPTS="$CMAKE_OPTS -DICINGA2_PLUGINDIR=%{_libdir}/nagios/plugins"
245 %else
246 %if 0%{?suse_version} < 1310
247 CMAKE_OPTS="$CMAKE_OPTS -DBOOST_LIBRARYDIR=/usr/lib/boost153 \
248  -DBOOST_INCLUDEDIR=/usr/include/boost153 \
249  -DBoost_ADDITIONAL_VERSIONS='1.53;1.53.0' \
250  -DBoost_NO_SYSTEM_PATHS=TRUE \
251  -DBUILD_TESTING=FALSE \
252  -DBoost_NO_BOOST_CMAKE=TRUE"
253 %endif
254 CMAKE_OPTS="$CMAKE_OPTS -DICINGA2_PLUGINDIR=%{_prefix}/lib/nagios/plugins"
255 %endif
256
257 %if 0%{?use_systemd}
258 CMAKE_OPTS="$CMAKE_OPTS -DUSE_SYSTEMD=ON"
259 %endif
260
261 cmake $CMAKE_OPTS -DCMAKE_C_FLAGS:STRING="%{optflags} %{?march_flag}" -DCMAKE_CXX_FLAGS:STRING="%{optflags} %{?march_flag}" .
262
263 make %{?_smp_mflags}
264
265 %if "%{_vendor}" == "redhat" && !(0%{?el5} || 0%{?rhel} == 5 || "%{?dist}" == ".el5" || 0%{?el6} || 0%{?rhel} == 6 || "%{?dist}" == ".el6")
266 cd tools/selinux
267 for selinuxvariant in %{selinux_variants}
268 do
269   make NAME=${selinuxvariant} -f /usr/share/selinux/devel/Makefile
270   mv %{modulename}.pp %{modulename}.pp.${selinuxvariant}
271   make NAME=${selinuxvariant} -f /usr/share/selinux/devel/Makefile clean
272 done
273 cd -
274 %endif
275
276 %install
277 make install \
278         DESTDIR="%{buildroot}"
279
280 # install classicui config
281 install -D -m 0644 etc/icinga/icinga-classic.htpasswd %{buildroot}%{icingaclassicconfdir}/passwd
282 install -D -m 0644 etc/icinga/cgi.cfg %{buildroot}%{icingaclassicconfdir}/cgi.cfg
283 install -D -m 0644 etc/icinga/icinga-classic-apache.conf %{buildroot}%{apacheconfdir}/icinga.conf
284
285 # remove features-enabled symlinks
286 rm -f %{buildroot}/%{_sysconfdir}/%{name}/features-enabled/*.conf
287
288 # enable suse rc links
289 %if "%{_vendor}" == "suse"
290 %if 0%{?use_systemd}
291   ln -sf /usr/sbin/service %{buildroot}%{_sbindir}/rc%{name}
292 %else
293   ln -sf ../../%{_initrddir}/%{name} "%{buildroot}%{_sbindir}/rc%{name}"
294 %endif
295 mkdir -p "%{buildroot}%{_localstatedir}/adm/fillup-templates/"
296 mv "%{buildroot}%{_sysconfdir}/sysconfig/%{name}" "%{buildroot}%{_localstatedir}/adm/fillup-templates/sysconfig.%{name}"
297 %endif
298
299 %if "%{_vendor}" == "redhat" && !(0%{?el5} || 0%{?rhel} == 5 || "%{?dist}" == ".el5" || 0%{?el6} || 0%{?rhel} == 6 || "%{?dist}" == ".el6")
300 cd tools/selinux
301 for selinuxvariant in %{selinux_variants}
302 do
303   install -d %{buildroot}%{_datadir}/selinux/${selinuxvariant}
304   install -p -m 644 %{modulename}.pp.${selinuxvariant} \
305     %{buildroot}%{_datadir}/selinux/${selinuxvariant}/%{modulename}.pp
306 done
307 cd -
308
309 /usr/sbin/hardlink -cv %{buildroot}%{_datadir}/selinux
310 %endif
311
312 %clean
313 [ "%{buildroot}" != "/" ] && [ -d "%{buildroot}" ] && rm -rf %{buildroot}
314
315 %pre common
316 getent group %{icinga_group} >/dev/null || %{_sbindir}/groupadd -r %{icinga_group}
317 getent group %{icingacmd_group} >/dev/null || %{_sbindir}/groupadd -r %{icingacmd_group}
318 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}
319
320 %if "%{_vendor}" == "suse"
321 %if 0%{?use_systemd}
322   %service_add_pre %{name}.service
323 %endif
324 %endif
325 exit 0
326
327 %if "%{_vendor}" == "suse"
328 %verifyscript bin
329 %verify_permissions -e %{_rundir}/%{name}/cmd
330
331 %if 0%{?suse_version} >= 1310
332 %post bin
333 %set_permissions %{_rundir}/%{name}/cmd
334 %endif
335 %endif
336
337 %post common
338 # suse
339 %if "%{_vendor}" == "suse"
340 %if 0%{?use_systemd}
341 %fillup_only  %{name}
342 %service_add_post %{name}.service
343 %else
344 %fillup_and_insserv %{name}
345 %endif
346
347 # initial installation, enable default features
348 for feature in checker notification mainlog; do
349         ln -sf ../features-available/${feature}.conf %{_sysconfdir}/%{name}/features-enabled/${feature}.conf
350 done
351
352 exit 0
353
354 %else
355 # rhel
356
357 %if 0%{?use_systemd}
358 %systemd_post %{name}.service
359 %else
360 /sbin/chkconfig --add %{name}
361 %endif
362
363 if [ ${1:-0} -eq 1 ]
364 then
365         # initial installation, enable default features
366         for feature in checker notification mainlog; do
367                 ln -sf ../features-available/${feature}.conf %{_sysconfdir}/%{name}/features-enabled/${feature}.conf
368         done
369 fi
370
371 exit 0
372
373 %endif
374 # suse/rhel
375
376 %postun common
377 # suse
378 %if "%{_vendor}" == "suse"
379 %if 0%{?using_systemd}
380   %service_del_postun %{name}.service
381 %else
382   %restart_on_update %{name}
383   %insserv_cleanup
384 %endif
385
386 %else
387 # rhel
388
389 %if 0%{?use_systemd}
390 %systemd_postun_with_restart %{name}.service
391 %else
392 if [ "$1" -ge  "1" ]; then
393         /sbin/service %{name} condrestart >/dev/null 2>&1 || :
394 fi
395 %endif
396
397 %endif
398 # suse / rhel
399
400 if [ "$1" = "0" ]; then
401         # deinstallation of the package - remove enabled features
402         rm -rf %{_sysconfdir}/%{name}/features-enabled
403 fi
404
405 exit 0
406
407 %preun common
408 # suse
409 %if "%{_vendor}" == "suse"
410
411 %if 0%{?use_systemd}
412   %service_del_preun %{name}.service
413 %else
414   %stop_on_removal %{name}
415 %endif
416
417 exit 0
418
419 %else
420 # rhel
421
422 %if 0%{?use_systemd}
423 %systemd_preun %{name}.service
424 %else
425 if [ "$1" = "0" ]; then
426         /sbin/service %{name} stop > /dev/null 2>&1 || :
427         /sbin/chkconfig --del %{name} || :
428 fi
429 %endif
430
431 exit 0
432
433 %endif
434 # suse / rhel
435
436 %post ido-mysql
437 if [ ${1:-0} -eq 1 ]
438 then
439         # initial installation, enable ido-mysql feature
440         ln -sf ../features-available/ido-mysql.conf %{_sysconfdir}/%{name}/features-enabled/ido-mysql.conf
441 fi
442
443 exit 0
444
445 %postun ido-mysql
446 if [ "$1" = "0" ]; then
447         # deinstallation of the package - remove feature
448         rm -f %{_sysconfdir}/%{name}/features-enabled/ido-mysql.conf
449 fi
450
451 exit 0
452
453 %post ido-pgsql
454 if [ ${1:-0} -eq 1 ]
455 then
456         # initial installation, enable ido-pgsql feature
457         ln -sf ../features-available/ido-pgsql.conf %{_sysconfdir}/%{name}/features-enabled/ido-pgsql.conf
458 fi
459
460 exit 0
461
462 %postun ido-pgsql
463 if [ "$1" = "0" ]; then
464         # deinstallation of the package - remove feature
465         rm -f %{_sysconfdir}/%{name}/features-enabled/ido-pgsql.conf
466 fi
467
468 exit 0
469
470 %post classicui-config
471 if [ ${1:-0} -eq 1 ]
472 then
473         # initial installation, enable features
474         for feature in statusdata compatlog command; do
475                 ln -sf ../features-available/${feature}.conf %{_sysconfdir}/%{name}/features-enabled/${feature}.conf
476         done
477 fi
478
479 exit 0
480
481 %postun classicui-config
482 if [ "$1" = "0" ]; then
483         # deinstallation of the package - remove feature
484         for feature in statusdata compatlog command; do
485                 rm -f %{_sysconfdir}/%{name}/features-enabled/${feature}.conf
486         done
487 fi
488
489 exit 0
490
491 %if "%{_vendor}" == "redhat" && !(0%{?el5} || 0%{?rhel} == 5 || "%{?dist}" == ".el5" || 0%{?el6} || 0%{?rhel} == 6 || "%{?dist}" == ".el6")
492 %post selinux
493 for selinuxvariant in %{selinux_variants}
494 do
495   /usr/sbin/semodule -s ${selinuxvariant} -i \
496     %{_datadir}/selinux/${selinuxvariant}/%{modulename}.pp &> /dev/null || :
497 done
498 /sbin/fixfiles -R icinga2-bin restore &> /dev/null || :
499 /sbin/fixfiles -R icinga2-common restore &> /dev/null || :
500 /sbin/semanage port -a -t icinga2_port_t -p tcp 5665 &> /dev/null || :
501
502 %postun selinux
503 if [ $1 -eq 0 ] ; then
504   /sbin/semanage port -d -t icinga2_port_t -p tcp 5665 &> /dev/null || :
505   for selinuxvariant in %{selinux_variants}
506   do
507      /usr/sbin/semodule -s ${selinuxvariant} -r %{modulename} &> /dev/null || :
508   done
509   /sbin/fixfiles -R icinga2-bin restore &> /dev/null || :
510   /sbin/fixfiles -R icinga2-common restore &> /dev/null || :
511 fi
512 %endif
513
514
515 %files
516 %defattr(-,root,root,-)
517 %doc COPYING
518
519 %files bin
520 %defattr(-,root,root,-)
521 %doc COPYING COPYING.Exceptions README.md NEWS AUTHORS ChangeLog
522 %{_sbindir}/%{name}
523 %exclude %{_libdir}/%{name}/libdb_ido_mysql*
524 %exclude %{_libdir}/%{name}/libdb_ido_pgsql*
525 %dir %{_libdir}/%{name}
526 %{_libdir}/%{name}/*.so*
527 %dir %{_libdir}/%{name}/sbin
528 %{_libdir}/%{name}/sbin/%{name}
529 %{_datadir}/%{name}
530 %exclude %{_datadir}/%{name}/include
531 %{_mandir}/man8/%{name}.8.gz
532
533 %attr(0750,%{icinga_user},%{icingacmd_group}) %{_localstatedir}/cache/%{name}
534 %attr(0750,%{icinga_user},%{icingacmd_group}) %dir %{_localstatedir}/log/%{name}
535 %attr(0750,%{icinga_user},%{icinga_group}) %dir %{_localstatedir}/log/%{name}/crash
536 %attr(0750,%{icinga_user},%{icingacmd_group}) %dir %{_localstatedir}/log/%{name}/compat
537 %attr(0750,%{icinga_user},%{icingacmd_group}) %dir %{_localstatedir}/log/%{name}/compat/archives
538 %attr(0750,%{icinga_user},%{icinga_group}) %{_localstatedir}/lib/%{name}
539
540 %attr(0750,%{icinga_user},%{icingacmd_group}) %ghost %{_rundir}/%{name}
541 %attr(2750,%{icinga_user},%{icingacmd_group}) %ghost %{_rundir}/%{name}/cmd
542
543 %files common
544 %defattr(-,root,root,-)
545 %doc COPYING COPYING.Exceptions README.md NEWS AUTHORS ChangeLog tools/syntax
546 %attr(0750,%{icinga_user},%{icingacmd_group}) %dir %{_localstatedir}/log/%{name}
547 %config(noreplace) %{_sysconfdir}/logrotate.d/%{name}
548 %{_sysconfdir}/bash_completion.d/%{name}
549 %if 0%{?use_systemd}
550 %attr(644,root,root) %{_unitdir}/%{name}.service
551 %else
552 %attr(755,root,root) %{_sysconfdir}/init.d/%{name}
553 %endif
554 %if "%{_vendor}" == "suse"
555 %{_sbindir}/rc%{name}
556 %{_localstatedir}/adm/fillup-templates/sysconfig.%{name}
557 %else
558 %config(noreplace) %{_sysconfdir}/sysconfig/%{name}
559 %endif
560 %attr(0750,root,%{icinga_group}) %dir %{_sysconfdir}/%{name}
561 %attr(0750,%{icinga_user},%{icinga_group}) %dir %{_sysconfdir}/%{name}/conf.d
562 %attr(0750,%{icinga_user},%{icinga_group}) %dir %{_sysconfdir}/%{name}/features-available
563 %exclude %{_sysconfdir}/%{name}/features-available/ido-*.conf
564 %attr(0750,%{icinga_user},%{icinga_group}) %dir %{_sysconfdir}/%{name}/features-enabled
565 %attr(0750,%{icinga_user},%{icinga_group}) %dir %{_sysconfdir}/%{name}/repository.d
566 %attr(0750,%{icinga_user},%{icinga_group}) %dir %{_sysconfdir}/%{name}/scripts
567 %attr(0750,%{icinga_user},%{icinga_group}) %dir %{_sysconfdir}/%{name}/repository.d
568 %attr(0750,%{icinga_user},%{icinga_group}) %dir %{_sysconfdir}/%{name}/zones.d
569 %config(noreplace) %attr(0640,%{icinga_user},%{icinga_group}) %{_sysconfdir}/%{name}/%{name}.conf
570 %config(noreplace) %attr(0640,root,%{icinga_group}) %{_sysconfdir}/%{name}/init.conf
571 %config(noreplace) %attr(0640,%{icinga_user},%{icinga_group}) %{_sysconfdir}/%{name}/constants.conf
572 %config(noreplace) %attr(0640,%{icinga_user},%{icinga_group}) %{_sysconfdir}/%{name}/zones.conf
573 %config(noreplace) %attr(0640,%{icinga_user},%{icinga_group}) %{_sysconfdir}/%{name}/conf.d/*.conf
574 %config(noreplace) %attr(0640,%{icinga_user},%{icinga_group}) %{_sysconfdir}/%{name}/features-available/*.conf
575 %config(noreplace) %attr(0640,%{icinga_user},%{icinga_group}) %{_sysconfdir}/%{name}/repository.d/*
576 %config(noreplace) %attr(0640,%{icinga_user},%{icinga_group}) %{_sysconfdir}/%{name}/zones.d/*
577 %config(noreplace) %{_sysconfdir}/%{name}/scripts/*
578 %dir %{_libexecdir}/%{name}
579 %{_libexecdir}/%{name}/prepare-dirs
580 %{_libexecdir}/%{name}/safe-reload
581 %attr(0750,%{icinga_user},%{icinga_group}) %dir %{_localstatedir}/spool/%{name}
582 %attr(0770,%{icinga_user},%{icinga_group}) %dir %{_localstatedir}/spool/%{name}/perfdata
583 %attr(0750,%{icinga_user},%{icinga_group}) %dir %{_localstatedir}/spool/%{name}/tmp
584 %attr(0750,%{icinga_user},%{icinga_group}) %dir %{_datadir}/%{name}/include
585 %{_datadir}/%{name}/include
586
587 %files doc
588 %defattr(-,root,root,-)
589 %{_datadir}/doc/%{name}
590 %docdir %{_datadir}/doc/%{name}
591
592 %files ido-mysql
593 %defattr(-,root,root,-)
594 %doc COPYING COPYING.Exceptions README.md NEWS AUTHORS ChangeLog
595 %config(noreplace) %attr(0640,%{icinga_user},%{icinga_group}) %{_sysconfdir}/%{name}/features-available/ido-mysql.conf
596 %{_libdir}/%{name}/libdb_ido_mysql*
597 %{_datadir}/icinga2-ido-mysql
598
599 %files ido-pgsql
600 %defattr(-,root,root,-)
601 %doc COPYING COPYING.Exceptions README.md NEWS AUTHORS ChangeLog
602 %config(noreplace) %attr(0640,%{icinga_user},%{icinga_group}) %{_sysconfdir}/%{name}/features-available/ido-pgsql.conf
603 %{_libdir}/%{name}/libdb_ido_pgsql*
604 %{_datadir}/icinga2-ido-pgsql
605
606 %files classicui-config
607 %defattr(-,root,root,-)
608 %attr(0751,%{icinga_user},%{icinga_group}) %dir %{icingaclassicconfdir}
609 %config(noreplace) %{icingaclassicconfdir}/cgi.cfg
610 %config(noreplace) %{apacheconfdir}/icinga.conf
611 %config(noreplace) %attr(0640,root,%{apachegroup}) %{icingaclassicconfdir}/passwd
612
613 %if "%{_vendor}" == "redhat" && !(0%{?el5} || 0%{?rhel} == 5 || "%{?dist}" == ".el5" || 0%{?el6} || 0%{?rhel} == 6 || "%{?dist}" == ".el6")
614 %files selinux
615 %defattr(-,root,root,0755)
616 %doc tools/selinux/*
617 %{_datadir}/selinux/*/%{modulename}.pp
618 %endif
619
620 %changelog