2021-01-11 12:48:01 +00:00
|
|
|
#
|
|
|
|
# spec file for package eturnal
|
|
|
|
#
|
|
|
|
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
2021-01-24 03:17:31 +00:00
|
|
|
|
2021-01-11 12:48:01 +00:00
|
|
|
%define systemuser _eturnal
|
2021-01-11 17:20:58 +00:00
|
|
|
%define appdir /usr/lib/eturnal
|
2021-01-25 14:09:45 +00:00
|
|
|
%define homedir /var/lib/eturnal
|
2021-01-11 12:48:01 +00:00
|
|
|
|
|
|
|
Name: eturnal
|
2023-09-28 10:15:22 +00:00
|
|
|
Version: 1.12.0
|
2021-01-11 12:48:01 +00:00
|
|
|
Release: 1
|
|
|
|
Summary: A modern, straightforward STUN and TURN server
|
|
|
|
Group: Productivity/Networking/Talk/Servers
|
2021-11-03 14:43:48 +00:00
|
|
|
License: Apache-2.0
|
2021-01-11 12:48:01 +00:00
|
|
|
URL: https://eturnal.net/
|
2021-01-11 17:20:58 +00:00
|
|
|
Source0: https://eturnal.net/download/eturnal-%{version}.tar.gz
|
2022-01-10 13:33:22 +00:00
|
|
|
Source1: eturnalctl
|
2021-01-11 17:20:58 +00:00
|
|
|
Source99: eturnal.sysusers
|
2021-01-28 20:58:59 +00:00
|
|
|
Patch0: use_distro_path.patch
|
2021-01-11 17:20:58 +00:00
|
|
|
BuildArch: noarch
|
2021-01-11 12:48:01 +00:00
|
|
|
BuildRequires: sysuser-shadow
|
|
|
|
BuildRequires: sysuser-tools
|
|
|
|
BuildRequires: pkgconfig(systemd)
|
|
|
|
%{?systemd_ordering}
|
2022-08-01 12:16:39 +00:00
|
|
|
%{sysusers_requires}
|
2021-01-24 21:24:22 +00:00
|
|
|
# for logger
|
|
|
|
Requires: util-linux-systemd
|
|
|
|
Requires(preun): util-linux-systemd
|
|
|
|
Requires(postun): util-linux-systemd
|
2021-01-11 12:48:01 +00:00
|
|
|
|
|
|
|
BuildRequires: erlang >= 21
|
2021-01-24 03:17:31 +00:00
|
|
|
BuildRequires: erlang-rebar3
|
2021-01-11 17:20:58 +00:00
|
|
|
%requires_eq erlang
|
2021-01-11 12:48:01 +00:00
|
|
|
# from rebar.config
|
2022-08-02 21:33:27 +00:00
|
|
|
BuildRequires: erlang-stun-devel >= 1.2.5
|
2021-01-11 12:48:01 +00:00
|
|
|
%requires_eq erlang-stun
|
|
|
|
#
|
2021-11-03 14:39:27 +00:00
|
|
|
BuildRequires: erlang-conf-devel >= 0.2.2
|
2021-01-11 12:48:01 +00:00
|
|
|
%requires_eq erlang-conf
|
|
|
|
#
|
2021-11-03 14:39:27 +00:00
|
|
|
BuildRequires: erlang-recon-devel >= 2.5.2
|
2021-01-11 12:48:01 +00:00
|
|
|
%requires_eq erlang-recon
|
|
|
|
#
|
2021-01-11 17:20:58 +00:00
|
|
|
%if %{with influxdb}
|
2021-11-03 14:39:27 +00:00
|
|
|
BuildRequires: erlang-influx_udp-devel >= 1.1.2
|
2021-01-11 12:48:01 +00:00
|
|
|
%requires_eq erlang-influx_udp
|
2021-01-11 17:20:58 +00:00
|
|
|
%endif
|
2021-01-11 12:48:01 +00:00
|
|
|
#/ from rebar.config
|
2022-01-10 13:33:22 +00:00
|
|
|
Requires: sudo
|
2021-01-11 12:48:01 +00:00
|
|
|
|
|
|
|
%description
|
|
|
|
eturnal is a modern, straightforward STUN and TURN server with full IPv6
|
|
|
|
support. For TURN authentication, the mechanism described in the REST API for
|
|
|
|
Access to TURN Services specification is implemented.
|
|
|
|
|
|
|
|
%prep
|
2021-01-11 17:20:58 +00:00
|
|
|
%autosetup -p 1
|
2021-01-11 12:48:01 +00:00
|
|
|
|
|
|
|
%build
|
2021-01-24 03:17:31 +00:00
|
|
|
rm rebar.lock
|
|
|
|
SKIP_DEPS=true ./rebar3 as distro release
|
2021-01-25 13:23:31 +00:00
|
|
|
|
2021-01-11 12:48:01 +00:00
|
|
|
%sysusers_generate_pre %{SOURCE99} eturnal
|
|
|
|
|
|
|
|
%install
|
|
|
|
export REBAR_DEPS_PREFER_LIBS=1
|
2021-01-11 17:20:58 +00:00
|
|
|
install -D -m 0644 %{SOURCE99} %{buildroot}%{_sysusersdir}/eturnal.conf
|
2022-01-10 13:33:22 +00:00
|
|
|
install -D -m 0755 %{SOURCE1} %{buildroot}%{_sbindir}/eturnalctl
|
2021-01-24 03:17:31 +00:00
|
|
|
install -D -m 0755 -d %{buildroot}%{appdir}/ %{buildroot}%{_sbindir}
|
|
|
|
cp -rv \
|
|
|
|
_build/distro/rel/eturnal/bin/ \
|
|
|
|
_build/distro/rel/eturnal/releases/ \
|
|
|
|
_build/distro/rel/eturnal/lib/ \
|
|
|
|
%{buildroot}%{appdir}/
|
|
|
|
|
|
|
|
install -D -m 0644 _build/distro/rel/eturnal/etc/systemd/system/eturnal.service %{buildroot}%{_unitdir}/eturnal.service
|
|
|
|
install -D -m 0640 _build/distro/rel/eturnal/etc/eturnal.yml %{buildroot}%{_sysconfdir}/eturnal.yml
|
2021-01-11 17:20:58 +00:00
|
|
|
ln -s /usr/sbin/service %{buildroot}%{_sbindir}/rc%{name}
|
|
|
|
|
2021-01-25 14:09:45 +00:00
|
|
|
install -D -m 0750 -d %{buildroot}%{homedir}
|
2021-01-11 17:20:58 +00:00
|
|
|
|
|
|
|
%pre -f %{name}.pre
|
|
|
|
%service_add_pre %{name}.service
|
|
|
|
|
|
|
|
%post
|
|
|
|
%service_add_post %{name}.service
|
|
|
|
|
|
|
|
%preun
|
|
|
|
%service_del_preun %{name}.service
|
|
|
|
|
|
|
|
%postun
|
|
|
|
%service_del_postun %{name}.service
|
|
|
|
|
2021-01-11 12:48:01 +00:00
|
|
|
|
|
|
|
%files
|
2021-01-24 03:17:31 +00:00
|
|
|
%doc *.md
|
|
|
|
%license LICENSE
|
2021-01-11 17:20:58 +00:00
|
|
|
%config(noreplace) %attr(-,root,%{systemuser}) %{_sysconfdir}/eturnal.yml
|
|
|
|
%{_sysusersdir}/eturnal.conf
|
|
|
|
%{_unitdir}/eturnal.service
|
|
|
|
%{appdir}/
|
|
|
|
%{_sbindir}/rc%{name}
|
2022-01-10 13:33:22 +00:00
|
|
|
%{_sbindir}/eturnalctl
|
2021-01-25 14:09:45 +00:00
|
|
|
%dir %attr(-,%{systemuser},%{systemuser}) %{homedir}
|
2021-01-11 12:48:01 +00:00
|
|
|
|
|
|
|
%changelog
|