Add sys-process/immortal
Signed-off-by: Shin'ya Minazuki <shinyoukai@laidback.moe>
This commit is contained in:
parent
0114c96c76
commit
1cb1391367
6 changed files with 110 additions and 0 deletions
2
sys-process/immortal/Manifest
Normal file
2
sys-process/immortal/Manifest
Normal file
|
|
@ -0,0 +1,2 @@
|
||||||
|
DIST immortal-0.24.6-deps.tar.gz 84501 BLAKE2B 2271f7c9d29342c97ebdfb8131aeec1c858c43867c8e561ba08a1c78ce5b32e29f7e239b0d2728847c63bf48babc44985769ebe0f3d6473e87d4be0f8376acc9 SHA512 505efcc031c51a169dc996e9fae5620ea73d2a9eea735967deb7c89ce1f2ed5c82e031c49bb6fb803b732b77ae072ad2b3f478b507636b7c3c352b031753bb72
|
||||||
|
DIST immortal-0.24.6.tar.gz 48642 BLAKE2B a37869aa4f3f458aacc99a171c74f04e610ec38d54bb0d4573f2bfe2f3856bb20538c23ef1484e9243a0e1d9a3b70151bde800f56bc9a253521f6a6871344968 SHA512 9cedbd17c37be30f9a30c879c6a895e5f9e231043c968478df82bfc51dbc2f2f9a6cc46692896b710bd9a313ca668d4b1615ec6cf9cf4e42994b7371a3254d39
|
||||||
20
sys-process/immortal/files/immortaldir.initd-r0
Normal file
20
sys-process/immortal/files/immortaldir.initd-r0
Normal file
|
|
@ -0,0 +1,20 @@
|
||||||
|
#!/sbin/openrc-run
|
||||||
|
# Copyright 2026 Shin'ya Minazuki
|
||||||
|
|
||||||
|
supervisor="supervise-daemon"
|
||||||
|
command="/usr/sbin/immortaldir"
|
||||||
|
command_args="/etc/immortal"
|
||||||
|
command_background="true"
|
||||||
|
pidfile="/run/${RC_SVCNAME}.pid"
|
||||||
|
|
||||||
|
depend() {
|
||||||
|
need net
|
||||||
|
}
|
||||||
|
|
||||||
|
start_pre() {
|
||||||
|
if ! checkpath --directory /etc/immortal; then
|
||||||
|
eerror "Create the directory before starting ${RC_SVCNAME}"
|
||||||
|
eerror "Bailing out."
|
||||||
|
fi
|
||||||
|
eend $?
|
||||||
|
}
|
||||||
14
sys-process/immortal/files/immortaldir.service
Normal file
14
sys-process/immortal/files/immortaldir.service
Normal file
|
|
@ -0,0 +1,14 @@
|
||||||
|
[Unit]
|
||||||
|
Description=immortaldir
|
||||||
|
After=network.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
ExecStart=/usr/sbin/immortaldir /etc/immortal 2>&1 | logger -t immortaldir
|
||||||
|
KillMode=process
|
||||||
|
Restart=always
|
||||||
|
Restart=on-failure
|
||||||
|
Type=simple
|
||||||
|
User=root
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
33
sys-process/immortal/immortal-0.24.6.ebuild
Normal file
33
sys-process/immortal/immortal-0.24.6.ebuild
Normal file
|
|
@ -0,0 +1,33 @@
|
||||||
|
# Copyright 2026 Shin'ya Minazuki
|
||||||
|
EAPI=8
|
||||||
|
|
||||||
|
inherit go-module systemd
|
||||||
|
|
||||||
|
DESCRIPTION="A *nix cross-platform (OS agnostic) supervisor"
|
||||||
|
HOMEPAGE="https://immortal.run"
|
||||||
|
SRC_URI="
|
||||||
|
https://distfiles.chaotic.ninja/pub/${PN}/${P}.tar.gz
|
||||||
|
https://distfiles.chaotic.ninja/pub/${PN}/${P}-deps.tar.gz
|
||||||
|
"
|
||||||
|
|
||||||
|
LICENSE="BSD"
|
||||||
|
SLOT="0"
|
||||||
|
KEYWORDS="~amd64 ~arm ~arm64 ~x86"
|
||||||
|
|
||||||
|
RESTRICT="mirror"
|
||||||
|
|
||||||
|
src_compile() {
|
||||||
|
ego build -ldflags="-s -w -X main.version=v0.24.6-${PR}" -v -x ./cmd/...
|
||||||
|
}
|
||||||
|
|
||||||
|
src_install() {
|
||||||
|
newinitd "${FILESDIR}/immortaldir.initd-r0" "${PN}"
|
||||||
|
dosbin immortal
|
||||||
|
dosbin immortalctl
|
||||||
|
dosbin immortaldir
|
||||||
|
doman man/immortal.8
|
||||||
|
doman man/immortalctl.8
|
||||||
|
doman man/immortaldir.8
|
||||||
|
systemd_dounit "${FILESDIR}/immortaldir.service"
|
||||||
|
}
|
||||||
|
|
||||||
33
sys-process/immortal/immortal-9999.ebuild
Normal file
33
sys-process/immortal/immortal-9999.ebuild
Normal file
|
|
@ -0,0 +1,33 @@
|
||||||
|
# Copyright 2026 Shin'ya Minazuki
|
||||||
|
EAPI=8
|
||||||
|
|
||||||
|
inherit git-r3 go-module systemd
|
||||||
|
|
||||||
|
DESCRIPTION="A *nix cross-platform (OS agnostic) supervisor"
|
||||||
|
HOMEPAGE="https://immortal.run"
|
||||||
|
EGIT_REPO_URI="https://github.com/immortal/immortal"
|
||||||
|
|
||||||
|
LICENSE="BSD"
|
||||||
|
SLOT="0"
|
||||||
|
KEYWORDS=""
|
||||||
|
|
||||||
|
src_unpack() {
|
||||||
|
git-r3_src_unpack
|
||||||
|
go-module_live_vendor
|
||||||
|
}
|
||||||
|
|
||||||
|
src_compile() {
|
||||||
|
ego build -ldflags="-s -w -X main.version=v0.24.6-LIVE" -v -x ./cmd/...
|
||||||
|
}
|
||||||
|
|
||||||
|
src_install() {
|
||||||
|
newinitd "${FILESDIR}/immortaldir.initd-r0" "${PN}"
|
||||||
|
dosbin immortal
|
||||||
|
dosbin immortalctl
|
||||||
|
dosbin immortaldir
|
||||||
|
doman man/immortal.8
|
||||||
|
doman man/immortalctl.8
|
||||||
|
doman man/immortaldir.8
|
||||||
|
systemd_dounit "${FILESDIR}/immortaldir.service"
|
||||||
|
}
|
||||||
|
|
||||||
8
sys-process/immortal/metadata.xml
Normal file
8
sys-process/immortal/metadata.xml
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
<?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>
|
||||||
|
</pkgmetadata>
|
||||||
Loading…
Add table
Add a link
Reference in a new issue