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