Add sys-process/dinit
Signed-off-by: Shin'ya Minazuki <shinyoukai@laidback.moe>
This commit is contained in:
53
sys-process/dinit/dinit-0.21.0.ebuild
Normal file
53
sys-process/dinit/dinit-0.21.0.ebuild
Normal file
@@ -0,0 +1,53 @@
|
||||
# Copyright 2026 Shin'ya Minazuki
|
||||
EAPI=8
|
||||
|
||||
inherit toolchain-funcs
|
||||
|
||||
DESCRIPTION="Service monitoring and init system"
|
||||
HOMEPAGE="https://davmac.org/projects/dinit/"
|
||||
SRC_URI="https://github.com/davmac314/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
|
||||
|
||||
LICENSE="Apache-2.0"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64"
|
||||
|
||||
DEPEND="capabilities? ( sys-libs/libcap )"
|
||||
RDEPEND="${DEPEND}"
|
||||
BDEPEND="virtual/pkgconfig"
|
||||
|
||||
IUSE="+capabilities +cgroups initgroups ioprio oom-adj +openrc shutdown utmpx"
|
||||
RESTRICT="mirror"
|
||||
|
||||
src_configure() {
|
||||
export CXX="$(tc-getCXX)"
|
||||
export EXTRA_CXXFLAGS="${CFLAGS}"
|
||||
|
||||
./configure --prefix="${EPREFIX}/usr" \
|
||||
--shutdown-prefix="${PN}" \
|
||||
$(use_enable shutdown) \
|
||||
$(use_enable capabilities) \
|
||||
$(use_enable oom-adj) \
|
||||
$(use_enable utmpx) \
|
||||
$(use_enable initgroups) \
|
||||
$(use_enable ioprio)
|
||||
|
||||
# Let the user put their own optimization settings
|
||||
elog "Filtering out upstream's optimization settings..."
|
||||
sed -i -e 's/-Os//' mconfig
|
||||
sed -i -e 's/-flto//' mconfig
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
emake
|
||||
}
|
||||
|
||||
src_install() {
|
||||
emake DESTDIR="${D}" install
|
||||
use openrc && newinitd "${FILESDIR}/${PN}.initd-r0" "${PN}"
|
||||
use systemd && systemd_dounit "${FILESDIR}/${PN}.service"
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
einfo "This package will not override your init system by default,"
|
||||
einfo "and if you want to use it as such, you will have to port the init scripts yourself"
|
||||
}
|
||||
Reference in New Issue
Block a user