Search
j0ke.net Open Build Service
>
Projects
>
server:monitoring
>
monit
> monit.spec
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File monit.spec of Package monit (Revision 36)
Currently displaying revision
36
,
show latest
# norootforbuild %define _prefix /usr Name: monit Version: 5.8.1 Release: 1 Summary: Service Manager and Monitor System Source: http://www.tildeslash.com/monit/dist/monit-%{version}.tar.bz2 Source1: monit-vendor-files.tar.gz Patch0: monit-5.4-hz.patch Patch1: monit-init.patch URL: http://www.tildeslash.com/monit/ Group: System/Monitoring License: GNU General Public License (GPL) BuildRoot: %{_tmppath}/build-%{name}-%{version} BuildRequires: openssl-devel make gcc glibc-devel flex bison BuildRequires: autoconf automake libtool pam-devel %if "%{_vendor}" == "suse" %define VENDOR SUSE %else %define VENDOR %_vendor %endif %description Monit is a utility for managing and monitoring processes, files, directories, and devices on a Unix system. Monit conducts automatic maintenance and repair and can execute meaningful causal actions in error situations. For example, monit can start a process if it does not run, restart a process if it does not respond, and stop a process if it uses too many resources. You can use monit to monitor files, directories, and devices for changes, such as time stamp changes, checksum changes, or size changes. You can even use monit to monitor remote hosts: monit can ping a remote host and check port connections. Authors: -------- Jan-Henrik Haukeland <hauk at tildeslash dot com> Martin Pala <martin.pala at iol dot cz> Rory Toma <rory at digeo dot com> Christian Hopp <chopp at iei dot tu-clausthal dot de> %debug_package %prep %setup -q -a1 %patch0 cd vendor-files %patch1 %build #autoreconf -fiv export CFLAGS="%{optflags} -fno-strict-aliasing" %configure \ --with-ssl-lib-dir="%{_libdir}" %__make %{?jobs:-j%{jobs}} %install %__make \ BINDIR="%{buildroot}%{_bindir}" \ MANDIR="%{buildroot}%{_mandir}/man1" \ DESTDIR="%{buildroot}" \ install %if 0%{?suse_version} %__install -d \ "%{buildroot}/etc/init.d" \ "%{buildroot}%{_sysconfdir}/monit.d" \ "%{buildroot}%{_sbindir}" \ "%{buildroot}%{_datadir}/monit" \ "%{buildroot}%{_var}/adm/fillup-templates" \ "%{buildroot}%{_var}/lib/monit" \ "%{buildroot}%{_var}/run/monit" %endif %if 0%{?centos_version} || 0%{?rhel_version} || 0%{?fedora_version} || 0%{?sl_version} %__install -d \ "%{buildroot}/etc/init.d" \ "%{buildroot}%{_sysconfdir}/monit.d" \ "%{buildroot}%{_sbindir}" \ "%{buildroot}%{_datadir}/monit" \ "%{buildroot}%{_sysconfdir}/sysconfig" \ "%{buildroot}%{_var}/lib/monit" \ "%{buildroot}%{_var}/run/monit" %endif . vendor-files/sysconfig/monit.tmpl MONIT_BIN="%{_bindir}/monit" MONIT_MODIFY_INITTAB="%{_datadir}/monit/monit-modifyinittab" MONIT_PID_FILE="%{_var}/run/monit/monit.pid" MONIT_SYSCONFIG_FILE="/etc/sysconfig/monit" MONIT_INITTAB_STATE_FILE="%{_var}/lib/monit/monit-inittab.state" MONIT_ARGS="-p ${MONIT_PID_FILE} -s %{_var}/run/monit/monit.state" MONIT_EVENTQUE_DIR="%{_var}/lib/monit" %__sed -e "s|%{_var}/monit|${MONIT_EVENTQUE_DIR}|g" \ < monitrc > "%{buildroot}%{_sysconfdir}/monitrc" pushd vendor-files for templatefile in docu/README tools/monit-modifyinittab init/monit sysconfig/monit; do %__sed \ -e "s|__MONIT_RC_FILE__|${MONIT_RC_FILE}|g" \ -e "s|__MONIT_INITTAB_BASE__|${MONIT_INITTAB_BASE}|g" \ -e "s|__MONIT_INITTAB_COMMENT__|${MONIT_INITTAB_COMMENT}|g" \ -e "s|__MONIT_INITTAB_STATE_FILE__|${MONIT_INITTAB_STATE_FILE}|g" \ -e "s|__MONIT_ARGS__|${MONIT_ARGS}|g" \ -e "s|__MONIT_BIN__|${MONIT_BIN}|g" \ -e "s|__MONIT_MODIFY_INITTAB__|${MONIT_MODIFY_INITTAB}|g" \ -e "s|__MONIT_PID_FILE__|${MONIT_PID_FILE}|g" \ -e "s|__MONIT_SYSCONFIG_FILE__|${MONIT_SYSCONFIG_FILE}|g" \ < "${templatefile}.tmpl" \ > "${templatefile}" done popd # vendor-files %if 0%{?suse_version} %__install -m0754 vendor-files/init/monit %{buildroot}/etc/init.d/monit %endif %if 0%{?centos_version} || 0%{?rhel_version} || 0%{?fedora_version} || 0%{?sl_version} %__install -m0754 system/startup/rc.monit %{buildroot}/etc/init.d/monit %endif %__ln_s ../../etc/init.d/monit %{buildroot}/usr/sbin/rcmonit %__install -m0754 vendor-files/tools/monit-modifyinittab %{buildroot}%{_datadir}/monit/ %if 0%{?suse_version} %__install -m0644 vendor-files/sysconfig/monit %{buildroot}%{_var}/adm/fillup-templates/sysconfig.monit %endif %if 0%{?centos_version} || 0%{?rhel_version} || 0%{?fedora_version} || 0%{?sl_version} %__install -m0644 vendor-files/sysconfig/monit %{buildroot}%{_sysconfdir}/sysconfig/monit %endif touch %{buildroot}%{_var}/lib/monit/monit-inittab.state touch %{buildroot}%{_var}/run/monit/monit.{pid,state} %__install -m0644 vendor-files/docu/README README.SUSE %post %if 0%{?suse_version} %{fillup_and_insserv} %endif %preun %if 0%{?suse_version} %{stop_on_removal monit} %endif %postun %if 0%{?suse_version} %{restart_on_update monit} %{insserv_cleanup} %endif %clean %__rm -rf "%{buildroot}" %files %defattr(-,root,root) %doc CHANGES COPYING README* doc %attr(0600,root,root) %config(noreplace) %{_sysconfdir}/monitrc %dir %{_sysconfdir}/monit.d %attr(0754,root,root) %config /etc/init.d/monit %{_sbindir}/rcmonit %{_bindir}/monit %dir %{_datadir}/monit %{_datadir}/monit/monit-modifyinittab %if 0%{?suse_version} %{_var}/adm/fillup-templates/sysconfig.monit %endif %if 0%{?centos_version} || 0%{?rhel_version} || 0%{?fedora_version} || 0%{?sl_version} %{_sysconfdir}/sysconfig/monit %endif %dir %{_var}/lib/monit %ghost %{_var}/lib/monit/monit-inittab.state %dir %{_var}/run/monit %ghost %{_var}/run/monit/monit.pid %ghost %{_var}/run/monit/monit.state %doc %{_mandir}/man1/monit.1* %changelog