forked from pool/Jamulus
Accepting request 863369 from home:ecsos
- Add services for headless public and private server. - Add services for newRecording and ToggleRecording. - Add sysconfig for service files. - Add firewalld for private server. - Add user jamulus for server services. OBS-URL: https://build.opensuse.org/request/show/863369 OBS-URL: https://build.opensuse.org/package/show/multimedia:apps/Jamulus?expand=0&rev=33
This commit is contained in:
7
Jamulus-newrec.service
Normal file
7
Jamulus-newrec.service
Normal file
@@ -0,0 +1,7 @@
|
||||
[Unit]
|
||||
Description=Start a new recording on Jamulus server
|
||||
Requisite=Jamulus-Server
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=/bin/systemctl kill -s SIGUSR1 jamulus
|
29
Jamulus-private.service
Normal file
29
Jamulus-private.service
Normal file
@@ -0,0 +1,29 @@
|
||||
|
||||
[Unit]
|
||||
Description=Jamulus-Server
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
EnvironmentFile=-/etc/sysconfig/jamulus
|
||||
User=jamulus
|
||||
Group=nogroup
|
||||
NoNewPrivileges=true
|
||||
ProtectSystem=true
|
||||
ProtectHome=true
|
||||
Nice=-20
|
||||
IOSchedulingClass=realtime
|
||||
IOSchedulingPriority=0
|
||||
|
||||
#### Change this to set genre, location and other parameters.
|
||||
#### See [Command-Line-Options](Command-Line-Options) ####
|
||||
ExecStart=/usr/bin/Jamulus -s -n -o "${yourServername};${yourCity};[${yourCountryID}]"
|
||||
|
||||
Restart=on-failure
|
||||
RestartSec=30
|
||||
StandardOutput=journal
|
||||
StandardError=inherit
|
||||
SyslogIdentifier=jamulus
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
29
Jamulus-public.service
Normal file
29
Jamulus-public.service
Normal file
@@ -0,0 +1,29 @@
|
||||
|
||||
[Unit]
|
||||
Description=Jamulus-Server
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
EnvironmentFile=-/etc/sysconfig/jamulus
|
||||
User=jamulus
|
||||
Group=nogroup
|
||||
NoNewPrivileges=true
|
||||
ProtectSystem=true
|
||||
ProtectHome=true
|
||||
Nice=-20
|
||||
IOSchedulingClass=realtime
|
||||
IOSchedulingPriority=0
|
||||
|
||||
#### Change this to set genre, location and other parameters.
|
||||
#### See [Command-Line-Options](Command-Line-Options) ####
|
||||
ExecStart=/usr/bin/Jamulus -s -n -e ${CENTRALSERVER} -o "${yourServername};${yourCity};[${yourCountryID}]"
|
||||
|
||||
Restart=on-failure
|
||||
RestartSec=30
|
||||
StandardOutput=journal
|
||||
StandardError=inherit
|
||||
SyslogIdentifier=jamulus
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
7
Jamulus-togglerec.service
Normal file
7
Jamulus-togglerec.service
Normal file
@@ -0,0 +1,7 @@
|
||||
[Unit]
|
||||
Description=Toggle recording state of Jamulus server
|
||||
Requisite=Jamulus-Server
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=/bin/systemctl kill -s SIGUSR2 jamulus
|
@@ -1,3 +1,12 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Jan 14 10:49:11 UTC 2021 - ecsos <ecsos@opensuse.org>
|
||||
|
||||
- Add services for headless public and private server.
|
||||
- Add services for newRecording and ToggleRecording.
|
||||
- Add sysconfig for service files.
|
||||
- Add firewalld for private server.
|
||||
- Add user jamulus for server services.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Dec 13 09:18:17 UTC 2020 - Konstantin Voinov <kv@kott.no-ip.biz>
|
||||
|
||||
|
7
Jamulus.firewalld
Normal file
7
Jamulus.firewalld
Normal file
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<service>
|
||||
<short>Jamulus (Private-Server)</short>
|
||||
<description>Only need for running a Jamulus Private-Server. Not needed for running a Public-Server.</description>
|
||||
<port protocol="udp" port="22124"/>
|
||||
</service>
|
||||
|
108
Jamulus.spec
108
Jamulus.spec
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package Jamulus
|
||||
#
|
||||
# Copyright (c) 2020 SUSE LLC
|
||||
# Copyright (c) 2021 SUSE LLC
|
||||
# Copyright (c) 2014 Pascal Bleser <pascal.bleser@opensuse.org>
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
@@ -17,6 +17,10 @@
|
||||
#
|
||||
|
||||
|
||||
%if ! %{defined _fillupdir}
|
||||
%define _fillupdir %{_localstatedir}/adm/fillup-templates
|
||||
%endif
|
||||
|
||||
%define tarball_version 3_6_2
|
||||
|
||||
Name: Jamulus
|
||||
@@ -27,12 +31,23 @@ License: GPL-2.0-or-later
|
||||
URL: http://llcon.sourceforge.net/index.html
|
||||
Source0: https://github.com/corrados/jamulus/archive/r%{tarball_version}.tar.gz#/jamulus-r%{tarball_version}.tar.gz
|
||||
Source1: %{name}_icon.png
|
||||
Source10: %{name}-public.service
|
||||
Source11: %{name}-private.service
|
||||
Source12: %{name}-newrec.service
|
||||
Source13: %{name}-togglerec.service
|
||||
Source20: %{name}.sysconfig
|
||||
Source21: %{name}.firewalld
|
||||
Source90: README.SUSE
|
||||
BuildRequires: ImageMagick
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: firewall-macros
|
||||
BuildRequires: firewalld
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: hicolor-icon-theme
|
||||
BuildRequires: jack-devel
|
||||
BuildRequires: pkgconfig
|
||||
BuildRequires: pwdutils
|
||||
BuildRequires: systemd-rpm-macros
|
||||
BuildRequires: update-desktop-files
|
||||
BuildRequires: pkgconfig(Qt5Concurrent)
|
||||
BuildRequires: pkgconfig(Qt5Network)
|
||||
@@ -40,10 +55,13 @@ BuildRequires: pkgconfig(Qt5Widgets)
|
||||
BuildRequires: pkgconfig(Qt5Xml)
|
||||
BuildRequires: pkgconfig(opus)
|
||||
Requires: jack
|
||||
Requires(pre): shadow
|
||||
Requires(pre): %fillup_prereq
|
||||
Provides: llcon = %{version}
|
||||
Obsoletes: llcon < %{version}
|
||||
Provides: jamulus = %{version}
|
||||
Obsoletes: jamulus < %{version}
|
||||
%{?systemd_requires}
|
||||
|
||||
%description
|
||||
The Jamulus software enables musicians to perform real-time jam sessions over
|
||||
@@ -54,6 +72,7 @@ and sends the mix back to each client.
|
||||
%prep
|
||||
%autosetup -p1 -n jamulus-r%{tarball_version}
|
||||
install %{SOURCE1} .
|
||||
install -m644 %{SOURCE90} .
|
||||
|
||||
%build
|
||||
%qmake5 CONFIG+=opus_shared_lib CONFIG+=disable_version_check
|
||||
@@ -69,17 +88,98 @@ done
|
||||
install -Dm0644 %{buildroot}%{_datadir}/icons/hicolor/48x48/apps/%{name}.png \
|
||||
%{buildroot}%{_datadir}/pixmaps/%{name}.png
|
||||
|
||||
%suse_update_desktop_file -c %{name} %{name} "Internet Jam Session Software" %{name} %{name} "AudioVideo;Audio;Mixer;Qt"
|
||||
%suse_update_desktop_file -C "Jam Session" %{name}
|
||||
# sysconfig
|
||||
install -d -m0755 %{buildroot}%{_fillupdir}
|
||||
install -D -m0644 %{SOURCE20} %{buildroot}%{_fillupdir}/sysconfig.jamulus
|
||||
|
||||
# firewalld
|
||||
install -D -m0644 %{SOURCE21} %{buildroot}%{_libexecdir}/firewalld/services/jamulus.xml
|
||||
|
||||
# systemd/services
|
||||
install -D -m0644 %{SOURCE10} %{buildroot}%{_unitdir}/jamulus-public.service
|
||||
install -d -m0755 %{buildroot}%{_sbindir}
|
||||
ln -s /usr/sbin/service %{buildroot}%{_sbindir}/rcjamulus-public
|
||||
|
||||
install -D -m0644 %{SOURCE11} %{buildroot}%{_unitdir}/jamulus-private.service
|
||||
install -d -m0755 %{buildroot}%{_sbindir}
|
||||
ln -s /usr/sbin/service %{buildroot}%{_sbindir}/rcjamulus-private
|
||||
|
||||
install -D -m0644 %{SOURCE12} %{buildroot}%{_unitdir}/jamulus-newrec.service
|
||||
install -d -m0755 %{buildroot}%{_sbindir}
|
||||
ln -s /usr/sbin/service %{buildroot}%{_sbindir}/rcjamulus-newrec
|
||||
|
||||
install -D -m0644 %{SOURCE13} %{buildroot}%{_unitdir}/jamulus-togglerec.service
|
||||
install -d -m0755 %{buildroot}%{_sbindir}
|
||||
ln -s /usr/sbin/service %{buildroot}%{_sbindir}/rcjamulus-togglerec
|
||||
|
||||
# desktop file
|
||||
sed -i -e 's|$$TARGET|Jamulus|g' distributions/jamulus.desktop.in
|
||||
sed -i -e 's|Icon=jamulus|Icon=Jamulus|g' distributions/jamulus.desktop.in
|
||||
install -D -m 0644 distributions/jamulus.desktop.in %{buildroot}%{_datadir}/applications/%{name}.desktop
|
||||
%suse_update_desktop_file %{name}
|
||||
|
||||
%fdupes %{buildroot}%{_datadir}
|
||||
|
||||
%pre
|
||||
%service_add_pre jamulus-public.service
|
||||
%service_add_pre jamulus-private.service
|
||||
%service_add_pre jamulus-newrec.service
|
||||
%service_add_pre jamulus-togglerec.service
|
||||
if
|
||||
getent passwd jamulus >/dev/null
|
||||
then
|
||||
: OK user jamulus already present.
|
||||
else
|
||||
useradd -r -g nogroup -d /var/lib/empty -s /bin/false -c "Jamulus Server" jamulus 2> /dev/null || :
|
||||
fi
|
||||
|
||||
%post
|
||||
%service_add_post jamulus-public.service
|
||||
%service_add_post jamulus-private.service
|
||||
%service_add_post jamulus-newrec.service
|
||||
%service_add_post jamulus-togglerec.service
|
||||
%{fillup_only -n jamulus}
|
||||
%firewalld_reload
|
||||
|
||||
%preun
|
||||
%service_del_preun jamulus-public.service
|
||||
%service_del_preun jamulus-private.service
|
||||
%service_del_preun jamulus-newrec.service
|
||||
%service_del_preun jamulus-togglerec.service
|
||||
|
||||
%postun
|
||||
%service_del_postun jamulus-public.service
|
||||
%service_del_postun jamulus-private.service
|
||||
%service_del_postun jamulus-newrec.service
|
||||
%service_del_postun jamulus-togglerec.service
|
||||
if [ $1 -eq 0 ]; then
|
||||
%{_sbindir}/userdel jamulus
|
||||
rm -rf %{_sysconfdir}/sysconfig/jamulus
|
||||
else
|
||||
true
|
||||
fi
|
||||
|
||||
%files
|
||||
%doc README.md ChangeLog
|
||||
%doc README.md ChangeLog README.SUSE
|
||||
%license COPYING
|
||||
%{_bindir}/%{name}
|
||||
%{_datadir}/applications/%{name}.desktop
|
||||
%{_datadir}/icons/hicolor/*/apps/%{name}.png
|
||||
%{_datadir}/pixmaps/%{name}.png
|
||||
# sysconfig
|
||||
%{_fillupdir}/sysconfig.jamulus
|
||||
# firewalld
|
||||
%config(noreplace) %{_libexecdir}/firewalld/services/jamulus.xml
|
||||
%dir %{_libexecdir}/firewalld
|
||||
%dir %{_libexecdir}/firewalld/services
|
||||
# systemd/services
|
||||
%{_unitdir}/jamulus-public.service
|
||||
%{_sbindir}/rcjamulus-public
|
||||
%{_unitdir}/jamulus-private.service
|
||||
%{_sbindir}/rcjamulus-private
|
||||
%{_unitdir}/jamulus-newrec.service
|
||||
%{_sbindir}/rcjamulus-newrec
|
||||
%{_unitdir}/jamulus-togglerec.service
|
||||
%{_sbindir}/rcjamulus-togglerec
|
||||
|
||||
%changelog
|
||||
|
16
Jamulus.sysconfig
Normal file
16
Jamulus.sysconfig
Normal file
@@ -0,0 +1,16 @@
|
||||
# central server
|
||||
# select only one central server and port from 4 possible genres.
|
||||
#################################################################
|
||||
# genre: Default
|
||||
############
|
||||
CENTRALSERVER="jamulusallgenres.fischvolk.de:22224"
|
||||
# genre: Rock
|
||||
#CENTRALSERVER="jamulusrock.fischvolk.de:22424"
|
||||
# genre: Jazz
|
||||
#CENTRALSERVER="jamulusjazz.fischvolk.de:22324"
|
||||
# genre: Klassik/Folklore/Chor
|
||||
#CENTRALSERVER="jamulusclassical.fischvolk.de:22524"
|
||||
# Your Server
|
||||
yourServername=""
|
||||
yourCity=""
|
||||
yourCountryID=""
|
24
README.SUSE
Normal file
24
README.SUSE
Normal file
@@ -0,0 +1,24 @@
|
||||
You can start Jamulus as Client and as headless Public and Private Server.
|
||||
|
||||
For starting in headless mode it exists two service files.
|
||||
Additional two service files for toggle recording and new recording.
|
||||
|
||||
Starting headless Public Server
|
||||
===============================
|
||||
|
||||
1. Change settings in /etc/sysconfig/jamulus
|
||||
|
||||
2. Then starting Server with:
|
||||
|
||||
systemctl start jamulus-public.service
|
||||
|
||||
or
|
||||
|
||||
systemctl start jamulus-private.service
|
||||
|
||||
For private Server you must enable port forwarding in your router
|
||||
and perhaps open port UDP:22124 your firewall.
|
||||
|
||||
Connecting to your Private Server
|
||||
=================================
|
||||
To connect local to your Private Server you must use localhost as your server in GUI.
|
Reference in New Issue
Block a user