[packages/stunserver] new package

jajcus jajcus at pld-linux.org
Fri Mar 18 11:17:58 CET 2016


commit 85cd26043415d68bc567c85940b8f95b30e74b0d
Author: Jacek Konieczny <j.konieczny at eggsoft.pl>
Date:   Fri Mar 18 11:17:44 2016 +0100

    new package

 stunserver.service   | 16 +++++++++++
 stunserver.spec      | 80 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 stunserver.sysconfig |  1 +
 3 files changed, 97 insertions(+)
---
diff --git a/stunserver.spec b/stunserver.spec
new file mode 100644
index 0000000..f0fd18b
--- /dev/null
+++ b/stunserver.spec
@@ -0,0 +1,80 @@
+#
+# Conditional build:
+%bcond_without	tests		# build without tests
+#
+Summary:	STUNTMAN STUN server
+Name:		stunserver
+Version:	1.2.9
+Release:	1
+License:	Apache v2.0
+Group:		Networking/Daemons
+Source0:	http://www.stunprotocol.org/%{name}-%{version}.tgz
+# Source0-md5:	cfd13029362997c1d6e3299b38d520d6
+Source1:	%{name}.service
+Source2:	%{name}.sysconfig
+URL:		http://www.stunprotocol.org/
+BuildRequires:	rpmbuild(macros) >= 1.647
+Requires(post,preun,postun):	systemd-units >= 38
+BuildRequires:	openssl-devel
+Requires:	systemd-units >= 0.38
+BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+STUNTMAN is an open source 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 contains a high performance STUN server.
+
+%package -n stunclient
+Summary:	STUNTMAN STUN client
+Group:		Networking/Utilities
+
+%description -n stunclient
+STUNTMAN is an open source 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 contains the client application.
+
+%prep
+%setup -qn %{name}
+
+%build
+%{__make} \
+	RELEASE_FLAGS="%{rpmcxxflags}" \
+	CXX_FLAGS="%{rpmcxxflags}" \
+	LDFLAGS="%{rpmldflags}"
+
+%{?with_tests:./stuntestcode}
+
+%install
+rm -rf $RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT{%{_bindir},%{systemdunitdir},/etc/sysconfig}
+
+cp -p stunclient stunserver $RPM_BUILD_ROOT%{_bindir}
+cp -p %{SOURCE1} $RPM_BUILD_ROOT%{systemdunitdir}/%{name}.service
+cp -p %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post
+%systemd_post %{name}.service
+
+%preun
+%systemd_preun %{name}.service
+
+%postun
+%systemd_reload
+
+%files
+%defattr(644,root,root,755)
+%doc README HISTORY
+%attr(755,root,root) %{_bindir}/stunserver
+%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/stunserver
+%{systemdunitdir}/%{name}.service
+
+%files -n stunclient
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_bindir}/stunclient
diff --git a/stunserver.service b/stunserver.service
new file mode 100644
index 0000000..e3d0b18
--- /dev/null
+++ b/stunserver.service
@@ -0,0 +1,16 @@
+[Unit]
+Description=STUN server
+After=network.target
+
+[Service]
+EnvironmentFile=-/etc/sysconfig/stunserver
+Type=simple
+ExecStart=/usr/bin/stunserver $STUNSERVER_OPTIONS
+User=nobody
+Group=nobody
+Restart=on-failure
+ProtectSystem=full
+NoNewPrivileges=true
+
+[Install]
+WantedBy=multi-user.target
diff --git a/stunserver.sysconfig b/stunserver.sysconfig
new file mode 100644
index 0000000..d8ae41b
--- /dev/null
+++ b/stunserver.sysconfig
@@ -0,0 +1 @@
+STUNSERVER_OPTIONS="--verbosity 2"
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/stunserver.git/commitdiff/85cd26043415d68bc567c85940b8f95b30e74b0d



More information about the pld-cvs-commit mailing list