1 # Copyright 1999-2024 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 inherit toolchain-funcs flag-o-matic
8 DESCRIPTION
="A UNIX init scheme with service supervision"
9 HOMEPAGE
="http://smarden.org/runit/"
10 SRC_URI
="http://smarden.org/runit/${P}.tar.gz"
11 S
=${WORKDIR}/admin
/${P}/src
14 KEYWORDS
="~amd64 ~x86"
17 # runtime dependencies in /etc/runit/{1,3}
23 PATCHES
=( "${FILESDIR}"/bug721880-dont-hardcode-ar-ranlib.
patch )
26 # we either build everything or nothing static
27 sed -i -e 's:-static: :' Makefile
33 use static
&& append-ldflags
-static
35 echo "$(tc-getCC) ${CFLAGS}" > conf-cc
36 echo "$(tc-getCC) ${LDFLAGS}" > conf-ld
# [sic]
38 tc-getRANLIB
> conf-ranlib
42 dodir
/etc
/env.d
/etc
/service
43 echo 'SVDIR=/etc/service' >> "${T}/99${PN}" || die
47 dobin chpst runsv runsvchdir runsvdir sv svlogd
48 dosbin runit runit-init utmpset
51 for tty
in agetty-tty
{1.
.6}; do
52 exeinto
/etc
/sv
/"${tty}"/
53 for script in run finish
; do
54 newexe
"${FILESDIR}/${script}".agetty "${script}"
59 doexe
"${FILESDIR}"/{1,2,3,ctrlaltdel
}
61 # N.B. this is not $WORKDIR because $S is redefined above
64 dodoc package
/{CHANGES
,README
,THANKS
,TODO
} doc
/*.html
69 elog
"If this is your first time installing runit, some manual setup is"
70 elog
"required before you can use it as your primary init system."
71 elog
"'agetty' services have been installed in /etc/sv/, but they are not"
72 elog
"enabled automatically. Symlink one or more of these into "
73 elog
"/etc/service/ to have console logins available at boot."
74 elog
"The supplied startup scripts will run up to OpenRC's 'boot' runlevel"
75 elog
"and then start runit's services."
76 if [[ -n ${REPLACING_VERSIONS} ]] ; then
78 ewarn
"A pre-existing runit version was detected."
79 ewarn
"You may want to verify your /etc/service setup is sane."
84 if [[ -z ${REPLACED_BY_VERSION} ]] ; then
85 ewarn
"runit was uninstalled. Make sure your system is still bootable!"