c4cbeb9
Summary:	Tools for monitoring SMART capable hard disks
c842d3d
Name:		smartmontools
c842d3d
Version:	5.33
d7e97a1
Release: 	4
1dbcbdf
Epoch:		1
c842d3d
Group:		System Environment/Base
c842d3d
License:	GPL
c4cbeb9
URL:		http://smartmontools.sourceforge.net/
c4cbeb9
Source0:	http://dl.sourceforge.net/sourceforge/%{name}/%{name}-%{version}.tar.gz
93c1823
Source1:	smartd.initd
93c1823
Source2:	smartd-conf.py
c4cbeb9
BuildRoot:	%{_tmppath}/%{name}-%{version}-root
c4cbeb9
PreReq:		/sbin/chkconfig /sbin/service
93c1823
Requires:	fileutils kudzu
c4cbeb9
BuildRequires: 	readline-devel ncurses-devel /usr/bin/aclocal /usr/bin/automake /usr/bin/autoconf util-linux groff gettext
93c1823
Obsoletes:	kernel-utils
4a4cf3e
ExclusiveArch:	i386 x86_64 ia64 ppc ppc64
93c1823
93c1823
%description
c842d3d
The smartmontools package contains two utility programs (smartctl
c842d3d
and smartd) to control and monitor storage systems using the Self-
c842d3d
Monitoring, Analysis and Reporting Technology System (SMART) built
c842d3d
into most modern ATA and SCSI hard disks. In many cases, these 
c842d3d
utilities will provide advanced warning of disk degradation and
c842d3d
failure.
93c1823
93c1823
%prep
c4cbeb9
%setup -q
93c1823
93c1823
%build
93c1823
%configure
c4cbeb9
make CFLAGS="$RPM_OPT_FLAGS -fpie" LDFLAGS="-pie -Wl,-z,relro,-z,now"
93c1823
93c1823
%install
c4cbeb9
rm -rf $RPM_BUILD_ROOT
c4cbeb9
make DESTDIR=$RPM_BUILD_ROOT install
93c1823
c4cbeb9
rm -f $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/smartd.conf
c4cbeb9
rm -f examplescripts/Makefile*
c4cbeb9
install -D -m 755 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/smartd
c4cbeb9
install -D -m 755 %{SOURCE2} $RPM_BUILD_ROOT%{_sbindir}/smartd-conf.py
93c1823
93c1823
%clean
c4cbeb9
rm -rf $RPM_BUILD_ROOT
93c1823
93c1823
%files
93c1823
%defattr(-,root,root)
c4cbeb9
%doc AUTHORS CHANGELOG COPYING INSTALL NEWS README
c4cbeb9
%doc TODO WARNINGS examplescripts smartd.conf
c4cbeb9
%{_sbindir}/smartd
c4cbeb9
%{_sbindir}/smartctl
c4cbeb9
%{_sbindir}/smartd-conf.py*
c4cbeb9
%{_sysconfdir}/rc.d/init.d/smartd
c4cbeb9
%{_mandir}/man?/smart*.*
c4cbeb9
%ghost %verify(not md5 size mtime) %config(noreplace,missingok) %{_sysconfdir}/smartd.conf
93c1823
93c1823
%preun
93c1823
if [ "$1" = "0" ] ; then
93c1823
 /sbin/service smartd stop
93c1823
 /sbin/chkconfig --del smartd
93c1823
fi
93c1823
93c1823
%post
93c1823
/sbin/chkconfig --add smartd
93c1823
46405b8
%triggerpostun -- kernel-utils
46405b8
/sbin/chkconfig --add smartd
46405b8
exit 0
46405b8
46405b8
93c1823
%changelog
d7e97a1
* Fri Dec 16 2005 Tomas Mraz <tmraz@redhat.com> 1:5.33-4
d7e97a1
- mail should be sent to root not root@localhost (#174252)
70c54dd
396edfa
* Fri Nov 25 2005 Tomas Mraz <tmraz@redhat.com> 1:5.33-3
396edfa
- add libata disks with -d ata if the libata version
396edfa
  is new enough otherwise do not add them (#145859, #174095)
396edfa
c4cbeb9
* Thu Nov  3 2005 Tomas Mraz <tmraz@redhat.com> 1:5.33-2
c4cbeb9
- Spec file cleanup by Robert Scheck <redhat@linuxnetz.de> (#170959)
c4cbeb9
- manual release numbering
c4cbeb9
- remove bogus patch of non-installed file
c4cbeb9
- only non-removable drives should be added to smartd.conf
c4cbeb9
- smartd.conf should be owned (#171498)
c4cbeb9
57394e3
* Tue Oct 25 2005 Dave Jones <davej@redhat.com>
57394e3
- Add comments to generated smartd.conf (#135397)
57394e3
c9877c5
* Thu Aug 04 2005 Karsten Hopp <karsten@redhat.de>
c9877c5
- package all python files
c9877c5
269a99e
* Tue Mar  1 2005 Dave Jones <davej@redhat.com>
269a99e
- Rebuild for gcc4
269a99e
4a4cf3e
* Wed Feb  9 2005 Dave Jones <davej@redhat.com>
4a4cf3e
- Build on PPC32 too (#147090)
4a4cf3e
93c1823
* Sat Dec 18 2004 Dave Jones <davej@redhat.com>
93c1823
- Initial packaging, based upon kernel-utils.
93c1823