%define name snmppd %define version 0.4.1 %define release 1mdk Summary: SNMP proxy daemon Name: %{name} Version: %{version} Release: %{release} License: GPL Group: System/Servers URL: http://slava.local.nsys.by/projects/snmppd/ Source0: %{name}-%{version}.tar.bz2 Source1: %{name}.init.bz2 Patch0: snmppd-0.4.1-net-snmp.patch.bz2 BuildRequires: libnet-snmp50-devel openssl-devel Requires: libnet-snmp50 net-snmp-mibs nagios nagios-plugins PreReq: rpm-helper BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot %description snmppd is an SNMP proxy daemon that is designed to work with Nagios. It loads MIBs upon startup, listens on a TCP socket for SNMP GET requests, polls the specified host, and returns the value to caller process. The caller process is usually the Nagios plugin check_snmpp. %prep %setup -q %patch0 -p0 %build libtoolize --copy --force; autoconf ./configure \ --prefix=%{_prefix} \ --exec-prefix=%{_exec_prefix} \ --bindir=%{_bindir} \ --sbindir=%{_sbindir} \ --sysconfdir=%{_sysconfdir} \ --datadir=%{_datadir} \ --includedir=%{_includedir} \ --libdir=%{_libdir}/nagios/plugins \ --libexecdir=%{_libdir}/nagios/plugins \ --localstatedir=%{_localstatedir} \ --sharedstatedir=%{_sharedstatedir} \ --mandir=%{_mandir} \ --infodir=%{_infodir} \ --with-snmp=%{_prefix} %make %install [ "%{buildroot}" != "/" ] && rm -rf %{buildroot} make install DESTDIR=%{buildroot} install -d %{buildroot}%{_initrddir} bzcat %{SOURCE1} > %{buildroot}%{_initrddir}/snmppd chmod 755 %{buildroot}%{_initrddir}/snmppd # clean up rm -rf %{buildroot}%{_includedir} %post %_post_service snmppd %preun %_preun_service snmppd %clean [ "%{buildroot}" != "/" ] && rm -rf %{buildroot} %files %defattr(-,root,root) %doc AUTHORS ChangeLog README TODO %attr(755,root,root) %config(noreplace) %{_initrddir}/snmppd %{_sbindir}/snmppd %{_libdir}/nagios/plugins/check_snmpp %changelog * Tue Feb 11 2003 Oden Eriksson <oden.eriksson@kvikkjokk.net> 0.4.1-1mdk - initial cooker contrib - added S1 and P0