Files
guru/net-im/eturnal/eturnal-1.12.2.ebuild
Anna (cybertailor) Vyalkova 5f26f06023 net-im/eturnal: add 1.12.2, drop 1.12.0-r1
If you wondered why epmd was stopped after you stopped Eturnal, this is
now fixed by setting ERL_DIST_PORT during the build!

This commit also comes with a new revision of the OpenRC init service:

* Use supervise-daemon instead of s-s-d.
* Add startup command logging.
* Don't ping with superuser privileges.

Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo@sysrq.in>
2025-05-02 14:34:07 +05:00

65 lines
1.3 KiB
Bash

# Copyright 2024-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit rebar3 systemd
DESCRIPTION="STUN/TURN server"
HOMEPAGE="
https://eturnal.net/
https://github.com/processone/eturnal
"
SRC_URI="https://eturnal.net/download/${P}.tar.gz"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="~amd64"
DEPEND="
acct-user/eturnal
>=dev-lang/erlang-23.1:=[ssl]
dev-libs/libyaml
dev-libs/openssl:=
>=dev-erlang/conf-0.1
dev-erlang/fast_tls
dev-erlang/fast_yaml
dev-erlang/p1_utils
>=dev-erlang/stun-1.2
dev-erlang/yval
"
RDEPEND="${DEPEND}"
DOCS=( {CHANGELOG,README}.md doc/. )
REBAR_PROFILE=distro
src_configure() {
export ETURNAL_USER=eturnal
export ETURNAL_PREFIX="${EPREFIX}"/opt/eturnal
export ETURNAL_ETC_DIR="${EPREFIX}"/etc
export ERL_DIST_PORT=3470
export CODE_LOADING=dynamic
export SKIP_DEPS=true
rebar3_src_configure
}
rebar3_install_release() {
mkdir -p "${ED}"/opt/eturnal || die
cp -pR bin lib releases "${ED}"/opt/eturnal/ || die
systemd_dounit etc/systemd/system/eturnal.service
newinitd "${FILESDIR}"/eturnal.initd-r1 eturnal
newconfd etc/openrc/eturnal.confd eturnal
insinto /etc
doins etc/eturnal.yml
doins -r etc/logrotate.d
keepdir /opt/eturnal/{log,run}
fowners eturnal:turnserver /opt/eturnal/{log,run}
dosym -r /opt/eturnal/bin/eturnalctl /usr/sbin/eturnalctl
}