diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 13:49:04 -0700 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 17:38:18 -0700 |
commit | 56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch) | |
tree | 3f91093cdb475e565ae857f1c5a7fd339e2d781e /sys-block/spindown | |
download | gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2 gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip |
proj/gentoo: Initial commit
This commit represents a new era for Gentoo:
Storing the gentoo-x86 tree in Git, as converted from CVS.
This commit is the start of the NEW history.
Any historical data is intended to be grafted onto this point.
Creation process:
1. Take final CVS checkout snapshot
2. Remove ALL ChangeLog* files
3. Transform all Manifests to thin
4. Remove empty Manifests
5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$
5.1. Do not touch files with -kb/-ko keyword flags.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests
X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project
X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration
X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn
X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts
X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration
X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging
X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'sys-block/spindown')
-rw-r--r-- | sys-block/spindown/Manifest | 1 | ||||
-rw-r--r-- | sys-block/spindown/files/spindown-0.4.0-CFLAGS-LDFLAGS.patch | 55 | ||||
-rw-r--r-- | sys-block/spindown/files/spindownd.confd-r1 | 11 | ||||
-rw-r--r-- | sys-block/spindown/files/spindownd.initd-r1 | 61 | ||||
-rw-r--r-- | sys-block/spindown/metadata.xml | 10 | ||||
-rw-r--r-- | sys-block/spindown/spindown-0.4.0-r4.ebuild | 46 |
6 files changed, 184 insertions, 0 deletions
diff --git a/sys-block/spindown/Manifest b/sys-block/spindown/Manifest new file mode 100644 index 000000000000..1b1c3c95afe8 --- /dev/null +++ b/sys-block/spindown/Manifest @@ -0,0 +1 @@ +DIST spindown-0.4.0.tar.gz 36837 SHA256 551167e3d0a20cb56d3729ae91cf831a4faae2d1287c7f205bbc2f1d011ec37b SHA512 12cfd63c2f2c1fe6c3082f824fea925e236a39ff68ef217178fc9798f1e0e1ef8aa9863f9c2c0babfa29ef7e21290d10914beefd2284ff73a2bb786ad4bc24dc WHIRLPOOL d57ab84555e9f14425ab98b67e0a6d754fe61293b3b08fcbd195ad6fc4292ff49aca0117495e38e4e6b070a415b9f22c53d0d8a0b66a64a8728b0bc1827ec933 diff --git a/sys-block/spindown/files/spindown-0.4.0-CFLAGS-LDFLAGS.patch b/sys-block/spindown/files/spindown-0.4.0-CFLAGS-LDFLAGS.patch new file mode 100644 index 000000000000..9101fbadb59c --- /dev/null +++ b/sys-block/spindown/files/spindown-0.4.0-CFLAGS-LDFLAGS.patch @@ -0,0 +1,55 @@ +diff -urN spindown-0.4.0.orig/Makefile spindown-0.4.0/Makefile +--- spindown-0.4.0.orig/Makefile 2009-04-18 18:32:59.000000000 +0200 ++++ spindown-0.4.0/Makefile 2012-03-11 00:22:07.684197769 +0100 +@@ -4,7 +4,8 @@ + OBJS = main.o diskset.o disk.o spindown.o iniparser.o dictionary.o log.o spindownd.o\ + exceptions.o + CC = g++ +-CFLAGS =-O1 ++CFLAGS += ++LDFLAGS += + SRC = src/ + INPARSER = $(SRC)ininiparser3.0b/ + SRCDIR = spindown-$(VERSION) +@@ -60,31 +61,31 @@ + rm -d -r -f $(SRCDIR) + + spindownd: $(OBJS) +- g++ $(CFLAGS) -o spindownd $(OBJS) ++ g++ $(CFLAGS) $(LDFLAGS) -o spindownd $(OBJS) + + main.o: $(SRC)main.cpp $(SRC)general.h +- g++ $(CFLAGS) -c $(SRC)main.cpp ++ g++ $(CFLAGS) $(LDFLAGS) -c $(SRC)main.cpp + + diskset.o: $(SRC)diskset.cpp $(SRC)diskset.h $(SRC)general.h +- g++ $(CFLAGS) -c $(SRC)diskset.cpp ++ g++ $(CFLAGS) $(LDFLAGS) -c $(SRC)diskset.cpp + + disk.o: $(SRC)disk.cpp $(SRC)disk.h $(SRC)general.h +- g++ $(CFLAGS) -c $(SRC)disk.cpp ++ g++ $(CFLAGS) $(LDFLAGS) -c $(SRC)disk.cpp + + spindown.o: $(SRC)spindown.cpp $(SRC)spindown.h $(SRC)general.h +- g++ $(CFLAGS) -c $(SRC)spindown.cpp ++ g++ $(CFLAGS) $(LDFLAGS) -c $(SRC)spindown.cpp + + spindownd.o: $(SRC)spindownd.cpp $(SRC)spindownd.h $(SRC)general.h +- g++ $(CFLAGS) -c $(SRC)spindownd.cpp ++ g++ $(CFLAGS) $(LDFLAGS) -c $(SRC)spindownd.cpp + + log.o: $(SRC)log.cpp $(SRC)log.h $(SRC)general.h +- g++ $(CFLAGS) -c $(SRC)log.cpp ++ g++ $(CFLAGS) $(LDFLAGS) -c $(SRC)log.cpp + + exceptions.o: $(SRC)exceptions.cpp $(SRC)exceptions.h $(SRC)general.h +- g++ $(CFLAGS) -c $(SRC)exceptions.cpp ++ g++ $(CFLAGS) $(LDFLAGS) -c $(SRC)exceptions.cpp + + iniparser.o: $(INPARSER)iniparser.c +- g++ $(CFLAGS) -c $(INPARSER)iniparser.c ++ g++ $(CFLAGS) $(LDFLAGS) -c $(INPARSER)iniparser.c + + dictionary.o: $(INPARSER)dictionary.c +- g++ $(CFLAGS) -c $(INPARSER)dictionary.c ++ g++ $(CFLAGS) $(LDFLAGS) -c $(INPARSER)dictionary.c 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..f35908fe8479 --- /dev/null +++ b/sys-block/spindown/files/spindownd.initd-r1 @@ -0,0 +1,61 @@ +#!/sbin/runscript +# Copyright 1999-2012 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} + +extra_started_commands="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 --exec ${SPINDOWND_BIN} --pidfile ${SPINDOWND_PID} \ + --signal HUP + eend $? +} diff --git a/sys-block/spindown/metadata.xml b/sys-block/spindown/metadata.xml new file mode 100644 index 000000000000..8a38b8e43a00 --- /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> + <maintainer> + <email>maintainer-needed@gentoo.org</email> + </maintainer> + <upstream> + <remote-id type="google-code">spindown</remote-id> + </upstream> +</pkgmetadata> diff --git a/sys-block/spindown/spindown-0.4.0-r4.ebuild b/sys-block/spindown/spindown-0.4.0-r4.ebuild new file mode 100644 index 000000000000..88739cc7b910 --- /dev/null +++ b/sys-block/spindown/spindown-0.4.0-r4.ebuild @@ -0,0 +1,46 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +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-LDFLAGS.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" +} |