aboutsummaryrefslogtreecommitdiffstats
path: root/community/mopidy/APKBUILD
blob: 9fa5f175d9fa007684c519313bf9d908da3c8236 (plain) (blame)
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
# Contributor: Łukasz Jendrysik <scadu@yandex.com>
# Contributor: Carlo Landmeter <clandmeter@alpinelinux.org>
# Contributor: Galen Abell <galen@galenabell.com>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=mopidy
pkgver=3.1.1
pkgrel=3
pkgdesc="Mopidy is an extensible music server"
url="https://www.mopidy.com/"
arch="all"
license="Apache-2.0"
depends="
	gst-plugins-base
	gst-plugins-good
	gst-plugins-ugly
	py3-dbus
	py3-gst
	py3-libxml2
	py3-pykka
	py3-requests
	py3-setuptools
	py3-six
	py3-tornado
	python3
	"
makedepends="
	graphviz
	py3-sphinx
	py3-sphinx_rtd_theme
	python3-dev
	"
checkdepends="
	py3-pytest
	py3-responses
	"
install="$pkgname.pre-install"
subpackages="$pkgname-doc $pkgname-openrc"
source="https://github.com/mopidy/mopidy/archive/v$pkgver/mopidy-v$pkgver.tar.gz
	mopidy.conf
	logging.conf
	mopidy.initd
	"

pkgusers="mopidy"
pkggroups="audio"

case "$CARCH" in
	# Tests failing on 32-bit
#	x86|arm*) options="!check" ;;
	# Tests hang builder after completion
	x86_64) options="!check" ;;
esac

build() {
	python3 setup.py build

	python3 setup.py build_sphinx -b man
	python3 setup.py build_sphinx -b html
}

check() {
	pytest
}

package() {
	python3 setup.py install --prefix=/usr --root="$pkgdir"
	install -Dm755 extra/mopidyctl/mopidyctl "$pkgdir/usr/bin/mopidyctl"
	install -Dm644 extra/desktop/mopidy.desktop -t "$pkgdir"/usr/share/applications

	install -dm755 "$pkgdir/usr/share/doc/mopidy"
	cp -r build/sphinx/html "$pkgdir/usr/share/doc/mopidy"

	local man
	for man in build/sphinx/man/*.? extra/mopidyctl/mopidyctl.8; do
		install -Dm644 "$man" \
			"$pkgdir"/usr/share/man/man${man##*.}/${man##*/}
	done

	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="e20e6cc1b293d298c6107d81cbff97abb827dbfe22e95a2a48ed4a5376117e33f6202e2800341230172f9d97f570ea545f24a04ca5b69da06fd6bb3ecd70b692  mopidy-v3.1.1.tar.gz
eb66e8e826640a939b1ba51569ab7fab041b8b5e8823ea2d5f05596faf1de8882fd8c1c32bdb92534e759243fb5ff741bda0d2ebb3282af542d1287c8c68b5ea  mopidy.conf
0c438058500ab7559baae21b03b10e2b80b10c77776b240b2100da1f4c84ea8efe24dc7a38a95034e75605eaf5d21604d13e5b8c7358778c555ddb6372a49388  logging.conf
8492ac223c32e4a0bb0ae64348ed0a5928cc98c0ce713eff5948b12e09860f83a9de5377117f85fd9ad54643201aadd84f68494e773aa8c1bba97fa992bd9dbe  mopidy.initd"