Search
j0ke.net Open Build Service
>
Projects
>
server:monitoring
>
monit
> Changes
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
Changes of Revision 6
[-]
[+]
Added
monit.spec
@@ -0,0 +1,157 @@ +# norootforbuild + +%define _prefix /usr + +Name: monit +Version: 4.10 +Release: 0 +Summary: Service Manager and Monitor System +Source: http://www.tildeslash.com/monit/dist/monit-%{version}.tar.gz +Source1: monit-vendor-files.tar.gz +Patch1: monit-page_shift.patch +Patch2: monit-no-strip.patch +Patch3: monit-hz.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 +Obsoletes: monit-beta <= 4.10z +%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 +%patch1 -p1 +%patch2 +%patch3 + +%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" \ + install + +%__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" + +. 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 + +%__install -m0754 vendor-files/init/monit "%{buildroot}/etc/init.d/monit" +%__ln_s ../../etc/init.d/monit "%{buildroot}/usr/sbin/rcmonit" +%__install -m0754 vendor-files/tools/monit-modifyinittab "%{buildroot}%{_datadir}/monit" +%__install -m0644 vendor-files/sysconfig/monit "%{buildroot}%{_var}/adm/fillup-templates/sysconfig.monit" +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 +%{fillup_and_insserv} + +%preun +%{stop_on_removal monit} + +%postun +%{restart_on_update monit} +%{insserv_cleanup} + +%clean +%__rm -rf "%{buildroot}" + +%files +%defattr(-,root,root) +%doc CHANGES.txt CONTRIBUTORS COPYING FAQ.txt LICENSE PLATFORMS README* STATUS UPGRADE.txt doc +%attr(0600,root,root) %config(noreplace) %{_sysconfdir}/monitrc +%dir %{_sysconfdir}/monit.d +%attr(0754,root,root) %config /etc/init.d/monit +/usr/sbin/rcmonit +%{_bindir}/monit +%dir %{_datadir}/monit +%{_datadir}/monit/monit-modifyinittab +%{_var}/adm/fillup-templates/sysconfig.monit +%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 +* Tue Nov 6 2007 Pascal Bleser <guru@unixtech.be> 4.10 +- update to 4.10 + +* Thu Sep 20 2007 Pascal Bleser <guru@unixtech.be> 4.9-0 +- moved to openSUSE Build Service + +* Sat Mar 24 2007 Pascal Bleser <guru@unixtech.be> 4.9-1 +- new package, based on SUSE/Factory's monit source RPM (2007-03-24) + +# Local Variables: +# mode: rpm-spec +# tab-width: 3 +# End: