summaryrefslogtreecommitdiffstats
path: root/testing/smartmontools
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2010-02-03 07:41:11 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2010-02-03 07:41:11 +0000
commit09ce0508afe6568cf580f53fb9952963125fff43 (patch)
treebe336c26f16f7fd1e5c5454738c9332da34fb2d1 /testing/smartmontools
parent9ad548df8aa2a860ca311453ed3d6a98962f32f5 (diff)
downloadaports-09ce0508afe6568cf580f53fb9952963125fff43.tar.bz2
aports-09ce0508afe6568cf580f53fb9952963125fff43.tar.xz
Revert "testing/*: remove from stable branch"
This reverts commit 9ad548df8aa2a860ca311453ed3d6a98962f32f5. I'll delete them one by one.
Diffstat (limited to 'testing/smartmontools')
-rw-r--r--testing/smartmontools/APKBUILD31
-rw-r--r--testing/smartmontools/smartd.confd4
-rw-r--r--testing/smartmontools/smartd.initd43
3 files changed, 78 insertions, 0 deletions
diff --git a/testing/smartmontools/APKBUILD b/testing/smartmontools/APKBUILD
new file mode 100644
index 00000000..8ba05087
--- /dev/null
+++ b/testing/smartmontools/APKBUILD
@@ -0,0 +1,31 @@
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=smartmontools
+pkgver=5.38
+pkgrel=0
+pkgdesc="Control and monitor S.M.A.R.T. enabled ATA and SCSI Hard Drives."
+url="http://smartmontools.sourceforge.net"
+license="GPL"
+depends=
+makedepends=
+subpackages="$pkgname-doc"
+source="http://downloads.sourceforge.net/sourceforge/$pkgname/$pkgname-$pkgver.tar.gz
+ smartd.initd
+ smartd.confd
+ "
+
+build() {
+ cd "$srcdir"/$pkgname-$pkgver
+ ./configure --prefix=/usr --sysconfdir=/etc
+ make || return 1
+}
+
+package() {
+ cd "$srcdir"/$pkgname-$pkgver
+ make DESTDIR="$pkgdir"/ install
+ rm -r "$pkgdir"/etc/rc.d
+ install -Dm755 ../smartd.initd "$pkgdir"/etc/init.d/smartd
+ install -Dm644 ../smartd.confd "$pkgdir"/etc/conf.d/smartd
+}
+md5sums="a282846532ecbd6b4a28072373b3a70b smartmontools-5.38.tar.gz
+64e6fc908146b885aa3f88796edf72f3 smartd.initd
+371cdb7cc9dc924b6d12224d66b193c6 smartd.confd"
diff --git a/testing/smartmontools/smartd.confd b/testing/smartmontools/smartd.confd
new file mode 100644
index 00000000..4b7db4df
--- /dev/null
+++ b/testing/smartmontools/smartd.confd
@@ -0,0 +1,4 @@
+# /etc/conf.d/smartd: config file for /etc/init.d/smartd
+
+# Insert any other options needed
+SMARTD_OPTS=""
diff --git a/testing/smartmontools/smartd.initd b/testing/smartmontools/smartd.initd
new file mode 100644
index 00000000..560e17d6
--- /dev/null
+++ b/testing/smartmontools/smartd.initd
@@ -0,0 +1,43 @@
+#!/sbin/runscript
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/smartmontools/files/smartd.rc,v 1.8 2009/10/11 00:43:58 vapier Exp $
+
+depend() {
+ need localmount
+ after bootmisc
+}
+
+opts="${opts} reload"
+
+checkconfig() {
+ if [ ! -f "/etc/smartd.conf" ] ; then
+ eerror "You should setup your /etc/smartd.conf file!"
+ eerror "See the smartd.conf(5) manpage."
+ return 1
+ fi
+ return 0
+}
+
+start() {
+ checkconfig || return 1
+
+ ebegin "Starting S.M.A.R.T. monitoring daemon"
+ start-stop-daemon --start --exec /usr/sbin/smartd \
+ --pidfile /var/run/smartd.pid \
+ -- -p /var/run/smartd.pid ${SMARTD_OPTS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping S.M.A.R.T. monitoring daemon"
+ start-stop-daemon --stop --exec /usr/sbin/smartd \
+ --pidfile /var/run/smartd.pid
+ eend $?
+}
+
+reload() {
+ ebegin "Reloading configuration"
+ start-stop-daemon --oknodo --stop --signal HUP --pidfile /var/run/smartd.pid smartd
+ eend $?
+}