From e3d68a6c1c7c6331610bf089b6f4e8acffe78894 Mon Sep 17 00:00:00 2001 From: allan Date: Thu, 31 Mar 2016 13:40:08 +0200 Subject: [PATCH] mopidy: update to 2.0.0 --- srcpkgs/mopidy/INSTALL.msg | 10 ++++++---- srcpkgs/mopidy/REMOVE | 4 ++-- srcpkgs/mopidy/files/logging.conf | 20 ++++++++++++++++++++ srcpkgs/mopidy/files/mopidy.conf | 19 +++++++------------ srcpkgs/mopidy/files/mopidy/log/run | 2 -- srcpkgs/mopidy/files/mopidy/run | 8 +++----- srcpkgs/mopidy/template | 27 +++++++++++++++++++-------- 7 files changed, 57 insertions(+), 33 deletions(-) create mode 100644 srcpkgs/mopidy/files/logging.conf delete mode 100755 srcpkgs/mopidy/files/mopidy/log/run diff --git a/srcpkgs/mopidy/INSTALL.msg b/srcpkgs/mopidy/INSTALL.msg index ba4ef0ae5f7..6cde6063d4e 100644 --- a/srcpkgs/mopidy/INSTALL.msg +++ b/srcpkgs/mopidy/INSTALL.msg @@ -1,4 +1,6 @@ -Edit /etc/mopidy.conf and let 'media_dir' point to your -music directory. Install additional plugins via python-pip. -To get a list of plugins use »pip search Mopidy«. There is no -man page available... check https://docs.mopidy.com/ +To run mopidy as a service: edit '/etc/mopidy/mopidy.conf' and let +'media_dir' point to your music directory (readable for the system +user 'mopidy'). Then run »mopidyctl local scan« and enable the service. +Install additional extensions via python-pip. To get a list of +extensions use »pip search Mopidy«. +See also: file:///usr/share/doc/mopidy/index.html diff --git a/srcpkgs/mopidy/REMOVE b/srcpkgs/mopidy/REMOVE index bcac839d07f..bb402b1083b 100644 --- a/srcpkgs/mopidy/REMOVE +++ b/srcpkgs/mopidy/REMOVE @@ -1,5 +1,5 @@ case "$ACTION" in -purge) test -d var/lib/mopidy && - rm -rf var/lib/mopidy +purge) test -d var/cache/mopidy && + rm -rf var/cache/mopidy ;; esac diff --git a/srcpkgs/mopidy/files/logging.conf b/srcpkgs/mopidy/files/logging.conf new file mode 100644 index 00000000000..41a00e5925a --- /dev/null +++ b/srcpkgs/mopidy/files/logging.conf @@ -0,0 +1,20 @@ +[loggers] +keys = root + +[handlers] +keys = syslogHandler + +[formatters] +keys = simpleFormatter + +[logger_root] +handlers = syslogHandler + +[handler_syslogHandler] +class=handlers.SysLogHandler +level=INFO +formatter=simpleFormatter +args=(('/dev/log'), handlers.SysLogHandler.LOG_DAEMON) + +[formatter_simpleFormatter] +format = %(name)s: %(message)s diff --git a/srcpkgs/mopidy/files/mopidy.conf b/srcpkgs/mopidy/files/mopidy.conf index 745a6e9aaa3..ec8d6e81478 100644 --- a/srcpkgs/mopidy/files/mopidy.conf +++ b/srcpkgs/mopidy/files/mopidy.conf @@ -1,7 +1,10 @@ +[core] +cache_dir = /var/cache/mopidy +config_dir = /etc/mopidy +data_dir = /var/lib/mopidy + [logging] -color = false -console_format = %(levelname)-8s %(message)s -config_file = +config_file = /etc/mopidy/logging.conf [audio] mixer = software @@ -9,18 +12,10 @@ mixer_volume = output = autoaudiosink visualizer = -[proxy] -#scheme = -#hostname = -#port = -#username = -#password = - [local] enabled = true library = json -media_dir = -data_dir = /var/lib/mopidy/ +media_dir = playlists_dir = /var/lib/mopidy/playlists scan_timeout = 1000 scan_flush_threshold = 1000 diff --git a/srcpkgs/mopidy/files/mopidy/log/run b/srcpkgs/mopidy/files/mopidy/log/run deleted file mode 100755 index bae8e087f03..00000000000 --- a/srcpkgs/mopidy/files/mopidy/log/run +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -exec logger -p daemon.info -t mopidy diff --git a/srcpkgs/mopidy/files/mopidy/run b/srcpkgs/mopidy/files/mopidy/run index 3f2d5cadf6f..558c2d7a4e6 100755 --- a/srcpkgs/mopidy/files/mopidy/run +++ b/srcpkgs/mopidy/files/mopidy/run @@ -1,6 +1,4 @@ #!/bin/sh -# scan local lib on first run -test -f /var/lib/mopidy/library.json.gz \ -|| chpst -umopidy mopidy --config /etc/mopidy.conf local scan - -exec chpst -u mopidy:audio mopidy --config /etc/mopidy.conf 2>&1 +exec chpst -u mopidy:audio \ + mopidy --config /etc/mopidy/mopidy.conf \ + >/dev/null 2>&1 diff --git a/srcpkgs/mopidy/template b/srcpkgs/mopidy/template index 39f23ca8f85..86f6a4475f8 100644 --- a/srcpkgs/mopidy/template +++ b/srcpkgs/mopidy/template @@ -1,28 +1,39 @@ # Template file for 'mopidy' pkgname=mopidy -version=1.1.1 -revision=2 +version=2.0.0 +revision=1 wrksrc="Mopidy-$version" noarch=yes build_style=python-module pycompile_module=mopidy -hostmakedepends="python-setuptools" -depends="gst-python gst-plugins-good1 gst-plugins-ugly1 gst-plugins-bad1 python-tornado python-pykka python-setuptools" -conf_files="/etc/mopidy.conf" +hostmakedepends="python-setuptools python-Sphinx" +depends="gst1-python gst-plugins-good1 gst-plugins-ugly1 gst-plugins-bad1 + python-tornado python-pykka python-setuptools python-requests" +conf_files="/etc/mopidy/*.conf" system_accounts="mopidy" mopidy_homedir="/var/lib/mopidy/" mopidy_groups="audio" -make_dirs="/var/lib/mopidy 0755 mopidy mopidy" +make_dirs=" + /var/lib/mopidy 0755 mopidy mopidy + /var/cache/mopidy 0755 mopidy mopidy" short_desc="Music server for MPD, Spotify, SoundClound and others" maintainer="allan " license="Apache-2.0" homepage="http://www.mopidy.com" distfiles="${PYPI_SITE}/M/Mopidy/Mopidy-${version}.tar.gz" -checksum=823e1ba8781a107c69e8c1cd8fad9be81dc003c946e9d54fe41cadaad3a0e78e +checksum=14a04c249f83d42f2012b580f3a05853f56320f1bb68ac91c4068b64c81a9265 post_install() { vmkdir usr/share/applications/ vcopy extra/desktop/mopidy.desktop usr/share/applications/ - vconf $FILESDIR/mopidy.conf + vbin extra/mopidyctl/mopidyctl + vman extra/mopidyctl/mopidyctl.8 + make -C docs man + vman docs/_build/man/mopidy.1 + make -C docs html + vmkdir usr/share/doc/mopidy/ + cp -r docs/_build/html/* ${DESTDIR}/usr/share/doc/mopidy/ + vinstall ${FILESDIR}/mopidy.conf 644 etc/mopidy/ + vinstall ${FILESDIR}/logging.conf 644 etc/mopidy/ vsv mopidy }