Add sys-process/dinit
Signed-off-by: Shin'ya Minazuki <shinyoukai@laidback.moe>
This commit is contained in:
1
sys-process/dinit/Manifest
Normal file
1
sys-process/dinit/Manifest
Normal file
@@ -0,0 +1 @@
|
||||
DIST dinit-0.21.0.tar.gz 415328 BLAKE2B f1634ce5545918576bf2b2d5a689e9468a480667b28d2525ae1579c67e666aae026ebba99b8b9e67036799dbe0fb42273d23c836e31cce70797d7a0b83a2509f SHA512 9362ddc400570bed7c0d67eeeafef2e339834c8a71948542562e1c5467da7a6f0fad74599118138c02f2d08116a9a8bfe3d9d1a5d02ea0ccf5e97192ea5deea7
|
||||
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"
|
||||
}
|
||||
50
sys-process/dinit/dinit-9999.ebuild
Normal file
50
sys-process/dinit/dinit-9999.ebuild
Normal file
@@ -0,0 +1,50 @@
|
||||
# Copyright 2026 Shin'ya Minazuki
|
||||
EAPI=8
|
||||
|
||||
inherit git-r3 toolchain-funcs
|
||||
|
||||
DESCRIPTION="Service monitoring and init system"
|
||||
HOMEPAGE="https://davmac.org/projects/dinit/"
|
||||
EGIT_REPO_URI="https://github.com/davmac314/dinit"
|
||||
|
||||
LICENSE="Apache-2.0"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64"
|
||||
|
||||
DEPEND="capabilities? ( sys-libs/libcap )"
|
||||
RDEPEND="${DEPEND}"
|
||||
BDEPEND=""
|
||||
|
||||
IUSE="capabilities cgroups initgroups ioprio oom-adj shutdown utmpx"
|
||||
|
||||
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
|
||||
}
|
||||
|
||||
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"
|
||||
}
|
||||
9
sys-process/dinit/files/dinit.initd-r0
Normal file
9
sys-process/dinit/files/dinit.initd-r0
Normal file
@@ -0,0 +1,9 @@
|
||||
#!/sbin/openrc-run
|
||||
# Copyright 2026 Shin'ya Minazuki
|
||||
|
||||
supervisor="supervise-daemon"
|
||||
|
||||
command="/usr/sbin/${RC_SVCNAME}"
|
||||
command_args="-s -d /etc/dinit.d -q"
|
||||
command_background="true"
|
||||
pidfile="/run/${RC_SVCNAME}.pid"
|
||||
16
sys-process/dinit/metadata.xml
Normal file
16
sys-process/dinit/metadata.xml
Normal file
@@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
<maintainer type="person">
|
||||
<email>shinyoukai@laidback.moe</email>
|
||||
<name>Shin'ya Minazuki</name>
|
||||
</maintainer>
|
||||
<use>
|
||||
<flag name="capabilities">Enable support for capabilities (using sys-libs/libcap)</flag>
|
||||
<flag name="initgroups">Enable initialization of supplementary groups for run-as</flag>
|
||||
<flag name="ioprio">Enable support for I/O priority setting</flag>
|
||||
<flag name="oom-adj">Enable support for out of memory score adjustment</flag>
|
||||
<flag name="shutdown">Build the shutdown commands</flag>
|
||||
<flag name="utmpx">Enable manipulation of the utmp/utmpx database</flag>
|
||||
</use>
|
||||
</pkgmetadata>
|
||||
Reference in New Issue
Block a user