--- smartmontools.spec	2003-03-14 13:33:31.000000000 +1300
+++ smartmontools-5.20-2.spec	2003-10-08 14:09:08.000000000 +1300
@@ -1,3 +1,10 @@
+%define name	smartmontools
+%define ver	5.20
+%define rel	2
+%define grp	Hardware/Other
+%define prefix	/usr
+%define susever	8.2
+
 #
 # spec file for package smartmontools (Version 5.1.4)
 #
@@ -11,48 +18,67 @@
 # neededforbuild  
 # usedforbuild    aaa_base acl attr bash bind9-utils bison coreutils cpio cpp cvs cyrus-sasl2 db devs diffutils e2fsprogs file filesystem fillup findutils flex gawk gdbm-devel glibc glibc-devel glibc-locale gpm grep groff gzip info insserv kbd less libacl libattr libgcc libstdc++ libxcrypt m4 make man mktemp modutils ncurses ncurses-devel net-tools netcfg pam pam-devel pam-modules patch permissions ps rcs readline sed sendmail shadow strace syslogd sysvinit tar texinfo timezone unzip util-linux vim zlib zlib-devel autoconf automake binutils bzip2 cracklib gcc gdbm gettext libtool perl rpm
 
-Name:         smartmontools
+Summary:	Monitor of S.M.A.R.T. disks and devices
+Name:		%{name}
+Version:	%{ver}
+Release:	%{rel}
+Group:		%{grp}
+Packager:	Volker Kuhlmann <VolkerKuhlmann@gmx.de>
+Distribution:	SuSE Linux %{susever} contrib
+BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-%(id -u -n)
+
 License:      GPL
-Group:        Hardware/Other
 Autoreqprov:  on
-Version:      5.1.4
-Release:      20
-%define version_string 5.1-4
-Source0:      %{name}-%{version_string}.tar.bz2
+Source0:      %{name}-%{ver}.tar.gz
 Source1:      smartd.init
 Source2:      smartd.conf
 PreReq:       %insserv_prereq %fillup_prereq
 URL:          http://smartmontools.sourceforge.net/
-BuildRoot:    %{_tmppath}/%{name}-%{version}-build
-Summary:      Monitor of 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 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 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 smartd will provide more information.
+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 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 smartd will provide more
+information.  The most recent versions of this package and additional
+information can be found at the URL:
+http://smartmontools.sourceforge.net/
 
 Authors:
 --------
     Bruce Allen <smartmontools-support@lists.sourceforge.net>
 
 %prep
-%setup -n %{name}-%{version_string}
-for i in README Makefile smartd.8 smartd.conf.5 ; do sed 's@/etc/rc.d/init.d/smartd st@/usr/sbin/rcsmartd st@g;s@/etc/rc\.d/init\.d@/etc/init.d@g;/boot/,/add smartd/s/using the command/YaST Runlevel Editor or by &/;s@/usr/share/doc/smartmontools-[0-9.]*@/usr/share/doc/packages/smartmontools@;s@^/etc/smartd.conf.example@/etc/smartd.conf@' <$i >$i~ ; mv $i~ $i ; done
+%setup -q
+for i in README Makefile.in Makefile.am smartd.8 smartd.conf.5 ; do
+  sed 's@/etc/rc.d/init.d/smartd st@/usr/sbin/rcsmartd st@g;s@/etc/rc\.d/init\.d@/etc/init.d@g;/boot/,/add smartd/s/using the command/YaST Runlevel Editor or by &/;s@/usr/share/doc/smartmontools-[0-9.]*@/usr/share/doc/packages/smartmontools@;s@^/etc/smartd.conf.example@/etc/smartd.conf@' <$i >$i~
+  mv $i~ $i
+done
+
+%build
+aclocal
+touch ChangeLog	# or else: Makefile.am: required file `./ChangeLog' not found
+automake
+autoconf
+./configure \
+	--prefix=%{prefix} \
+	--sysconfdir=/etc \
+	--mandir=%{prefix}/share/man \
+	--with-initscriptdir=/etc/init.d \
+	--with-docdir=%{prefix}/share/doc/packages/smartmontools
 make
 
 %install
-rm -rf $RPM_BUILD_ROOT
+test "$RPM_BUILD_ROOT" != "/" -a -d "$RPM_BUILD_ROOT" \
+	&& rm -rf "$RPM_BUILD_ROOT"
 mkdir -p $RPM_BUILD_ROOT/etc/init.d
 make DESTDIR=$RPM_BUILD_ROOT install
 cp %{SOURCE1} $RPM_BUILD_ROOT/etc/init.d/smartd
@@ -67,17 +93,21 @@
 %{insserv_cleanup -n smartd}
 
 %clean
-rm -rf $RPM_BUILD_ROOT
+test "$RPM_BUILD_ROOT" != "/" -a -d "$RPM_BUILD_ROOT" \
+	&& rm -rf "$RPM_BUILD_ROOT"
 
 %files
 %defattr(-, root, root)
-%doc /usr/share/doc/packages/smartmontools
+%doc %{prefix}/share/doc/packages/smartmontools
 %config(noreplace) /etc/*.conf
 /usr/sbin/*
 /usr/share/man/man*/*
 /etc/init.d/*
 
 %changelog -n smartmontools
+* Wed Oct 08 2003 - Volker Kuhlmann <VolkerKuhlmann@gmx.de>
+- Package available from: http://volker.dnsalias.net/soft/
+- for SuSE 8.2
 * Mon Jan 27 2003 - sbrabec@suse.cz
 - Updated to version 5.1.4.
 * Mon Jan 13 2003 - sbrabec@suse.cz

