summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWolfram Schlich <wschlich@gentoo.org>2009-11-21 15:01:55 +0000
committerWolfram Schlich <wschlich@gentoo.org>2009-11-21 15:01:55 +0000
commit80076ad00a13b6847cd1622c9369ee427230c3ba (patch)
tree8f7b2e9a2b90527342016b79ef38bab8274579ae /sys-block
parentalpha/ia64/m68k/s390/sh/sparc stable wrt #284088 (diff)
downloadhistorical-80076ad00a13b6847cd1622c9369ee427230c3ba.tar.gz
historical-80076ad00a13b6847cd1622c9369ee427230c3ba.tar.bz2
historical-80076ad00a13b6847cd1622c9369ee427230c3ba.zip
fix bug #278651
Package-Manager: portage-2.2_rc33/cvs/Linux i686
Diffstat (limited to 'sys-block')
-rw-r--r--sys-block/spindown/ChangeLog9
-rw-r--r--sys-block/spindown/Manifest5
-rw-r--r--sys-block/spindown/files/spindownd.confd-r111
-rw-r--r--sys-block/spindown/files/spindownd.initd-r161
-rw-r--r--sys-block/spindown/spindown-0.4.0-r1.ebuild46
5 files changed, 130 insertions, 2 deletions
diff --git a/sys-block/spindown/ChangeLog b/sys-block/spindown/ChangeLog
index c4a651bde21f..bb183981c717 100644
--- a/sys-block/spindown/ChangeLog
+++ b/sys-block/spindown/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for sys-block/spindown
# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-block/spindown/ChangeLog,v 1.5 2009/09/23 20:33:04 patrick Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-block/spindown/ChangeLog,v 1.6 2009/11/21 15:01:55 wschlich Exp $
+
+*spindown-0.4.0-r1 (21 Nov 2009)
+
+ 21 Nov 2009; Wolfram Schlich <wschlich@gentoo.org>
+ +files/spindownd.confd-r1, +files/spindownd.initd-r1,
+ +spindown-0.4.0-r1.ebuild:
+ fix bug #278651
23 Sep 2009; Patrick Lauer <patrick@gentoo.org> spindown-0.4.0.ebuild:
Remove virtual/libc
diff --git a/sys-block/spindown/Manifest b/sys-block/spindown/Manifest
index 7001823a25d7..2e0e46fef0c4 100644
--- a/sys-block/spindown/Manifest
+++ b/sys-block/spindown/Manifest
@@ -1,7 +1,10 @@
AUX spindown-0.4.0-CFLAGS.patch 432 RMD160 3e08d08669ed504c9020625983da3db4677994a4 SHA1 00a3157b0df842037137e85650478a43dab4de33 SHA256 65ea67e351f89e38361ff8adb8e0316c463e09a99eab1fbbc991a25fc9a259b1
AUX spindownd.confd 360 RMD160 14b2e4d09779d722bb972ba907a0695ab9b7d59e SHA1 ee05aeda29a8421018e135a4820fb5cd1bc5c286 SHA256 19e68b582815183321b8480df62d42c39aef1094b6b49cff0993129e8276c840
+AUX spindownd.confd-r1 270 RMD160 4f8384f6e7cd409839bed5e794c52e16340d72ed SHA1 b75732a6634296037ff657f9ec4eb75d5e8c1f45 SHA256 aa2be7aa60f5483400a4dea50e18007ffee3092113ac5e0188c1dd16ec0ff71e
AUX spindownd.initd 1451 RMD160 bde56e49b7731d6d4041a806206f793620757910 SHA1 f66549c85ac9e69d6b6c82855bbaee08373e923f SHA256 8290daa201d001d759d0d37e0ff68bda5901ac4bb34632f9a5cd3c8dd065998e
+AUX spindownd.initd-r1 1498 RMD160 d868931a192d93da7d2015541b7fb9ff81659804 SHA1 7e2be91ea4f3bff9b698ccbca4737ef251340581 SHA256 98a9575f378ee8cfdf8e25fad12eb958fa29094d546b4abd830feb373b4bec86
DIST spindown-0.4.0.tar.gz 36837 RMD160 65ea951fed9d3ee202330cba99f0f74b06cd6d7f SHA1 b0e3d5348dcfcddcc833354d507b07d9a86a51b5 SHA256 551167e3d0a20cb56d3729ae91cf831a4faae2d1287c7f205bbc2f1d011ec37b
+EBUILD spindown-0.4.0-r1.ebuild 1154 RMD160 acc937badfff6af8a27a79ef5e3737fbbc2a2126 SHA1 ae46f165a1ee22141cd68d528cb47966a8737552 SHA256 ffca9e852ab7ceb41f86d2ca97e0c20b52711231ec1bb25901b15610fa9f0681
EBUILD spindown-0.4.0.ebuild 1144 RMD160 765fd9bb219562070383cc95db76df58e46a3b0a SHA1 978355c7b365321c33a2fde17e41942f757a9987 SHA256 e660028c1ab2302c678c59b63234c6a707e91df31f141e3e85801c3149293836
-MISC ChangeLog 1017 RMD160 7f7c67559c830aafc74598d7a5b1c2721685c853 SHA1 b6608ffdd06b4a7e8125aabf02e43a8a3744d47e SHA256 6179c58d61e790a8fcd20fc1dbcca3cc2db1cbadce067ca77d6a291d76e8d12c
+MISC ChangeLog 1209 RMD160 c1f2dc99a5d39722e732049e14c1f6b44a38e63a SHA1 bee1ed7637245fd734bca501f1901f206015ef03 SHA256 3ee44eae1c883d163ca7af1558e5dfdaa29fc55929106210884b3a807a1acddb
MISC metadata.xml 300 RMD160 3b9c1cd628f9d7ac94b68543ec737d5c2381a47e SHA1 33c5efd31a8aa789118535b921e211ffb5023ac3 SHA256 bc07a9aecce5770d1ace9af0a6c6af8ff6c7b16eb5e7947a1b178d1970855e43
diff --git a/sys-block/spindown/files/spindownd.confd-r1 b/sys-block/spindown/files/spindownd.confd-r1
new file mode 100644
index 000000000000..cc1f37b86ea2
--- /dev/null
+++ b/sys-block/spindown/files/spindownd.confd-r1
@@ -0,0 +1,11 @@
+# spindownd config file
+# default: /etc/spindown.conf
+#SPINDOWND_CFG=/etc/spindown.conf
+
+# spindownd pidfile
+# default: /var/run/spindown.pid
+#SPINDOWND_PID=/var/run/spindown.pid
+
+# spindownd fifo
+# default: /var/run/spindown.fifo
+#SPINDOWND_FIFO=/var/run/spindown.fifo
diff --git a/sys-block/spindown/files/spindownd.initd-r1 b/sys-block/spindown/files/spindownd.initd-r1
new file mode 100644
index 000000000000..7e1b4617d298
--- /dev/null
+++ b/sys-block/spindown/files/spindownd.initd-r1
@@ -0,0 +1,61 @@
+#!/sbin/runscript
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+SPINDOWND_BIN="/usr/sbin/spindownd"
+SPINDOWND_CFG=${SPINDOWND_CFG:-/etc/spindown.conf}
+SPINDOWND_PID=${SPINDOWND_PID:-/var/run/spindown.pid}
+SPINDOWND_FIFO=${SPINDOWND_FIFO:-/var/run/spindown.fifo}
+
+opts="reload"
+
+depend() {
+ need localmount
+ after bootmisc
+}
+
+checkconfig() {
+ # check for config file
+ if [ ! -e "${SPINDOWND_CFG}" ]; then
+ eerror
+ eerror "The spindownd config file (${SPINDOWND_CFG})"
+ eerror "is missing!"
+ eerror
+ return 1
+ fi
+ # check for leftover pidfile
+ if [ -f "${SPINDOWND_PID}" ]; then
+ ewarn
+ ewarn "The spindownd pidfile (${SPINDOWND_PID})"
+ ewarn "exists although the service is not marked as started."
+ ewarn "Will remove the pidfile and start the service in 10s"
+ ewarn "if not interrupted..."
+ ewarn
+ sleep 10
+ if ! rm -f "${SPINDOWND_PID}"; then
+ eerror "Failed to remove the spindownd pidfile (${SPINDOWND_PID})"
+ return 1
+ fi
+ fi
+}
+
+start() {
+ checkconfig || return 1
+ ebegin "Starting spindownd"
+ start-stop-daemon --start --exec ${SPINDOWND_BIN} \
+ -- -d -c ${SPINDOWND_CFG} -p ${SPINDOWND_PID} -f ${SPINDOWND_FIFO}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping spindownd"
+ start-stop-daemon --stop --exec ${SPINDOWND_BIN} --pidfile ${SPINDOWND_PID}
+ eend $?
+}
+
+reload() {
+ ebegin "Reloading spindownd configuration"
+ start-stop-daemon --stop --exec ${SPINDOWND_BIN} --pidfile ${SPINDOWND_PID} \
+ --signal HUP
+ eend $?
+}
diff --git a/sys-block/spindown/spindown-0.4.0-r1.ebuild b/sys-block/spindown/spindown-0.4.0-r1.ebuild
new file mode 100644
index 000000000000..31112db1040d
--- /dev/null
+++ b/sys-block/spindown/spindown-0.4.0-r1.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-block/spindown/spindown-0.4.0-r1.ebuild,v 1.1 2009/11/21 15:01:55 wschlich Exp $
+
+inherit eutils
+
+DESCRIPTION="Spindown is a daemon that can spin down idle disks"
+HOMEPAGE="http://code.google.com/p/spindown"
+SRC_URI="http://spindown.googlecode.com/files/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND=""
+RDEPEND="${DEPEND}
+ sys-apps/sg3_utils"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}"/${P}-CFLAGS.patch
+}
+
+src_compile() {
+ emake || die "emake failed"
+}
+
+src_install() {
+ insinto /etc
+ newins spindown.conf.example spindown.conf
+ newinitd "${FILESDIR}"/spindownd.initd-r1 spindownd
+ newconfd "${FILESDIR}"/spindownd.confd-r1 spindownd
+ dosbin spindownd
+ dodoc CHANGELOG README TODO spindown.conf.example
+}
+
+pkg_postinst() {
+ elog "Before starting spindownd the first time"
+ elog "you should modify /etc/spindown.conf"
+ elog
+ elog "To start spindownd by default"
+ elog "you should add it to the default runlevel:"
+ elog " rc-update add spindownd default"
+}