summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXU Benda <heroxbd@gmail.com>2012-08-11 20:26:25 +0900
committerXU Benda <heroxbd@gmail.com>2012-08-11 20:26:25 +0900
commitdb85a1e67928df070fae9abd43b67c4f1d2e6d8b (patch)
treeaadca15fa6e0c4041e4067ef2a8e608494526f7b
parentmerge openrc-prefix into my personal overlay (diff)
downloadandroid-db85a1e67928df070fae9abd43b67c4f1d2e6d8b.tar.gz
android-db85a1e67928df070fae9abd43b67c4f1d2e6d8b.tar.bz2
android-db85a1e67928df070fae9abd43b67c4f1d2e6d8b.zip
maintain sys-process/runit
-rw-r--r--sys-process/runit/ChangeLog128
-rw-r--r--sys-process/runit/Manifest16
-rwxr-xr-xsys-process/runit/files/110
-rwxr-xr-xsys-process/runit/files/26
-rwxr-xr-xsys-process/runit/files/315
-rwxr-xr-xsys-process/runit/files/3-1.414
-rwxr-xr-xsys-process/runit/files/ctrlaltdel9
-rwxr-xr-xsys-process/runit/files/finish.getty2
-rwxr-xr-xsys-process/runit/files/run.getty2
-rw-r--r--sys-process/runit/metadata.xml5
-rw-r--r--sys-process/runit/runit-1.7.0.ebuild65
-rw-r--r--sys-process/runit/runit-2.0.0.ebuild65
-rw-r--r--sys-process/runit/runit-2.1.1-r1.ebuild74
-rw-r--r--sys-process/runit/runit-2.1.1.ebuild58
14 files changed, 469 insertions, 0 deletions
diff --git a/sys-process/runit/ChangeLog b/sys-process/runit/ChangeLog
new file mode 100644
index 0000000..17f30b9
--- /dev/null
+++ b/sys-process/runit/ChangeLog
@@ -0,0 +1,128 @@
+# ChangeLog for sys-process/runit
+# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/sys-process/runit/ChangeLog,v 1.34 2012/02/06 03:13:33 vapier Exp $
+
+ 06 Feb 2012; Mike Frysinger <vapier@gentoo.org> runit-2.1.1-r1.ebuild:
+ Don't run env-update in pkg_* funcs -- the PM does that.
+
+*runit-2.1.1-r1 (30 Nov 2011)
+
+ 30 Nov 2011; Marc Schiffbauer <mschiff@gentoo.org> +runit-2.1.1-r1.ebuild:
+ Added rev 2.2.1-r1. Fixes #392453.
+
+ 15 Jun 2011; Diego E. Pettenò <flameeyes@gentoo.org> runit-2.1.1.ebuild:
+ QA: actually make runit build, since it was broken with a blind version bump.
+
+*runit-2.1.1 (15 Jun 2011)
+
+ 15 Jun 2011; Jeroen Roovers <jer@gentoo.org> +runit-2.1.1.ebuild:
+ Version bump.
+
+*runit-2.0.0 (25 Dec 2008)
+
+ 25 Dec 2008; Mike Frysinger <vapier@gentoo.org> +runit-2.0.0.ebuild:
+ Version bump #190983 by Daniel Pielmeier (billie).
+
+ 14 Oct 2008; Diego Pettenò <flameeyes@gentoo.org> runit-1.7.0.ebuild:
+ Set compiler and linker during src_compile rather than unpack.
+
+ 12 May 2008; Markus Meier <maekke@gentoo.org> runit-1.7.0.ebuild:
+ amd64 stable, bug #216630
+
+ 14 Apr 2008; Jeroen Roovers <jer@gentoo.org> runit-1.7.0.ebuild:
+ Stable for HPPA (bug #216630).
+
+ 12 Apr 2008; Tobias Scherbaum <dertobi123@gentoo.org> runit-1.7.0.ebuild:
+ ppc stable, bug #216630
+
+ 08 Apr 2008; Raúl Porcel <armin76@gentoo.org> runit-1.7.0.ebuild:
+ ia64/sparc/x86 stable wrt #216630
+
+ 07 Apr 2008; Tobias Klausmann <klausman@gentoo.org> runit-1.7.0.ebuild:
+ Stable on alpha, bug #216630
+
+ 07 Apr 2008; Brent Baude <ranger@gentoo.org> runit-1.7.0.ebuild:
+ stable ppc64, bug 216630
+
+*runit-1.7.0 (25 Aug 2007)
+
+ 25 Aug 2007; Mike Frysinger <vapier@gentoo.org> +runit-1.7.0.ebuild:
+ Version bump #180649 by Radek Podgorny.
+
+ 03 Jul 2007; Raúl Porcel <armin76@gentoo.org> runit-1.5.0.ebuild:
+ alpha stable wrt #178046
+
+ 02 Jun 2007; Lars Weiler <pylon@gentoo.org> runit-1.5.0.ebuild:
+ Stable on ppc; bug #178046.
+
+ 21 May 2007; Gustavo Zacarias <gustavoz@gentoo.org> runit-1.5.0.ebuild:
+ Stable on sparc wrt #178046
+
+ 16 May 2007; Steve Dibb <beandog@gentoo.org> runit-1.5.0.ebuild:
+ amd64 stable, bug 178046
+
+ 15 May 2007; Jeroen Roovers <jer@gentoo.org> runit-1.5.0.ebuild:
+ Stable for HPPA (bug #178046).
+
+ 13 May 2007; Raúl Porcel <armin76@gentoo.org> runit-1.5.0.ebuild:
+ ia64 + x86 stable wrt bug 178046
+
+ 13 May 2007; Markus Rothe <corsair@gentoo.org> runit-1.5.0.ebuild:
+ Stable on ppc64; bug #178046
+
+ 10 Apr 2007; Christian Faulhammer <opfer@gentoo.org> runit-1.3.0.ebuild:
+ stable amd64, bug 172203
+
+ 10 Apr 2007; Christian Faulhammer <opfer@gentoo.org> ChangeLog:
+ keyworded ~amd64, bug 172203
+
+ 09 Feb 2007; Diego Pettenò <flameeyes@gentoo.org> ChangeLog:
+ Regenerate digest in Manifest2 format.
+
+ 23 May 2006; Markus Rothe <corsair@gentoo.org> runit-1.3.0.ebuild:
+ Stable on ppc64
+
+*runit-1.5.0 (20 Apr 2006)
+
+ 20 Apr 2006; Mike Frysinger <vapier@gentoo.org> +runit-1.5.0.ebuild:
+ Version bump #130519 by Radek Podgorny.
+
+ 20 Apr 2006; Mike Frysinger <vapier@gentoo.org> +files/3-1.4,
+ runit-1.4.1.ebuild:
+ New initscript by Radek Podgorny #128918.
+
+*runit-1.4.1 (29 Mar 2006)
+
+ 29 Mar 2006; Mike Frysinger <vapier@gentoo.org> +runit-1.4.1.ebuild:
+ Version bump #127877 by Radek Podgorny.
+
+ 08 Feb 2006; Aron Griffis <agriffis@gentoo.org> runit-1.3.0.ebuild:
+ Mark 1.3.0 stable on alpha
+
+ 07 Feb 2006; Aron Griffis <agriffis@gentoo.org> runit-1.3.0.ebuild:
+ Mark 1.3.0 stable on ia64
+
+ 30 Jan 2006; Ian Leitch <port001@gentoo.org> runit-1.3.0.ebuild:
+ Stable on x86 (bug #120415).
+
+*runit-1.3.3 (15 Jan 2006)
+
+ 15 Jan 2006; Mike Frysinger <vapier@gentoo.org> +runit-1.3.3.ebuild:
+ Version bump #119069 by Torne Wuff.
+
+*runit-1.3.0 (26 Jul 2005)
+
+ 26 Jul 2005; Caleb Tennis <caleb@gentoo.org> +runit-1.3.0.ebuild:
+ Version bump - bug #100343
+
+*runit-1.0.5 (03 Mar 2005)
+
+ 03 Mar 2005; Ciaran McCreesh <ciaranm@gentoo.org> +metadata.xml, +files/1,
+ +files/2, +files/3, +files/ctrlaltdel, +files/finish.getty,
+ +files/run.getty, +runit-1.0.5.ebuild:
+ Moved from sys-apps/runit to sys-process/runit.
+
+*runit-1.0.5 (09 Oct 2004)
+
+ 09 Oct 2004; Mike Frysinger <vapier@gentoo.org> :
+ Initial import. Ebuild submitted by Torne Wuff #39160.
diff --git a/sys-process/runit/Manifest b/sys-process/runit/Manifest
new file mode 100644
index 0000000..aae017d
--- /dev/null
+++ b/sys-process/runit/Manifest
@@ -0,0 +1,16 @@
+AUX 1 175 RMD160 ca7ea65b85ec58b1ff07d50db47807339bcb509a SHA1 f92044c4f90e0bd588860fe2b314b074d97a2fa7 SHA256 fd9520369851473556c038b55679dcb1eb1265d1220e8c3cf4aac2dfae4e6594
+AUX 2 551 RMD160 192302cd579520d2f92f4db6295db9d8cbd56303 SHA1 bfa2f2a1e7ce6ab92d76301f7afb99bca41ba830 SHA256 d0cb35c4ecdd5ef9179af22f24cb371eb8f1082ec1af7850237842bd49ccba0f
+AUX 3 377 RMD160 41baaa2fcb680c9ed17fe8fbda4b640473240540 SHA1 d1a8fdeb5d39acf42b0bea4eac45d19feda929aa SHA256 3f3787de54ead7c2450f596acf022c9f255a8e6dc1e6ea7bb3a5fea20fa63ac2
+AUX 3-1.4 372 RMD160 b62d35af10c481df7f2f38fb892858f3ddc382bb SHA1 bcb7ec8c6cb3dfabad4cc25ad34c8f575ef8bcd1 SHA256 56b835cb329e71d14523038cd382ad92f77317a2c1bb75e9414bf468fa57f03b
+AUX ctrlaltdel 189 RMD160 8f6f4f30c13fb541e3a32221300889d2cedf3ec2 SHA1 3ed4732e0f6e5096be7805421400242854a9d476 SHA256 84eff8b4bd83ebded1689404f5da22a442e82e7f9d5d8df61a1a3032f80b503c
+AUX finish.getty 30 RMD160 0bb0f0c1a05a78ce33bb4f95b84d142896e6471c SHA1 922f54e452cdf2af32b29db0349bee7c68811962 SHA256 6c5db3570b4abbc2547ee7923c18879912f197b52883abb08586f529cccd5aa5
+AUX run.getty 44 RMD160 4659766d2f0d3128a23bc0beac2dfe92f368d723 SHA1 6a7a78bc77448d2e5d1187be1214caab8cda31c2 SHA256 3b4105965417490496352da0fa36d7e79e8ff27989ce7d33023251654d6c119e
+DIST runit-1.7.0.tar.gz 101315 RMD160 418db787290586a003481f938f4fa01934b9f063 SHA1 a49810a0c8c77dfec19f7282ac9c82b129554243 SHA256 f6bcd04bb300710ba4ade3b6c64298cb3e22090a8866455491ad086243453984
+DIST runit-2.0.0.tar.gz 104373 RMD160 fc55f22462b5b05d991558adf99468777789671a SHA1 a48d8579478fbcef37c347c3aa986f23fe528241 SHA256 2eb22e37946e479249a0b0e1fb0fb4651cebfd3d88aa116a39c07a0ec253fe28
+DIST runit-2.1.1.tar.gz 109661 RMD160 60f3d3b377bc9741ca96d2e953f86461368d6d29 SHA1 8eee39639dcb79ba251ca4ab2c7cde38059f09c2 SHA256 ffcf2d27b32f59ac14f2d4b0772a3eb80d9342685a2042b7fbbc472c07cf2a2c
+EBUILD runit-1.7.0.ebuild 1678 RMD160 03b1f0a8d49e43fbd4531a28caff6228cf4451d3 SHA1 db1f696053ae00a0671a2e00be4f644130289cec SHA256 51424de6fc338ef7e46440d67092b358f8cce4740edc9bd1cbdc2cb87cd4f6d8
+EBUILD runit-2.0.0.ebuild 1689 RMD160 0ae9e15e688aace1380bb960322b8460afda88e5 SHA1 cfbf889d3b1023c760bf020b9666cab35923949c SHA256 27a12b0806ab9f12aea923f533ae3fdea13307553d33ea44f07029cd1811cb34
+EBUILD runit-2.1.1-r1.ebuild 1984 RMD160 b33cdccfa69b3e8673397bdc81adae7b64eb7e90 SHA1 7b83e81c4bbbb68768843c0d711cc2b0a5ddfcf1 SHA256 1c19ee2dc595948edd39c55922fb33b332d46a625ee325ab0e018aea0ad4c04c
+EBUILD runit-2.1.1.ebuild 1631 RMD160 7362cc7d9228873b3d4277e164240a503157676f SHA1 3970b9e06c63a8aad79ec8b18a183007775c8467 SHA256 5b576091105dad929813ba018f9f5908f47e5c541f8787b01f79764b58940065
+MISC ChangeLog 4269 RMD160 90a64e15c65b19c9c76e4baacc6708dd11a1c8f9 SHA1 37d1e18c3d21304169d7ab79712d44ff9f793c10 SHA256 71dccb6ad8c309909c7ecd8f0cac1926659479783b5153e90789b3a7ef7df91c
+MISC metadata.xml 164 RMD160 f43cbec30b7074319087c9acffdb9354b17b0db3 SHA1 9c213f5803676c56439df3716be07d6692588856 SHA256 f5f2891f2a4791cd31350bb2bb572131ad7235cd0eeb124c9912c187ac10ce92
diff --git a/sys-process/runit/files/1 b/sys-process/runit/files/1
new file mode 100755
index 0000000..d6a5b4f
--- /dev/null
+++ b/sys-process/runit/files/1
@@ -0,0 +1,10 @@
+#!/bin/sh
+# system one time tasks
+
+PATH=/sbin:/usr/sbin:/bin:/usr/bin
+
+RUNLEVEL=S /sbin/rc sysinit
+RUNLEVEL=S /sbin/rc boot
+
+touch /etc/runit/stopit
+chmod 0 /etc/runit/stopit
diff --git a/sys-process/runit/files/2 b/sys-process/runit/files/2
new file mode 100755
index 0000000..233ad00
--- /dev/null
+++ b/sys-process/runit/files/2
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+PATH=/command:/usr/local/bin:/usr/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/X11R6/bin
+
+exec env - PATH=$PATH \
+runsvdir /var/service 'log: ...........................................................................................................................................................................................................................................................................................................................................................................................................'
diff --git a/sys-process/runit/files/3 b/sys-process/runit/files/3
new file mode 100755
index 0000000..182151e
--- /dev/null
+++ b/sys-process/runit/files/3
@@ -0,0 +1,15 @@
+#!/bin/sh
+exec >/dev/console 2>&1
+PATH=/sbin:/usr/sbin:/bin:/usr/bin
+
+echo 'Waiting for getties to stop...'
+svwaitdown -xk -t10 /var/service/getty-*
+
+echo 'Waiting for services to stop...'
+svwaitdown -xk -t300 /var/service/*
+
+echo 'Shutdown...'
+test -x /etc/runit/reboot && LAST=6 || LAST=0
+test -x /etc/runit/reboot && RC=reboot || RC=shutdown
+RUNLEVEL=$LAST /sbin/rc $RC
+
diff --git a/sys-process/runit/files/3-1.4 b/sys-process/runit/files/3-1.4
new file mode 100755
index 0000000..f143f5f
--- /dev/null
+++ b/sys-process/runit/files/3-1.4
@@ -0,0 +1,14 @@
+#!/bin/sh
+exec >/dev/console 2>&1
+PATH=/sbin:/usr/sbin:/bin:/usr/bin
+
+echo 'Waiting for getties to stop...'
+sv shutdown -w 10 /var/service/getty-*
+
+echo 'Waiting for services to stop...'
+sv shutdown -w 300 /var/service/*
+
+echo 'Shutdown...'
+test -x /etc/runit/reboot && LAST=6 || LAST=0
+test -x /etc/runit/reboot && RC=reboot || RC=shutdown
+RUNLEVEL=$LAST /sbin/rc $RC
diff --git a/sys-process/runit/files/ctrlaltdel b/sys-process/runit/files/ctrlaltdel
new file mode 100755
index 0000000..6684457
--- /dev/null
+++ b/sys-process/runit/files/ctrlaltdel
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+PATH=/bin:/usr/bin
+MSG="System is going down in 14 seconds..."
+
+# echo 'disabled.' ; exit
+touch /etc/runit/stopit
+chmod 100 /etc/runit/stopit && echo "$MSG" | wall
+/bin/sleep 14
diff --git a/sys-process/runit/files/finish.getty b/sys-process/runit/files/finish.getty
new file mode 100755
index 0000000..c3d440a
--- /dev/null
+++ b/sys-process/runit/files/finish.getty
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec utmpset -w TTY
diff --git a/sys-process/runit/files/run.getty b/sys-process/runit/files/run.getty
new file mode 100755
index 0000000..ab6f954
--- /dev/null
+++ b/sys-process/runit/files/run.getty
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec /sbin/agetty 38400 TTY linux
diff --git a/sys-process/runit/metadata.xml b/sys-process/runit/metadata.xml
new file mode 100644
index 0000000..96a2d58
--- /dev/null
+++ b/sys-process/runit/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>base-system</herd>
+</pkgmetadata>
diff --git a/sys-process/runit/runit-1.7.0.ebuild b/sys-process/runit/runit-1.7.0.ebuild
new file mode 100644
index 0000000..ed425b0
--- /dev/null
+++ b/sys-process/runit/runit-1.7.0.ebuild
@@ -0,0 +1,65 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-process/runit/runit-1.7.0.ebuild,v 1.9 2008/10/27 06:07:42 vapier Exp $
+
+inherit toolchain-funcs flag-o-matic
+
+DESCRIPTION="A UNIX init scheme with service supervision"
+HOMEPAGE="http://smarden.org/runit/"
+SRC_URI="http://smarden.org/runit/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86"
+IUSE="static"
+
+DEPEND=""
+
+S=${WORKDIR}/admin/${P}
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ # we either build everything or nothing static
+ sed -i -e 's:-static: :' src/Makefile
+}
+
+src_compile() {
+ cd src
+ use static && append-ldflags -static
+
+ echo "$(tc-getCC) ${CFLAGS}" > conf-cc
+ echo "$(tc-getCC) ${LDFLAGS}" > conf-ld
+
+ emake || die "make failed"
+}
+
+src_install() {
+ dodir /var
+ keepdir /etc/runit{,/runsvdir{,/default,/all}}
+ dosym default /etc/runit/runsvdir/current
+ dosym ../etc/runit/runsvdir/current /var/service
+
+ cd src
+ dobin $(<../package/commands) || die "dobin"
+ dodir /sbin
+ mv "${D}"/usr/bin/{runit-init,runit,utmpset} "${D}"/sbin/ || die "dosbin"
+
+ cd "${S}"
+ dodoc package/{CHANGES,README,THANKS,TODO}
+ dohtml doc/*.html
+ doman man/*.[18]
+
+ exeinto /etc/runit
+ doexe "${FILESDIR}"/{1,2,ctrlaltdel} || die
+ newexe "${FILESDIR}"/3-1.4 3 || die
+ for tty in tty1 tty2 tty3 tty4 tty5 tty6; do
+ exeinto /etc/runit/runsvdir/all/getty-$tty/
+ for script in run finish; do
+ newexe "${FILESDIR}"/$script.getty $script
+ dosed "s:TTY:${tty}:g" /etc/runit/runsvdir/all/getty-$tty/$script
+ done
+ dosym ../all/getty-$tty /etc/runit/runsvdir/default/getty-$tty
+ done
+}
diff --git a/sys-process/runit/runit-2.0.0.ebuild b/sys-process/runit/runit-2.0.0.ebuild
new file mode 100644
index 0000000..99b7d50
--- /dev/null
+++ b/sys-process/runit/runit-2.0.0.ebuild
@@ -0,0 +1,65 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-process/runit/runit-2.0.0.ebuild,v 1.1 2008/12/25 22:24:45 vapier Exp $
+
+inherit toolchain-funcs flag-o-matic
+
+DESCRIPTION="A UNIX init scheme with service supervision"
+HOMEPAGE="http://smarden.org/runit/"
+SRC_URI="http://smarden.org/runit/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+IUSE="static"
+
+DEPEND=""
+
+S=${WORKDIR}/admin/${P}
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ # we either build everything or nothing static
+ sed -i -e 's:-static: :' src/Makefile
+}
+
+src_compile() {
+ cd src
+ use static && append-ldflags -static
+
+ echo "$(tc-getCC) ${CFLAGS}" > conf-cc
+ echo "$(tc-getCC) ${LDFLAGS}" > conf-ld
+
+ emake || die "make failed"
+}
+
+src_install() {
+ dodir /var
+ keepdir /etc/runit{,/runsvdir{,/default,/all}}
+ dosym default /etc/runit/runsvdir/current
+ dosym ../etc/runit/runsvdir/current /var/service
+
+ cd src
+ dobin $(<../package/commands) || die "dobin"
+ dodir /sbin
+ mv "${D}"/usr/bin/{runit-init,runit,utmpset} "${D}"/sbin/ || die "dosbin"
+
+ cd "${S}"
+ dodoc package/{CHANGES,README,THANKS,TODO}
+ dohtml doc/*.html
+ doman man/*.[18]
+
+ exeinto /etc/runit
+ doexe "${FILESDIR}"/{1,2,ctrlaltdel} || die
+ newexe "${FILESDIR}"/3-1.4 3 || die
+ for tty in tty1 tty2 tty3 tty4 tty5 tty6; do
+ exeinto /etc/runit/runsvdir/all/getty-$tty/
+ for script in run finish; do
+ newexe "${FILESDIR}"/$script.getty $script
+ dosed "s:TTY:${tty}:g" /etc/runit/runsvdir/all/getty-$tty/$script
+ done
+ dosym ../all/getty-$tty /etc/runit/runsvdir/default/getty-$tty
+ done
+}
diff --git a/sys-process/runit/runit-2.1.1-r1.ebuild b/sys-process/runit/runit-2.1.1-r1.ebuild
new file mode 100644
index 0000000..571646b
--- /dev/null
+++ b/sys-process/runit/runit-2.1.1-r1.ebuild
@@ -0,0 +1,74 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-process/runit/runit-2.1.1-r1.ebuild,v 1.2 2012/02/06 03:13:33 vapier Exp $
+
+EAPI="3"
+
+inherit toolchain-funcs flag-o-matic
+
+DESCRIPTION="A UNIX init scheme with service supervision"
+HOMEPAGE="http://smarden.org/runit/"
+SRC_URI="http://smarden.org/runit/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+IUSE="static"
+
+S=${WORKDIR}/admin/${P}/src
+
+src_prepare() {
+ # we either build everything or nothing static
+ sed -i -e 's:-static: :' Makefile
+}
+
+src_configure() {
+ use static && append-ldflags -static
+
+ echo "$(tc-getCC) ${CFLAGS}" > conf-cc
+ echo "$(tc-getCC) ${LDFLAGS}" > conf-ld
+}
+
+src_install() {
+ dodir /var
+ keepdir /etc/runit{,/runsvdir{,/default,/all}}
+ dosym default /etc/runit/runsvdir/current
+ dosym ../etc/runit/runsvdir/current /var/service
+ dosym ../etc/runit/2 /sbin/runsvdir-start
+
+ dobin $(<../package/commands) || die "dobin"
+ dodir /sbin
+ mv "${ED}"/usr/bin/{runit-init,runit,utmpset} "${ED}"/sbin/ || die "dosbin"
+
+ cd "${S}"/..
+ dodoc package/{CHANGES,README,THANKS,TODO}
+ dohtml doc/*.html
+ doman man/*.[18]
+
+ exeinto /etc/runit
+ doexe "${FILESDIR}"/{1,2,ctrlaltdel} || die
+ newexe "${FILESDIR}"/3-1.4 3 || die
+ for tty in tty1 tty2 tty3 tty4 tty5 tty6; do
+ exeinto /etc/runit/runsvdir/all/getty-$tty/
+ for script in run finish; do
+ newexe "${FILESDIR}"/$script.getty $script
+ dosed "s:TTY:${tty}:g" /etc/runit/runsvdir/all/getty-$tty/$script
+ done
+ dosym ../all/getty-$tty /etc/runit/runsvdir/default/getty-$tty
+ done
+
+ # make sv command work
+ cd "${S}"
+ insinto /etc/env.d
+ cat <<-EOF > env.d
+ #/etc/env.d/20runit
+ SVDIR="/var/service/"
+ EOF
+ newins env.d 20runit
+}
+
+pkg_postinst() {
+ ewarn "/etc/profile was updated. Please run:"
+ ewarn "source /etc/profile"
+ ewarn "to make 'sv' work correctly on your currently open shells"
+}
diff --git a/sys-process/runit/runit-2.1.1.ebuild b/sys-process/runit/runit-2.1.1.ebuild
new file mode 100644
index 0000000..e3c6915
--- /dev/null
+++ b/sys-process/runit/runit-2.1.1.ebuild
@@ -0,0 +1,58 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-process/runit/runit-2.1.1.ebuild,v 1.2 2011/06/15 18:55:12 flameeyes Exp $
+
+EAPI="3"
+
+inherit toolchain-funcs flag-o-matic
+
+DESCRIPTION="A UNIX init scheme with service supervision"
+HOMEPAGE="http://smarden.org/runit/"
+SRC_URI="http://smarden.org/runit/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+IUSE="static"
+
+S=${WORKDIR}/admin/${P}/src
+
+src_prepare() {
+ # we either build everything or nothing static
+ sed -i -e 's:-static: :' src/Makefile
+}
+
+src_configure() {
+ use static && append-ldflags -static
+
+ echo "$(tc-getCC) ${CFLAGS}" > conf-cc
+ echo "$(tc-getCC) ${LDFLAGS}" > conf-ld
+}
+
+src_install() {
+ dodir /var
+ keepdir /etc/runit{,/runsvdir{,/default,/all}}
+ dosym default /etc/runit/runsvdir/current
+ dosym ../etc/runit/runsvdir/current /var/service
+
+ dobin $(<../package/commands) || die "dobin"
+ dodir /sbin
+ mv "${D}"/usr/bin/{runit-init,runit,utmpset} "${D}"/sbin/ || die "dosbin"
+
+ cd "${S}"/..
+ dodoc package/{CHANGES,README,THANKS,TODO}
+ dohtml doc/*.html
+ doman man/*.[18]
+
+ exeinto /etc/runit
+ doexe "${FILESDIR}"/{1,2,ctrlaltdel} || die
+ newexe "${FILESDIR}"/3-1.4 3 || die
+ for tty in tty1 tty2 tty3 tty4 tty5 tty6; do
+ exeinto /etc/runit/runsvdir/all/getty-$tty/
+ for script in run finish; do
+ newexe "${FILESDIR}"/$script.getty $script
+ dosed "s:TTY:${tty}:g" /etc/runit/runsvdir/all/getty-$tty/$script
+ done
+ dosym ../all/getty-$tty /etc/runit/runsvdir/default/getty-$tty
+ done
+}