aboutsummaryrefslogtreecommitdiffstats
path: root/community/mopidy/APKBUILD
blob: 742986b00163e4c9575edc57fb2a73efddf95e2c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# 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=1
pkgdesc="Mopidy is an extensible music server"
options="!check" # Requires dependency testing/py-responses
url="https://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() {
	python2 setup.py build

	make -C docs SPHINXBUILD=sphinx-build-2 man
	make -C docs SPHINXBUILD=sphinx-build-2 html
}

package() {
	python2 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 -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"
}

sha512sums="3ae9d1c4cc7b002095928a9c1b683ad94c4190c21b1451c176fdcf8c6daa174433a1be967d4143d03d4eeb2bfc680f7ab37d23a10fef9be76fc6e68bd0402ec1  Mopidy-2.2.2.tar.gz
eb66e8e826640a939b1ba51569ab7fab041b8b5e8823ea2d5f05596faf1de8882fd8c1c32bdb92534e759243fb5ff741bda0d2ebb3282af542d1287c8c68b5ea  mopidy.conf
0c438058500ab7559baae21b03b10e2b80b10c77776b240b2100da1f4c84ea8efe24dc7a38a95034e75605eaf5d21604d13e5b8c7358778c555ddb6372a49388  logging.conf
de23c457de712efa04ccb4a3628710fd7c1be7b00ce73f138f613156d49862060a5a6be8c1491a5f3515537c0228f66aa28a0b751960563b533c2720ddbbe8c8  mopidy.initd"