Search
j0ke.net Open Build Service
>
Projects
>
server:monitoring
>
nagios-mod_gearman
> nagios-mod_gearman.spec
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File nagios-mod_gearman.spec of Package nagios-mod_gearman (Revision 26)
Currently displaying revision
26
,
show latest
## %define monitor nagios %define monitor nagios %define pkgname mod_gearman Name: %{monitor}-%{pkgname} Version: 1.3.6 Release: 1 Group: Application/System License: GPLv3 Url: http://labs.consol.de/lang/de/nagios/mod-gearman/ Summary: Distributed active Icinga/Nagios checks Source0: http://labs.consol.de/wp-content/uploads/2010/09/%{pkgname}-%{version}.tar.bz2 Source1: mod_gearman-worker-suse.init Source2: mod_gearman_worker.sysconfig Patch0: mod_gearman-init-worker.patch Patch1: mod_gearman-worker-config.patch BuildRoot: %{_tmppath}/%{name}-%{version}-root BuildRequires: gcc-c++ gearmand-devel >= 0.14 ncurses-devel sed BuildRequires: %{monitor} %description Mod Gearman is a new way of distributing active Nagios checks across your network. It consists of two parts: There is a NEB module which resides in the Nagios core and adds servicechecks, hostchecks and eventhandler to a Gearman queue. There can be multiple equal gearman servers. The counterpart is one or more worker clients for the checks itself. They can be bound to host and servicegroups. %package server Group: Application/System Summary: The server part of mod_gearman Requires: %{monitor}-%{pkgname} Requires: %{monitor} Requires: %{monitor}-%{pkgname}-plugins = %{version} %description server This package includes reuired files to run a mod_gearman server. %package worker Group: Application/System Summary: The worker part of mod_gearman Requires: %{monitor}-%{pkgname} Requires(pre): pwdutils Requires: %{monitor}-%{pkgname}-plugins = %{version} %description worker This package includes only the files needed for a mod_gearman worker. %package plugins Group: Application/System Summary: Plugins to check mod_gearman functionality %description plugins This package includes all checkplugins for mod_gearman. %prep %setup -n %{pkgname}-%{version} %patch0 %patch1 %build %configure \ --with-user=%{monitor} \ --with-init-dir=%{_sysconfdir}/init.d %__make %install %__make DESTDIR=%{buildroot} install %if 0%{?suse_version} %__install -D -m0755 %{S:1} %{buildroot}/etc/init.d/mod_gearman_worker %__install -D -m0644 %{S:2} %{buildroot}/var/adm/fillup-templates/sysconfig.mod_gearman_worker sed -i s@"%USERID%"@"%{monitor}"@ %{buildroot}/var/adm/fillup-templates/sysconfig.mod_gearman_worker %endif %__install -D -m0644 %{buildroot}%{_datadir}/mod_gearman/standalone_worker.conf %{buildroot}%{_sysconfdir}/mod_gearman_worker.conf %__install -d %{buildroot}/var/log/mod_gearman_worker %__install -d %{buildroot}/var/log/mod_gearman %__install -d %{buildroot}/var/run/mod_gearman # use nagios as plugindir not icinga, because all plugins are there %__install -d %{buildroot}%{_prefix}/lib/nagios/plugins mv %{buildroot}%{_bindir}/check_gearman %{buildroot}%{_bindir}/send_gearman %{buildroot}%{_bindir}/send_multi %{buildroot}%{_prefix}/lib/nagios/plugins/ rm -rf %{buildroot}%{_sysconfdir}/init.d/gearmand %clean rm -rf %{buildroot} %preun worker %stop_on_removal %preun server %stop_on_removal %postun worker %restart_on_update mod_gearman_worker %insserv_cleanup %postun server %insserv_cleanup %post worker %if 0%{?suse_version} %fillup_and_insserv -y -n mod_gearman_worker %endif if [ ยง1 == 2 ] ; then service mod_gearman_worker restart fi %pre worker %if 0%{?suse_version} getent group %{monitor} >/dev/null || groupadd -r %{monitor} getent passwd %{monitor} >/dev/null || useradd -r -g %{monitor} -d %{_datadir}/mod_gearman -s /sbin/nologin -c "mod_gearman_worker" %{monitor} exit 0 %endif %files %defattr(-,root,root) %doc Changes COPYING README THANKS TODO docs/README.html docs/QUICKSTART* %dir %{_libdir}/mod_gearman %{_libdir}/mod_gearman/mod_gearman.o %files worker %defattr(-,root,root) %config(noreplace) %{_sysconfdir}/mod_gearman_worker.conf %{_sysconfdir}/init.d/mod_gearman_worker %{_bindir}/mod_gearman_worker %dir %{_datadir}/mod_gearman %{_datadir}/mod_gearman/standalone_worker.conf %{_datadir}/mod_gearman/gearman_proxy.pl %dir %attr(-,%{monitor},%{monitor}) /var/log/mod_gearman_worker %dir %attr(-,%{monitor},%{monitor}) /var/run/mod_gearman %if 0%{?suse_version} /var/adm/fillup-templates/sysconfig.mod_gearman_worker %endif %files server %defattr(-,root,root) %config(noreplace) %{_sysconfdir}/mod_gearman_neb.conf %dir %{_libdir}/mod_gearman %{_libdir}/mod_gearman/mod_gearman.o %{_bindir}/gearman_top %dir %{_datadir}/mod_gearman %{_datadir}/mod_gearman/shared.conf %dir %attr(-,%{monitor},%{monitor}) /var/log/mod_gearman %files plugins %defattr(-,root,root) # use nagios as plugindir not icinga, because all plugins are there %dir %{_prefix}/lib/nagios %dir %{_prefix}/lib/nagios/plugins %{_prefix}/lib/nagios/plugins/check_gearman %{_prefix}/lib/nagios/plugins/send_gearman %{_prefix}/lib/nagios/plugins/send_multi %changelog