Skip to content

Commit

Permalink
contrib/coturn: new package (4.6.2)
Browse files Browse the repository at this point in the history
  • Loading branch information
ttyyls authored and nekopsykose committed May 26, 2024
1 parent ef1bf2a commit 6295586
Show file tree
Hide file tree
Showing 6 changed files with 59 additions and 0 deletions.
1 change: 1 addition & 0 deletions contrib/coturn-devel
6 changes: 6 additions & 0 deletions contrib/coturn/files/coturn
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# coturn system service

type = process
command = /usr/bin/turnserver
logfile = /var/log/coturn.log
run-as = _coturn
3 changes: 3 additions & 0 deletions contrib/coturn/files/sysusers.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# create coturn user

u _coturn - "Coturn user" /var/empty
3 changes: 3 additions & 0 deletions contrib/coturn/files/tmpfiles.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Create coturn state directories

d /var/lib/coturn 0755 _coturn _coturn -
44 changes: 44 additions & 0 deletions contrib/coturn/template.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
pkgname = "coturn"
pkgver = "4.6.2"
pkgrel = 0
build_style = "gnu_configure"
configure_args = ["--turndbdir=/var/lib/coturn"]
configure_gen = []
make_cmd = "gmake"
make_dir = "."
make_check_target = "test"
hostmakedepends = ["gmake", "pkgconf"]
makedepends = [
"hiredis-devel",
"libevent-devel",
"linux-headers",
"openssl-devel",
"sqlite-devel",
]
pkgdesc = "VoIP media traffic NAT traversal server and gateway"
maintainer = "ttyyls <contact@behri.org>"
license = "BSD-3-Clause"
url = "https://github.com/coturn/coturn"
source = f"{url}/archive/refs/tags/{pkgver}.tar.gz"
sha256 = "13f2a38b66cffb73d86b5ed24acba4e1371d738d758a6039e3a18f0c84c176ad"
hardening = ["vis", "cfi"]


def post_install(self):
self.install_license("LICENSE")
self.install_service(self.files_path / "coturn")
self.install_file(
self.files_path / "sysusers.conf",
"usr/lib/sysusers.d",
name="coturn.conf",
)
self.install_file(
self.files_path / "tmpfiles.conf",
"usr/lib/tmpfiles.d",
name="coturn.conf",
)


@subpackage("coturn-devel")
def _devel(self):
return self.default_devel()
2 changes: 2 additions & 0 deletions contrib/coturn/update.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
url = "https://api.github.com/repos/coturn/coturn/git/refs/tags"
pattern = r"refs/tags/([\d.]+)"

0 comments on commit 6295586

Please sign in to comment.