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