SHA256
1
0
forked from pool/stuntman

Accepting request 817505 from home:mnhauke

Initial package for stuntman

OBS-URL: https://build.opensuse.org/request/show/817505
OBS-URL: https://build.opensuse.org/package/show/network:telephony/stuntman?expand=0&rev=1
This commit is contained in:
Jan Engelhardt 2020-06-28 11:15:25 +00:00 committed by Git OBS Bridge
commit d97eac9f8d
7 changed files with 141 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.osc

3
stunserver-1.2.16.tgz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:4479e1ae070651dfc4836a998267c7ac2fba4f011abcfdca3b8ccd7736d4fd26
size 123549

4
stuntman.changes Normal file
View File

@ -0,0 +1,4 @@
-------------------------------------------------------------------
Sun Jun 28 08:31:09 UTC 2020 - Martin Hauke <mardnh@gmx.de>
- Initial package, version 1.2.16

13
stuntman.service Normal file
View File

@ -0,0 +1,13 @@
[Unit]
Description=Stuntman STUN-Server
After=network.target
[Service]
Type=simple
User=stuntman
Group=stuntman
EnvironmentFile=/etc/sysconfig/stuntman
ExecStart=/usr/bin/stunserver $STUNSERVER_OPTIONS
[Install]
WantedBy=multi-user.target

96
stuntman.spec Normal file
View File

@ -0,0 +1,96 @@
#
# spec file for package stuntman
#
# Copyright (c) 2020, Martin Hauke <mardnh@gmx.de>
#
# 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 https://bugs.opensuse.org/
#
%define stuntman_user stuntman
%define stuntman_group stuntman
%define stuntman_home %{_localstatedir}/lib/stuntman
Name: stuntman
Version: 1.2.16
Release: 0
Summary: STUN server and client
License: Apache-2.0
Group: Productivity/Telephony/Servers
URL: http://www.stunprotocol.org
#Git-Clone: https://github.com/jselbie/stunserver.git
Source: http://www.stunprotocol.org/stunserver-%{version}.tgz
Source1: %{name}.service
Source2: %{name}.sysconfig
BuildRequires: boost-devel
BuildRequires: gcc-c++
BuildRequires: help2man
BuildRequires: openssl-devel
BuildRequires: systemd-rpm-macros
Requires(pre): shadow
%description
An implementation of the STUN protocol (Session Traversal Utilities
for NAT) as specified in RFCs 5389, 5769, and 5780. It also includes
backwards compatibility for RFC 3489.
This package provides an STUN server and client application.
%prep
%setup -q -n stunserver
%build
%make_build STANDARD_FLAGS="%optflags"
%install
install -d %{buildroot}%{_bindir}
install -pm755 stunclient %{buildroot}%{_bindir}/stunclient
install -pm755 stunserver %{buildroot}%{_bindir}/stunserver
install -d %{buildroot}/%{_localstatedir}/lib/stuntman
install -D -m0644 %{SOURCE1} %{buildroot}%{_unitdir}/%{name}.service
install -D -m0644 %{SOURCE2} %{buildroot}%{_fillupdir}/sysconfig.stuntman
install -d %{buildroot}%{_sbindir}
ln -s %{_sbindir}/service %{buildroot}%{_sbindir}/rc%{name}
# create manpages
install -d %{buildroot}%{_mandir}/man1
help2man ./stunclient -n stunclient > %{buildroot}%{_mandir}/man1/stunclient.1
help2man ./stunserver -n stunserver > %{buildroot}%{_mandir}/man1/stunserver.1
%pre
%service_add_pre %{name}.service
# Create stuntman user/group
getent group %{stuntman_group} >/dev/null || groupadd -r %{stuntman_group}
getent passwd %{stuntman_user} >/dev/null || useradd -r -g %{stuntman_group} -d %{stuntman_home} -s /sbin/nologin -c "stuntman - STUN Server" %{stuntman_user}
%post
%service_add_post %{name}.service
%fillup_only
%preun
%service_del_preun %{name}.service
%postun
%service_del_postun %{name}.service
%check
cd testcode && ./stuntestcode
%files
%license LICENSE
%doc HISTORY README
%doc testcode/stun.conf
%{_bindir}/stunclient
%{_bindir}/stunserver
%{_sbindir}/rc%{name}
%{_unitdir}/%{name}.service
%{_fillupdir}/sysconfig.stuntman
%{_mandir}/man1/stunclient.1%{ext_man}
%{_mandir}/man1/stunserver.1%{ext_man}
%changelog

1
stuntman.sysconfig Normal file
View File

@ -0,0 +1 @@
STUNSERVER_OPTIONS=""