summaryrefslogtreecommitdiffstats
path: root/abs/extra/smartmontools
diff options
context:
space:
mode:
Diffstat (limited to 'abs/extra/smartmontools')
-rw-r--r--abs/extra/smartmontools/PKGBUILD47
-rw-r--r--abs/extra/smartmontools/__changelog2
-rw-r--r--abs/extra/smartmontools/smartd35
-rw-r--r--abs/extra/smartmontools/smartd.conf1
-rw-r--r--abs/extra/smartmontools/smartmontools.install24
5 files changed, 33 insertions, 76 deletions
diff --git a/abs/extra/smartmontools/PKGBUILD b/abs/extra/smartmontools/PKGBUILD
index fe12bd5..685750d 100644
--- a/abs/extra/smartmontools/PKGBUILD
+++ b/abs/extra/smartmontools/PKGBUILD
@@ -1,28 +1,45 @@
-# $Id: PKGBUILD 6701 2008-07-27 13:29:59Z giovanni $
+# $Id: PKGBUILD 219339 2014-08-05 17:28:35Z giovanni $
# Maintainer: Giovanni Scafora <giovanni@archlinux.org>
# Contributor: Jeff Mickey <jeff@archlinux.org>
# Contributor: Jani Talikka <jani.talikka@gmail.com>
+# Contributor: Ralf Barth <archlinux.org@haggy.org>
pkgname=smartmontools
-pkgver=5.41
+pkgver=6.3
pkgrel=1
-pkgdesc="Control and monitor S.M.A.R.T. enabled ATA and SCSI Hard Drives."
+pkgdesc="Control and monitor S.M.A.R.T. enabled ATA and SCSI Hard Drives"
url="http://smartmontools.sourceforge.net"
license=('GPL')
arch=('i686' 'x86_64')
-depends=('gcc-libs')
-backup=('etc/smartd.conf')
-source=(http://downloads.sourceforge.net/sourceforge/${pkgname}/${pkgname}-${pkgver}.tar.gz)
-install=smartmontools.install
+depends=('gcc-libs' 'libcap-ng' 'bash')
+optdepends=('heirloom-mailx: to get mail alerts to work')
+backup=('etc/smartd.conf'
+ 'etc/conf.d/smartd')
+source=("http://downloads.sourceforge.net/sourceforge/${pkgname}/${pkgname}-${pkgver}.tar.gz"
+ 'smartd.conf')
+md5sums=('2ea0c62206e110192a97b59291b17f54'
+ '28c1b80c41dac52d433961dcfb4f70e0')
-build()
-{
- cd ${srcdir}/${pkgname}-${pkgver}
- ./configure --prefix=/usr --sysconfdir=/etc --includedir=/usr/src/linux-2.6.39-LinHES
- make || return 1
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+
+ ./configure --prefix=/usr \
+ --sbindir=/usr/bin \
+ --sysconfdir=/etc \
+ --enable-drivedb \
+ --with-libcap-ng=yes \
+ --with-systemdsystemunitdir=/usr/lib/systemd/system
+ make
}
+
package() {
- cd ${srcdir}/${pkgname}-${pkgver}
- make DESTDIR=${pkgdir} install
+ cd "${srcdir}/${pkgname}-${pkgver}"
+
+ sed -i -e "s:sysconfig/smartmontools:conf.d/smartd:g" smartd.service
+ sed -i -e "s:smartd_opts:SMARTD_ARGS:g" smartd.service
+
+ make DESTDIR="${pkgdir}" install
+
+ rm -rf ${pkgdir}/etc/rc.d
+ install -Dm644 ${srcdir}/smartd.conf "${pkgdir}/etc/conf.d/smartd"
}
-md5sums=('4577886bea79d4ff12bd9a7d323ce692')
diff --git a/abs/extra/smartmontools/__changelog b/abs/extra/smartmontools/__changelog
deleted file mode 100644
index 8e0d8a6..0000000
--- a/abs/extra/smartmontools/__changelog
+++ /dev/null
@@ -1,2 +0,0 @@
-* remove the rc script. runit script in runit-scripts pkg
-* added smartmontools.install
diff --git a/abs/extra/smartmontools/smartd b/abs/extra/smartmontools/smartd
deleted file mode 100644
index 5fcc414..0000000
--- a/abs/extra/smartmontools/smartd
+++ /dev/null
@@ -1,35 +0,0 @@
-#!/bin/bash
-
- . /etc/rc.conf
- . /etc/rc.d/functions
-
- case "$1" in
-
- start)
- stat_busy "Starting smartd"
- /usr/sbin/smartd &>/dev/null
- if [ $? -ne 0 ]; then
- stat_fail
- else
- add_daemon smartd
- stat_done
- fi
- ;;
-
- stop)
- stat_busy "Stopping smartd"
- kill -9 `pidof /usr/sbin/smartd` &>/dev/null
- rm_daemon smartd
- stat_done
- ;;
-
- restart)
- stat_busy "Restarting smartd ..."
- $0 stop
- $0 start
- stat_done
- ;;
-
- *)
- echo "usage: $0 {start|stop|restart}"
- esac
diff --git a/abs/extra/smartmontools/smartd.conf b/abs/extra/smartmontools/smartd.conf
new file mode 100644
index 0000000..f14870a
--- /dev/null
+++ b/abs/extra/smartmontools/smartd.conf
@@ -0,0 +1 @@
+SMARTD_ARGS=""
diff --git a/abs/extra/smartmontools/smartmontools.install b/abs/extra/smartmontools/smartmontools.install
deleted file mode 100644
index f2baacd..0000000
--- a/abs/extra/smartmontools/smartmontools.install
+++ /dev/null
@@ -1,24 +0,0 @@
-#!/bin/bash
-
-post_install() {
-
- echo ""
- echo "==> Configure your /etc/smart.conf config file and then"
- echo "==> $ sudo add_service.sh smartd"
- echo "==> to start the monitoring service."
-
-}
-
-post_upgrade() {
-
- post_install
-
-}
-
-pre_remove() {
-
- if [ -L /service/smartd ]; then
- remove_service.sh smartd
- fi
-
-}