summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWolfram Schlich <wschlich@gentoo.org>2008-11-21 18:20:42 +0000
committerWolfram Schlich <wschlich@gentoo.org>2008-11-21 18:20:42 +0000
commit3fc6dee2b40b4beb604d1153a44fbc495d729fa1 (patch)
tree237cb25602669b5109eeb2096885a02e47ef0d53 /sys-block
parentVersion bumped. (diff)
downloadhistorical-3fc6dee2b40b4beb604d1153a44fbc495d729fa1.tar.gz
historical-3fc6dee2b40b4beb604d1153a44fbc495d729fa1.tar.bz2
historical-3fc6dee2b40b4beb604d1153a44fbc495d729fa1.zip
initial import
Package-Manager: portage-2.2_rc13/cvs/Linux 2.6.24-gentoo-r5-1 i686
Diffstat (limited to 'sys-block')
-rw-r--r--sys-block/spindown/ChangeLog11
-rw-r--r--sys-block/spindown/Manifest7
-rw-r--r--sys-block/spindown/files/spindown-0.2.2-CFLAGS.patch12
-rw-r--r--sys-block/spindown/files/spindownd.confd14
-rw-r--r--sys-block/spindown/files/spindownd.initd61
-rw-r--r--sys-block/spindown/metadata.xml10
-rw-r--r--sys-block/spindown/spindown-0.2.2.ebuild46
7 files changed, 161 insertions, 0 deletions
diff --git a/sys-block/spindown/ChangeLog b/sys-block/spindown/ChangeLog
new file mode 100644
index 000000000000..964d4d2880b6
--- /dev/null
+++ b/sys-block/spindown/ChangeLog
@@ -0,0 +1,11 @@
+# ChangeLog for sys-block/spindown
+# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/sys-block/spindown/ChangeLog,v 1.1 2008/11/21 18:20:42 wschlich Exp $
+
+*spindown-0.2.2 (21 Nov 2008)
+
+ 21 Nov 2008; Wolfram Schlich <wschlich@gentoo.org>
+ +files/spindown-0.2.2-CFLAGS.patch, +files/spindownd.confd,
+ +files/spindownd.initd, +metadata.xml, +spindown-0.2.2.ebuild:
+ initial import
+
diff --git a/sys-block/spindown/Manifest b/sys-block/spindown/Manifest
new file mode 100644
index 000000000000..a7e2f8229cad
--- /dev/null
+++ b/sys-block/spindown/Manifest
@@ -0,0 +1,7 @@
+AUX spindown-0.2.2-CFLAGS.patch 406 RMD160 36b1e92b8da8a0da02c87b5067a09eab5da585d7 SHA1 3c8503d417111f525d12b512b377fedd6f30f317 SHA256 3fdeb03019e10b961bba19f72e34ec19434e215e3e82db5757501d41ab24bf54
+AUX spindownd.confd 360 RMD160 14b2e4d09779d722bb972ba907a0695ab9b7d59e SHA1 ee05aeda29a8421018e135a4820fb5cd1bc5c286 SHA256 19e68b582815183321b8480df62d42c39aef1094b6b49cff0993129e8276c840
+AUX spindownd.initd 1451 RMD160 bde56e49b7731d6d4041a806206f793620757910 SHA1 f66549c85ac9e69d6b6c82855bbaee08373e923f SHA256 8290daa201d001d759d0d37e0ff68bda5901ac4bb34632f9a5cd3c8dd065998e
+DIST spindown-0.2.2.tar.gz 72546 RMD160 bd7b60a0f6bfb01a922e8d166fa482fa37650a7f SHA1 251958e4a9b0b199bbe75353adfe060b399e93e2 SHA256 6f2610b3879a74fff5e35b31ceb2c078357efa0026becc9ae09beb07bf188f8b
+EBUILD spindown-0.2.2.ebuild 1156 RMD160 c3824efdd04f9942c8078dcc6d1ce2173ed30eed SHA1 7a9982e628b5c7f2c68230bc7ee30cc4786a172f SHA256 00993cef2c63f14afc4e1e6d626ac68df0461e51be952494794d49c32f4a311d
+MISC ChangeLog 440 RMD160 af2fb44de1e97673edec3e47dd06ee4a4fbd95dc SHA1 b8fb7710b91559f117c8916dc9f65bbed2e66dc1 SHA256 a38589e97ad344605eb09482c51b52f5c0336c4e482a5e22070111e2747234fe
+MISC metadata.xml 300 RMD160 3b9c1cd628f9d7ac94b68543ec737d5c2381a47e SHA1 33c5efd31a8aa789118535b921e211ffb5023ac3 SHA256 bc07a9aecce5770d1ace9af0a6c6af8ff6c7b16eb5e7947a1b178d1970855e43
diff --git a/sys-block/spindown/files/spindown-0.2.2-CFLAGS.patch b/sys-block/spindown/files/spindown-0.2.2-CFLAGS.patch
new file mode 100644
index 000000000000..b3b2921f5185
--- /dev/null
+++ b/sys-block/spindown/files/spindown-0.2.2-CFLAGS.patch
@@ -0,0 +1,12 @@
+diff -urN spindown-0.2.2.orig/Makefile spindown-0.2.2/Makefile
+--- spindown-0.2.2.orig/Makefile 2008-09-08 14:36:01.000000000 +0200
++++ spindown-0.2.2/Makefile 2008-11-21 18:52:39.011908499 +0100
+@@ -3,7 +3,7 @@
+ VERSION = 0.2.2
+ OBJS = diskset.o disk.o thread.o spindown.o iniparser.o dictionary.o log.o
+ CC = g++
+-CFLAGS =-O1 -pthread
++CFLAGS += -pthread
+ SRC = src/
+ INPARSER = $(SRC)ininiparser3.0b/
+
diff --git a/sys-block/spindown/files/spindownd.confd b/sys-block/spindown/files/spindownd.confd
new file mode 100644
index 000000000000..b3a3b91266a9
--- /dev/null
+++ b/sys-block/spindown/files/spindownd.confd
@@ -0,0 +1,14 @@
+# spindownd config file
+# default: /etc/spindown.conf
+#SPINDOWND_CFG=/etc/spindown.conf
+
+# spindownd lockfile
+# default: /var/lock/spindown.lock
+#SPINDOWND_LOCK=/var/lock/spindown.lock
+
+# spindownd fifo
+# default: /var/run/spindown.fifo
+#SPINDOWND_FIFO=/var/run/spindown.fifo
+
+# extra options for spindownd
+#SPINDOWND_OPTS="" # you must NOT use -c or -f here!
diff --git a/sys-block/spindown/files/spindownd.initd b/sys-block/spindown/files/spindownd.initd
new file mode 100644
index 000000000000..1b2cf1bce9ed
--- /dev/null
+++ b/sys-block/spindown/files/spindownd.initd
@@ -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_LOCK=${SPINDOWND_LOCK:-/var/lock/spindown.lock}
+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 lockfile
+ if [ -f "${SPINDOWND_LOCK}" ]; then
+ ewarn
+ ewarn "The spindownd lockfile (${SPINDOWND_LOCK})"
+ ewarn "exists although the service is not marked as started."
+ ewarn "Will remove the lockfile and start the service in 10s"
+ ewarn "if not interrupted..."
+ ewarn
+ sleep 10
+ if ! rm -f "${SPINDOWND_LOCK}"; then
+ eerror "Failed to remove the spindownd lockfile (${SPINDOWND_LOCK})"
+ return 1
+ fi
+ fi
+}
+
+start() {
+ checkconfig || return 1
+ ebegin "Starting spindownd"
+ start-stop-daemon --start --exec ${SPINDOWND_BIN} \
+ -- -c ${SPINDOWND_CFG} -f ${SPINDOWND_FIFO} ${SPINDOWND_OPTS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping spindownd"
+ start-stop-daemon --stop --exec ${SPINDOWND_BIN}
+ eend $?
+}
+
+reload() {
+ ebegin "Reloading spindownd configuration"
+ start-stop-daemon --stop --exec ${SPINDOWND_BIN} \
+ --signal HUP
+ eend $?
+}
diff --git a/sys-block/spindown/metadata.xml b/sys-block/spindown/metadata.xml
new file mode 100644
index 000000000000..a7162e9b7104
--- /dev/null
+++ b/sys-block/spindown/metadata.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>no-herd</herd>
+<maintainer>
+ <email>wschlich@gentoo.org</email>
+ <name>Wolfram Schlich</name>
+ <description>Primary maintainer</description>
+</maintainer>
+</pkgmetadata>
diff --git a/sys-block/spindown/spindown-0.2.2.ebuild b/sys-block/spindown/spindown-0.2.2.ebuild
new file mode 100644
index 000000000000..687860672887
--- /dev/null
+++ b/sys-block/spindown/spindown-0.2.2.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-block/spindown/spindown-0.2.2.ebuild,v 1.1 2008/11/21 18:20:42 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="virtual/libc"
+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 spindownd
+ newconfd "${FILESDIR}"/spindownd.confd 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 spindown default"
+}