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