Blob Blame History Raw
Name:           cpqarrayd
Version:        2.3        
Release:        16%{?dist}
Summary:        Software for monitoring HP(Compaq) arraycontrollers
Group:          System Environment/Base
License:        GPLv2+
URL:            http://www.strocamp.net/opensource/cpqarrayd.php
Source0:        http://www.strocamp.net/opensource/compaq/downloads/cpqarrayd-2.3.tar.gz
Patch0:         cpqarrayd-2.3.no_ida.patch
Patch1:         cpqarrayd-2.3.sysVinit.patch
Patch2:		cpqarrayd-2.3-message-overrun.patch

BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildRequires: autoconf, automake
BuildRequires: net-snmp-devel, openssl-devel

Requires(post): chkconfig
Requires(postun): initscripts
Requires(preun): chkconfig
Requires(preun): initscripts

%description
Cpqarrayd is a daemon to monitor HP (compaq) arraycontrollers. It reports any 
status changes, like failing disks, to the syslog and optionally to a remote 
host using SNMP traps. Note that support for the old(?) IDA Arrays have been 
disabled in this package due to build issues and lack of testing hardware.

%prep
%setup -q
%patch0 -p1 -b .no_ida
%patch1 -p1 -b .sysVinit
%patch2 -p1 -b .message-overrun

%build
autoreconf -si
%configure
make %{?_smp_mflags}


%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT
mkdir -p  $RPM_BUILD_ROOT/%{_initrddir}
cp scripts/cpqarrayd $RPM_BUILD_ROOT/%{_initrddir}
mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/sysconfig
cp scripts/cpqarrayd.sysconfig $RPM_BUILD_ROOT/%{_sysconfdir}/sysconfig/cpqarrayd
                                              
%clean
rm -rf $RPM_BUILD_ROOT

%post
/sbin/chkconfig --add cpqarrayd

%preun
if [ $1 = 0 ] ; then
    /sbin/service cpqarrayd stop >/dev/null 2>&1
    /sbin/chkconfig --del cpqarrayd
fi

%postun
if [ "$1" -ge "1" ] ; then
    /sbin/service cpqarrayd condrestart >/dev/null 2>&1 || :
fi

%files
%defattr(-,root,root,-)
%doc AUTHORS ChangeLog DEVEL NEWS README
%_sbindir/cpqarrayd
%config(noreplace) %_sysconfdir/sysconfig/cpqarrayd
%_initrddir/cpqarrayd
%doc %_mandir/man1/cpqarrayd*

%changelog
* Mon Jul 11 2011 David Juran <djuran@redhat.com> - 2.3-16
- rebuild for new net-snmp

* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.3-15
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild

* Fri Oct 29 2010 David Juran <djuran@redhat.com> - 2.3-14
- rebuild for new libnetsnmp

* Tue Nov 17 2009 David Juran <djuran@redhat.com> - 2.3-13
- rebuild for new libnetsnmp

* Wed Sep  9 2009 David Juran <david@juran.se> - 2.3-12
- fix message overrun (Bz 516657)

* Fri Aug 21 2009 Tomas Mraz <tmraz@redhat.com> - 2.3-11
- rebuilt with new openssl

* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.3-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild

* Tue Feb 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.3-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild

* Thu Jan 15 2009 Tomas Mraz <tmraz@redhat.com> - 2.3-8
- rebuild with new openssl

* Mon Nov 24 2008 David Juran <djuran@redhat.com> - 2.3-7
- Summary updated

* Fri Jul 18 2008 David Juran <djuran@redhat.com> - 2.3-6
- Add openssl-devel to BuildRequires (neccessary for EL4)

* Fri Jul 18 2008 David Juran <djuran@redhat.com> - 2.3-5
- More tagging sillyness

* Fri Jul 18 2008 David Juran <djuran@redhat.com> - 2.3-4
- Cleanup no-ida patch

* Thu Jul 17 2008  <djuran@redhat.com> - 2.3-3
- fix rpmlint warnings

* Mon Jul 14 2008  <djuran@redhat.com> - 2.3-2
- Make SysVinit script compliant with Fedora Packaging Guidelines

* Wed Jul  9 2008  <djuran@redhat.com> - 2.3-1
- Initial packaging