summaryrefslogtreecommitdiffstats
path: root/source/a/smartmontools
diff options
context:
space:
mode:
Diffstat (limited to 'source/a/smartmontools')
-rw-r--r--source/a/smartmontools/doinst.sh13
-rw-r--r--source/a/smartmontools/slack-desc19
-rwxr-xr-xsource/a/smartmontools/smartmontools.SlackBuild78
3 files changed, 110 insertions, 0 deletions
diff --git a/source/a/smartmontools/doinst.sh b/source/a/smartmontools/doinst.sh
new file mode 100644
index 000000000..82f0ac136
--- /dev/null
+++ b/source/a/smartmontools/doinst.sh
@@ -0,0 +1,13 @@
+#!/bin/sh
+config() {
+ NEW="$1"
+ OLD="`dirname $NEW`/`basename $NEW .new`"
+ # If there's no config file by that name, mv it over:
+ if [ ! -r $OLD ]; then
+ mv $NEW $OLD
+ elif [ "`cat $OLD | md5sum`" = "`cat $NEW | md5sum`" ]; then # toss the redundant copy
+ rm $NEW
+ fi
+ # Otherwise, we leave the .new copy for the admin to consider...
+}
+config etc/smartd.conf.new
diff --git a/source/a/smartmontools/slack-desc b/source/a/smartmontools/slack-desc
new file mode 100644
index 000000000..ce462947f
--- /dev/null
+++ b/source/a/smartmontools/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|' on
+# the right side marks the last column you can put a character in. You must make
+# exactly 11 lines for the formatting to be correct. It's also customary to
+# leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+smartmontools: smartmontools (hard drive monitoring utilities)
+smartmontools:
+smartmontools: SMARTMONTOOLS contains utilities that control and monitor storage
+smartmontools: devices using the Self-Monitoring, Analysis and Reporting Technology
+smartmontools: (S.M.A.R.T.) system build into ATA and SCSI Hard Drives. This is used
+smartmontools: to check the reliability of the hard drive and to predict drive
+smartmontools: failures. SMARTMONTOOLS Version 5.x is designed to comply to the
+smartmontools: ATA/ATAPI-5 specification (Revision 1). Future releases of
+smartmontools: SMARTMONTOOLS (Versions 6.x and 7.x) will comply with the ATA/ATAPI-6
+smartmontools: and ATA/ATAPI-7 specifications.
+smartmontools:
diff --git a/source/a/smartmontools/smartmontools.SlackBuild b/source/a/smartmontools/smartmontools.SlackBuild
new file mode 100755
index 000000000..fd4fcf35b
--- /dev/null
+++ b/source/a/smartmontools/smartmontools.SlackBuild
@@ -0,0 +1,78 @@
+#!/bin/sh
+
+# Copyright 2008, 2009 Patrick J. Volkerding, Sebeka, Minnesota, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+VERSION=5.38
+ARCH=${ARCH:-x86_64}
+BUILD=${BUILD:-1}
+
+if [ "$ARCH" = "x86_64" ]; then
+ LIBDIRSUFFIX="64"
+else
+ LIBDIRSUFFIX=""
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=/tmp/package-smartmontools
+
+rm -rf $PKG
+mkdir -p $TMP $PKG
+
+cd $TMP
+rm -rf smartmontools-$VERSION
+tar xvf $CWD/smartmontools-$VERSION.tar.*
+cd smartmontools-$VERSION
+chown -R root:root .
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --mandir=/usr/man \
+ --sysconfdir=/etc \
+ $ARCH-slackware-linux
+make
+make install DESTDIR=$PKG
+# Not used on Slackware:
+rm -rf $PKG/etc/rc.d
+mv $PKG/etc/smartd.conf $PKG/etc/smartd.conf.new
+gzip -9 $PKG/usr/man/man?/*.?
+mv $PKG/usr/share/doc $PKG/usr
+rmdir $PKG/usr/share
+rm -f $PKG/usr/doc/smartmontools-$VERSION/CHANGELOG \
+ $PKG/usr/doc/smartmontools-$VERSION/smartd.conf
+( cd $PKG
+ find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+ find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+)
+mkdir -p $PKG/install
+zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+# Build the package:
+cd $PKG
+makepkg -l y -c n $TMP/smartmontools-$VERSION-$ARCH-$BUILD.txz
+
+# Clean up the extra stuff:
+if [ "$1" = "--cleanup" ]; then
+ rm -rf $TMP/smartmontools-$VERSION
+ rm -rf $PKG
+fi