summaryrefslogtreecommitdiff
path: root/smartsuite.spec
blob: c6979bab3b9f1b2236378d7465cbb6e80e601ea2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
Summary:	UCSC SMART suite - S.M.A.R.T. utility for Linux
Summary(pl):	UCSC SMART suite - obsługa S.M.A.R.T. dla Linuksa
Summary(pt_BR): Conjunto de utilitários SMART para Linux
Name:		smartsuite
Version:	2.1
Release:	3
License:	GPL
Group:		Applications/System
Source0:	http://dl.sourceforge.net/smartsuite/%{name}-%{version}.tar.gz
Source1:	%{name}.init
URL:		http://csl.cse.ucsc.edu/smart.shtml
PreReq:		rc-scripts
Requires(post,preun):	/sbin/chkconfig
BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
Obsoletes:	smartctl
Obsoletes:	ucsc-smartsuite

%description
UCSC SMART suite controls and monitors storage devices uning the
Self-Monitoring, Analysis and Reporting Technology System (S.M.A.R.T.)
build into ATA and SCSI Hard Drives. This is used to check the
reliability of the hard drive and predict drive failures. The suite
contents two utilities, smartctl is a command line utility designed to
perform simple S.M.A.R.T. tasks. And smartd is a daemon that
periodically monitors smart status and reports errors to syslog.

%description -l pl
USCS SMART suite służy do kontroli i monitorowania urządzeń z systemem
S.M.A.R.T., takich jak dyski ATA i SCSI. System ten pozwala określać
wiarygodność dysków i przewidywać awarie. Pakiet zawiera dwa programy:
smartctl (obsługiwany z linii poleceń) i smartd (demon regularnie
monitorujący stan dysków).

%description -l pt_BR
SMART suite controla e monitora dispositivos de armazenamento usando o
sistema de auto-monitoraçăo e análise existente em discos rígidos ATA e
SCSI. Esse sistema é utilizado para verificar a confiabilidade do disco
e prever falhas no equipamento.

%prep
%setup -q

%build
%{__make} CC="%{__cc}" CFLAGS="%{rpmcflags} -fsigned-char -DLINUX"

%install
rm -rf $RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT{%{_sbindir},%{_mandir}/man8} \
	$RPM_BUILD_ROOT/etc/rc.d/init.d

install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/smartd
install smartd smartctl $RPM_BUILD_ROOT%{_sbindir}
install smartd.8 smartctl.8 $RPM_BUILD_ROOT%{_mandir}/man8

%clean
rm -rf $RPM_BUILD_ROOT

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

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

%files
%defattr(644,root,root,755)
%doc CHANGELOG README TODO
%attr(755,root,root) %{_sbindir}/*
%attr(754,root,root) /etc/rc.d/init.d/smartd
%{_mandir}/man8/*