smartmontools.spec 3.69 KB
Newer Older
1
Release:  9
2
3
4
5
6
Summary:	SMARTmontools - for monitoring S.M.A.R.T. disks and devices
Name:		smartmontools
Version:	5.0
License:	GPL
Group:		Applications/System
7
Source0:	%{name}-%{version}.tar.gz
8
9
10
11
12
13
14
15
URL:            http://smartmontools.sourceforge.net/
Prereq:		/sbin/chkconfig
BuildRoot:	%{_builddir}/%{name}-%{version}-root
Obsoletes:	smartctl
Obsoletes:      smartd
Obsoletes:	ucsc-smartsuite
Obsoletes:      smartsuite

16
17
18
# SOURCE CODE CAN BE FOUND AT:
# http://telia.dl.sourceforge.net/sourceforge/smartmontools/smartmontools-%{version}-%{release}.tar.gz

19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# Copyright (C) 2002 Bruce Allen <smartmontools-support@lists.sourceforge.net>
# Home page: http://smartmontools.sourceforge.net
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the Free
# Software Foundation; either version 2, or (at your option) any later
# version.
# 
# You should have received a copy of the GNU General Public License (for
# example COPYING); if not, write to the Free Software Foundation, Inc., 675
# Mass Ave, Cambridge, MA 02139, USA.
#
# This code was originally developed as a Senior Thesis by Michael Cornwell
# at the Concurrent Systems Laboratory (now part of the Storage Systems
# Research Center), Jack Baskin School of Engineering, University of
# California, Santa Cruz. http://ssrc.soe.ucsc.edu/


%description
SMARTmontools controls and monitors storage devices using
the Self-Monitoring, Analysis and Reporting Technology System
(S.M.A.R.T.) built into ATA and SCSI Hard Drives. This is used to
check the reliability of the hard drive and to predict drive
failures. The suite is derived from the smartsuite package, and
contains two utilities.  The first, smartctl, is a command line
44
45
46
47
48
49
50
utility designed to perform simple S.M.A.R.T. tasks. The second,
smartd, is a daemon that periodically monitors smart status and
reports errors to syslog.  The package is compatible with the
ATA/ATAPI-5 specification.  Future releases will be compatible with
the ATA/ATAPI-6 andATA/ATAPI-7 specifications.  The package is
intended to incorporate as much "vendor specific" and "reserved"
information as possible about disk drives.  man smartctl and man
51
52
53
54
55
56
smartd will provide more information. This RPM file is compatible with
all RedHat releases back to at least 6.2 and should work OK on any
modern linux distribution.  The most recent versions of this package
and additional information can be found at the URL:
http://smartmontools.sourceforge.net/

57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76

# The following sections are executed by the SRPM file
%prep

%setup -q

%build
make

%install
rm -rf $RPM_BUILD_ROOT
make DESTDIR=$RPM_BUILD_ROOT install

%files
%defattr(-,root,root)
/usr/sbin/smartd
/usr/sbin/smartctl
/etc/rc.d/init.d/smartd
%doc %attr(644,root,root) /usr/share/man/man8/smartctl.8.gz
%doc %attr(644,root,root) /usr/share/man/man8/smartd.8.gz
77
%doc CHANGELOG COPYING TODO README VERSION
78
79
80

%clean
rm -rf $RPM_BUILD_ROOT
ballen4705's avatar
ballen4705 committed
81
rm -rf %{_builddir}/%{name}-%{version}
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102

# The following are executed only by the binary RPM at install/uninstall

%post
if [ -f /var/lock/subsys/smartd ]; then
        /etc/rc.d/init.d/smartd restart 1>&2
	echo "Restarted smartd services"
else
        echo "Run \"/etc/rc.d/init.d/smartd start\" to start smartd service now."
	echo "Run \"/sbin/chkconfig --add smartd\", to start smartd service on system boot"
fi

%preun
if [ -f /var/lock/subsys/smartd ]; then
        /etc/rc.d/init.d/smartd stop 1>&2
	echo "Stopping smartd services"
fi
/sbin/chkconfig --del smartd

%define date	%(echo `LC_ALL="C" date +"%a %b %d %Y"`)
%changelog
ballen4705's avatar
ballen4705 committed
103
* %{date} Bruce Allen smartmontools-support@lists.sourceforge.net
104
105
Initial release.  Code is derived from smartsuite, and is
   intended to be compatible with the ATA/ATAPI-5 specifications.