Search
j0ke.net Open Build Service
>
Projects
>
stresslinux
>
smartmontools
> smartmontools.spec
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File smartmontools.spec of Package smartmontools (Revision 13)
Currently displaying revision
13
,
show latest
# # spec file for package smartmontools (Version 5.38) # # norootforbuild Name: smartmontools License: GPL v2 or later Group: Hardware/Other Version: 5.38.99 Release: 1 #Source: %{name}-%{version}.tar.bz2 Source: sm5-svn20090801.tar.bz2 Source1: README.SATA Patch: smartmontools-powersave-notify.patch Patch1: smartmontools-stresslinux-init-script.patch PreReq: %insserv_prereq %fillup_prereq coreutils %if 0%{?suse_version} > 1000 Requires: powersave %endif %if 0%{?suse_version} > 1020 Requires: licenses BuildRequires: licenses %endif %if 0%{?suse_version} < 1000 BuildRequires: kernel-source %endif Url: http://smartmontools.sourceforge.net/ BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: gcc-c++ libstdc++-devel Summary: Monitor for S.M.A.R.T. Disks and Devices Obsoletes: smartctl smartd ucsc-smartsuite smartsuite %description SMARTmontools controls and monitors storage devices using the Self-Monitoring, Analysis, and Reporting Technology System (S.M.A.R.T.) built into ATA, SATA and SCSI Hard Drives. This is used to check the hard drive reliability and to predict drive failures. The suite contains two utilities. The first, smartctl, is a command line utility designed to perform simple S.M.A.R.T. tasks. The second, smartd, is a daemon that periodically monitors the smart status and reports errors to syslog. The package is compatible with the ATA/ATAPI-3 to -7 specification. The package is intended to incorporate as much "vendor specific" and "reserved" information as possible about disk drives. The commands man smartctl and man smartd will provide more information. Authors: -------- Bruce Allen <smartmontools-support@lists.sourceforge.net> %prep %setup -q -n sm5 cp -a %{S:1} . %if 0%{?suse_version} > 1000 %patch %endif %patch1 %build ./autogen.sh %if 0%{?suse_version} >= 1000 export CFLAGS="$RPM_OPT_FLAGS -fPIE" export CXXFLAGS="$RPM_OPT_FLAGS -fPIE" export LDFLAGS="-pie" %else # glibc header linux/cciss_ioctl.h is broken and outdated in SLES9 (#302136). Let's use the one from kernel: export CPPFLAGS=-I/usr/src/linux/include %endif %configure\ --with-docdir=%{_defaultdocdir}/%{name} make %{?jobs:-j%jobs} %install %makeinstall mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/init.d cp smartd.initd $RPM_BUILD_ROOT%{_sysconfdir}/init.d/smartd chmod +x $RPM_BUILD_ROOT%{_sysconfdir}/init.d/smartd ln -s ../..%{_sysconfdir}/init.d/smartd $RPM_BUILD_ROOT%{_sbindir}/rcsmartd %if 0%{?suse_version} > 1000 mkdir -p $RPM_BUILD_ROOT%{_prefix}/lib/smartmontools cp examplescripts/Example4 $RPM_BUILD_ROOT%{_prefix}/lib/smartmontools/smart-notify chmod +x $RPM_BUILD_ROOT%{_prefix}/lib/smartmontools/smart-notify %endif mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/default echo '#smartd_opts=""' >$RPM_BUILD_ROOT%{_sysconfdir}/default/smartmontools %if 0%{?suse_version} < 1010 cp README.SATA $RPM_BUILD_ROOT%{_datadir}/doc/packages/%{name}/ %endif #remove installed files we don't want to package rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/ %if 0%{?suse_version} > 1020 ln -sf %{_datadir}/doc/licenses/md5/$(md5sum COPYING | sed 's/ .*//') $RPM_BUILD_ROOT%{_docdir}/%{name}/COPYING %endif %clean rm -rf $RPM_BUILD_ROOT %pre # Older SuSE versions (<=10.2) don't do restart on update. Test it and set flag. # This file exists since smartmontools-5.37: if ! test -f usr/share/doc/packages/smartmontools/examplescripts/Example4 ; then touch var/adm/smartd_needs_restart fi %post %if 0%{?suse_version} < 1010 # With some broken drivers in older kernels, smartd can hang the system. # Don't start it by default. %{fillup_and_insserv -f smartd} %else # Turn smartd on by default. %{fillup_and_insserv -f -Y smartd} %endif # Older SuSE versions (<=10.2) don't do restart on update. Do it now. if test -f var/adm/smartd_needs_restart ; then rm var/adm/smartd_needs_restart %{restart_on_update smartd} fi %preun %{stop_on_removal smartd} %postun %{restart_on_update smartd} %{insserv_cleanup} %files %defattr(-, root, root) %doc %{_docdir}/%{name} %doc %{_mandir}/man*/* %if 0%{?suse_version} > 1000 %{_prefix}/lib/smartmontools %endif %{_sbindir}/* %config(noreplace) %{_sysconfdir}/default/* %{_sysconfdir}/init.d/* %config(noreplace) %{_sysconfdir}/*.conf %changelog * Sat Aug 01 2009 Carsten Schoene <cs@linux-administrator.com> - 5.38.99-1 - update to svn snapshot 2009-01-08 - added patch to support stresslinux in init script * Sat Jul 05 2008 Carsten Schoene <cs@linux-administrator.com> - update to smartmontools 5.38 - removed two patches