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 3)
Currently displaying revision
3
,
show latest
## %define monitor nagios %define monitor nagios %define pkgname mod_gearman Name: %{monitor}-%{pkgname} Version: 1.0 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} %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 %description worker This package includes only the files needed for a mod_gearman worker. %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/run/mod_gearman %clean rm -rf %{buildroot} %preun worker %stop_on_removal %preun server %stop_on_removal %postun worker %insserv_cleanup %postun server %insserv_cleanup %post worker %if 0%{?suse_version} %fillup_and_insserv -y -n mod_gearman_worker %endif %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.so %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 %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) %dir %{_libdir}/mod_gearman %{_libdir}/mod_gearman/mod_gearman.o %{_bindir}/gearman_top %{_bindir}/check_gearman %{_bindir}/send_gearman %{_bindir}/send_multi %dir %{_datadir}/mod_gearman %{_datadir}/mod_gearman/shared.conf %changelog