blob: e3c69152368b808912f57ae39bb06b4f4ddec93b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
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
}
|