summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--jamulus-headless/PKGBUILD34
-rw-r--r--jamulus-headless/jamulus.install35
-rw-r--r--jamulus-headless/jamulus.service29
3 files changed, 98 insertions, 0 deletions
diff --git a/jamulus-headless/PKGBUILD b/jamulus-headless/PKGBUILD
new file mode 100644
index 000000000..d03454650
--- /dev/null
+++ b/jamulus-headless/PKGBUILD
@@ -0,0 +1,34 @@
+# Maintainer: Erich Eckner <arch at eckner dot net>
+# Contributor: Jose Riha <jose1711 gmail com>
+# Contributor: Jujudusud <jujudusud gmail com>
+
+pkgname=jamulus-headless
+_pkgname=Jamulus
+pkgver=3.6.2
+pkgrel=1
+pkgdesc="Internet jam session software (headless server)"
+arch=('x86_64')
+url='http://llcon.sourceforge.net/'
+install=jamulus.install
+license=('GPL2')
+depends=('glibc' 'gcc-libs' 'qt5-base')
+provides=('jamulus')
+source=("jamulus-${pkgver}.tar.gz::https://github.com/corrados/jamulus/archive/r${pkgver//./_}.tar.gz"
+ "jamulus.service")
+
+build() {
+ cd "${srcdir}/jamulus-r${pkgver//./_}"
+ qmake "CONFIG+=nosound headless" Jamulus.pro
+ make clean
+ make
+}
+
+package() {
+ cd "${srcdir}/jamulus-r${pkgver//./_}"
+ install -Dm755 Jamulus "${pkgdir}/usr/bin/Jamulus-headless"
+ install -vDm 644 {ChangeLog,README.md} -t "${pkgdir}/usr/share/doc/${pkgname}"
+ install -Dm644 $srcdir/jamulus.service $pkgdir/usr/lib/systemd/system/jamulus.service
+}
+
+sha512sums=('a5c270a5dc69eb101909ffc57247afcf6d254987ce7453a456defbc8266450ab433441e00ebe0ab856e46a50f6fc4b5caf4ed5b2912edc3fa216e00302b9ba45'
+ 'f59901ad1fc9f3108beb0f70cbb4b5f9e49d3148727a5869cdf3ba878a88cae069a09135b7d976d4d5060a64f038d7720eba45058f96ee003b47383cc2ecdf3a')
diff --git a/jamulus-headless/jamulus.install b/jamulus-headless/jamulus.install
new file mode 100644
index 000000000..1faa132ea
--- /dev/null
+++ b/jamulus-headless/jamulus.install
@@ -0,0 +1,35 @@
+post_install() {
+ getent passwd jamulus &>/dev/null || {
+ echo "Creating jamulus user.."
+ useradd --system --no-create-home -g nobody -s /bin/false jamulus &>/dev/null
+ }
+ cat <<HERE
+Configure server variables:
+ sudo systemctl edit jamulus.service
+ paste the following text and adjust according to your needs
+
+# central_server => https://github.com/corrados/jamulus/wiki/Central-Servers
+# country ID => https://doc.qt.io/qt-5/qlocale.html#Country-enum
+[Service]
+Environment=central_server="name_of_the_server"
+Environment=server_info="yourServerName;yourCity;[country ID]"
+
+ systemctl daemon-reload
+
+To start the service:
+ sudo systemctl start jamulus
+
+To enable the service at boot:
+ sudo systemctl enable jamulus
+
+HERE
+}
+
+post_remove() {
+ echo "Consider removing jamulus user from the system"
+}
+
+op=$1
+shift
+
+$op "$@"
diff --git a/jamulus-headless/jamulus.service b/jamulus-headless/jamulus.service
new file mode 100644
index 000000000..0a0caeed5
--- /dev/null
+++ b/jamulus-headless/jamulus.service
@@ -0,0 +1,29 @@
+[Unit]
+Description=Jamulus-Server
+After=network.target
+
+[Service]
+Type=simple
+User=jamulus
+Group=nobody
+NoNewPrivileges=true
+ProtectSystem=true
+ProtectHome=true
+Nice=-20
+IOSchedulingClass=realtime
+IOSchedulingPriority=0
+Environment=central_server="jamulus.fischvolk.de"
+Environment=server_info="yourServerName;yourCity;[country ID]"
+
+#### Change this to set genre, location and other parameters.
+#### See https://github.com/corrados/jamulus/wiki/Command-Line-Options ####
+ExecStart=/usr/bin/Jamulus-headless -s -n -e "${central_server}" -o "${server_info}"
+
+Restart=on-failure
+RestartSec=30
+StandardOutput=journal
+StandardError=inherit
+SyslogIdentifier=jamulus
+
+[Install]
+WantedBy=multi-user.target