diff options
author | Bart Ribbers <bribbers@disroot.org> | 2019-05-21 12:36:22 +0200 |
---|---|---|
committer | Kevin Daudt <kdaudt@alpinelinux.org> | 2019-05-21 11:04:09 +0000 |
commit | 32842555b0943bea51743b43882fd83924798797 (patch) | |
tree | 84371b14a37cde8cc52f65336423f0db86ff8888 /community/mopidy | |
parent | 403823ee875d7d9fabb5aed22e967127b79b5eda (diff) | |
download | aports-32842555b0943bea51743b43882fd83924798797.tar.bz2 aports-32842555b0943bea51743b43882fd83924798797.tar.xz |
testing/mopidy: move to community
Diffstat (limited to 'community/mopidy')
-rw-r--r-- | community/mopidy/APKBUILD | 77 | ||||
-rw-r--r-- | community/mopidy/logging.conf | 21 | ||||
-rw-r--r-- | community/mopidy/mopidy.conf | 15 | ||||
-rw-r--r-- | community/mopidy/mopidy.initd | 18 | ||||
-rw-r--r-- | community/mopidy/mopidy.post-deinstall | 5 | ||||
-rw-r--r-- | community/mopidy/mopidy.pre-install | 5 |
6 files changed, 141 insertions, 0 deletions
diff --git a/community/mopidy/APKBUILD b/community/mopidy/APKBUILD new file mode 100644 index 0000000000..afaeb617e5 --- /dev/null +++ b/community/mopidy/APKBUILD @@ -0,0 +1,77 @@ +# Contributor: Ćukasz Jendrysik <scadu@yandex.com> +# Contributor: Carlo Landmeter <clandmeter@gmail.com> +# Maintainer: Bart Ribbers <bribbers@disroot.org> +pkgname=mopidy +_pkgname=Mopidy +pkgver=2.2.2 +pkgrel=0 +pkgdesc="Mopidy is an extensible music server" +url="http://www.mopidy.com/" +arch="noarch" +license="Apache-2.0" +depends="python py-pykka py-tornado gst-plugins-base gst-plugins-good + gst-plugins-ugly py-gst py-setuptools py-libxml2 py-requests + py-six" +makedepends="python-dev py2-sphinx" +install="$pkgname.pre-install $pkgname.post-deinstall" +subpackages="$pkgname-doc $pkgname-openrc" +source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz + mopidy.conf + logging.conf + mopidy.initd + " + +_builddir="$srcdir"/$_pkgname-$pkgver + +pkgusers="mopidy" +pkggroups="audio" + +build() { + cd "$_builddir" + python setup.py build + + make -C docs SPHINXBUILD=sphinx-build-2 man + make -C docs SPHINXBUILD=sphinx-build-2 html +} + +package() { + cd "$_builddir" + python setup.py install --prefix=/usr --root="$pkgdir" + install -Dm755 extra/mopidyctl/mopidyctl "${pkgdir}/usr/bin/mopidyctl" + + install -dm755 "${pkgdir}/usr/share/doc/mopidy" + cp -r docs/_build/html "${pkgdir}/usr/share/doc/mopidy" + + install -dm755 "${pkgdir}/usr/share/man/man1/" + gzip -c docs/_build/man/mopidy.1 > "${pkgdir}/usr/share/man/man1/mopidy.1.gz" + + install -dm755 "${pkgdir}/usr/share/man/man8/" + gzip -c extra/mopidyctl/mopidyctl.8 > "${pkgdir}/usr/share/man/man8/mopidyctl.8.gz" + + install -Dm644 "${srcdir}/mopidy.conf" \ + "${pkgdir}/etc/mopidy/mopidy.conf" + install -Dm644 "${srcdir}/logging.conf" \ + "${pkgdir}/etc/mopidy/logging.conf" + + install -Dm755 "$srcdir/$pkgname.initd" \ + "$pkgdir/etc/init.d/$pkgname" + + install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" + + install -dm755 -o mopidy -g audio \ + "${pkgdir}/etc/mopidy/extensions.d" \ + "${pkgdir}/var/log/mopidy" \ + "${pkgdir}/var/cache/mopidy" \ + "${pkgdir}/var/lib/mopidy/media" \ + "${pkgdir}/var/lib/mopidy/playlists" +} + +check() { + cd "$_builddir" + python -m mopidy --help > /dev/null +} + +sha512sums="3ae9d1c4cc7b002095928a9c1b683ad94c4190c21b1451c176fdcf8c6daa174433a1be967d4143d03d4eeb2bfc680f7ab37d23a10fef9be76fc6e68bd0402ec1 Mopidy-2.2.2.tar.gz +eb66e8e826640a939b1ba51569ab7fab041b8b5e8823ea2d5f05596faf1de8882fd8c1c32bdb92534e759243fb5ff741bda0d2ebb3282af542d1287c8c68b5ea mopidy.conf +0c438058500ab7559baae21b03b10e2b80b10c77776b240b2100da1f4c84ea8efe24dc7a38a95034e75605eaf5d21604d13e5b8c7358778c555ddb6372a49388 logging.conf +de23c457de712efa04ccb4a3628710fd7c1be7b00ce73f138f613156d49862060a5a6be8c1491a5f3515537c0228f66aa28a0b751960563b533c2720ddbbe8c8 mopidy.initd" diff --git a/community/mopidy/logging.conf b/community/mopidy/logging.conf new file mode 100644 index 0000000000..777e93b8a0 --- /dev/null +++ b/community/mopidy/logging.conf @@ -0,0 +1,21 @@ +[loggers] +keys = root + +[handlers] +keys = fileHandler + +[formatters] +keys = simpleFormatter + +[logger_root] +handlers = fileHandler + +[handler_fileHandler] +class = FileHandler +formatter = simpleFormatter +level = INFO +args = ('/var/log/mopidy/mopidy.log',) + +[formatter_simpleFormatter] +format = %(asctime)s %(levelname)s [%(process)d:%(threadName)s] %(name)s: %(message)s +datefmt = diff --git a/community/mopidy/mopidy.conf b/community/mopidy/mopidy.conf new file mode 100644 index 0000000000..5be8d541fe --- /dev/null +++ b/community/mopidy/mopidy.conf @@ -0,0 +1,15 @@ +[core] +cache_dir = /var/cache/mopidy +config_dir = /etc/mopidy +data_dir = /var/lib/mopidy + +[logging] +config_file = /etc/mopidy/logging.conf +debug_file = /var/log/mopidy/mopidy-debug.log + +[local] +data_dir = /var/lib/mopidy/local +media_dir = /var/lib/mopidy/media + +[m3u] +playlists_dir = /var/lib/mopidy/playlists diff --git a/community/mopidy/mopidy.initd b/community/mopidy/mopidy.initd new file mode 100644 index 0000000000..6028d1e754 --- /dev/null +++ b/community/mopidy/mopidy.initd @@ -0,0 +1,18 @@ +#!/sbin/openrc-run + +name=mopidy +command="/usr/bin/mopidy" +command_args="--config /etc/mopidy/mopidy.conf" +command_user="mopidy" +start_stop_daemon_args="--background --make-pidfile" +pidfile="/run/mopidy.pid" + +depend() { + need net + after firewall +} + +start_pre() { + checkpath --directory --owner mopidy:audio --mode 0775 \ + /var/log/mopidy +} diff --git a/community/mopidy/mopidy.post-deinstall b/community/mopidy/mopidy.post-deinstall new file mode 100644 index 0000000000..229c294e2c --- /dev/null +++ b/community/mopidy/mopidy.post-deinstall @@ -0,0 +1,5 @@ +#!/bin/sh + +deluser mopidy + +exit 0 diff --git a/community/mopidy/mopidy.pre-install b/community/mopidy/mopidy.pre-install new file mode 100644 index 0000000000..80ae1504a5 --- /dev/null +++ b/community/mopidy/mopidy.pre-install @@ -0,0 +1,5 @@ +#!/bin/sh + +adduser -S -D -h /var/lib/mopidy -s /sbin/nologin -G audio mopidy 2>/dev/null + +exit 0 |