1 # Maintainer: Morten Linderud <foxboron@archlinux.org>
2 # Contributor: Sven-Hendrik Haase <sh@lutzhaase.com>
3 # Contributor: Alexandre Petitjean <alpetitjean at gmail dot com>
8 pkgdesc="An extensible music server written in Python"
10 url="https://www.mopidy.com"
12 depends=('python' 'python-pykka' 'python-requests' 'gstreamer' 'python-setuptools'
13 'gst-python' 'gst-plugins-good' 'gst-plugins-ugly' 'python-tornado' 'gst-plugins-base'
15 checkdepends=('python-gobject' 'python-pytest' 'python-responses')
16 makedepends=('python-sphinx' 'python-sphinx_rtd_theme' 'git')
17 backup=('etc/mopidy/mopidy.conf')
18 source=("$pkgname-$pkgver.tar.gz::https://github.com/mopidy/mopidy/archive/v${pkgver}.tar.gz"
22 "$pkgname-$pkgver-doc-py311.patch::https://github.com/mopidy/mopidy/commit/1b7330884b996e13944e9680b0c0d01f4907b6b5.patch"
23 "$pkgname-$pkgver-audio-fix.patch::https://github.com/mopidy/mopidy/commit/1b7d81ad3d8227659ca1b7e0d6bf5f7859ad664a.patch"
25 sha512sums=('cb3271f106303415b65e4b4248995235bd16a5b795f4575206d3fd08aceb5d2e2df4c323eb84df8e50cb3785d94a258633650ebc5a5916f3dcc66dfe69f249d6'
26 'eb66e8e826640a939b1ba51569ab7fab041b8b5e8823ea2d5f05596faf1de8882fd8c1c32bdb92534e759243fb5ff741bda0d2ebb3282af542d1287c8c68b5ea'
27 '0c438058500ab7559baae21b03b10e2b80b10c77776b240b2100da1f4c84ea8efe24dc7a38a95034e75605eaf5d21604d13e5b8c7358778c555ddb6372a49388'
28 'ff6c9f0406dfc1cc01ac6edcc6bae429342437397321ab9205ca273a63b28611d08005a0a5dba639b5ae2157a4f03a1d58c2199f7dbc6965864685b4b71f0b6f'
29 '212ad0a84e3cb36a576cd4c15b1fa00a9b0fc62db20ade61ee92df5c914a67dd038f89337e61e8bf2c4e03547e071f10d257168d04ddf5b81cc9a692088f5ddf'
30 '852730959d4270cd0fa74738eb1b786ec38ad5d865fbd1532cec77f51990840cecb0548c003d77d145e68313469da7228d94e05e265d92a8dc17c1031c1fd14e')
33 cd "${pkgname}-${pkgver}"
34 git apply "$srcdir/mopidy-3.4.1-doc-py311.patch"
35 git apply "$srcdir/mopidy-3.4.1-audio-fix.patch"
39 cd ${pkgname}-${pkgver}
45 cd ${pkgname}-${pkgver}
46 python -m unittest discover -vs .
50 cd ${pkgname}-${pkgver}
51 python setup.py install --root="${pkgdir}/" --optimize=1
53 install -Dm755 extra/mopidyctl/mopidyctl "${pkgdir}/usr/bin/mopidyctl"
55 install -dm755 "${pkgdir}/usr/share/doc/mopidy"
56 cp -r docs/_build/html "${pkgdir}/usr/share/doc/mopidy"
58 install -dm755 "${pkgdir}/usr/share/man/man1/"
59 gzip -n -c docs/_build/man/mopidy.1 > "${pkgdir}/usr/share/man/man1/mopidy.1.gz"
61 install -dm755 "${pkgdir}/usr/share/man/man8/"
62 gzip -n -c extra/mopidyctl/mopidyctl.8 > "${pkgdir}/usr/share/man/man8/mopidyctl.8.gz"
64 install -Dm644 "${srcdir}/mopidy.conf" "${pkgdir}/etc/mopidy/mopidy.conf"
65 install -Dm644 "${srcdir}/logging.conf" "${pkgdir}/etc/mopidy/logging.conf"
67 install -Dm644 "extra/systemd/mopidy.service" "${pkgdir}/usr/lib/systemd/system/mopidy.service"
68 install -Dm644 "extra/desktop/mopidy.desktop" "${pkgdir}/usr/share/applications/mopidy.desktop"
70 install -dm755 -g 46 -o 46 "${pkgdir}/var/cache/mopidy"
71 install -dm755 -g 46 -o 46 "${pkgdir}/var/log/mopidy"
72 install -dm755 -g 46 -o 46 "${pkgdir}/var/lib/mopidy"
73 install -dm755 -g 46 -o 46 "${pkgdir}/var/lib/mopidy/local"
74 install -dm755 -g 46 -o 46 "${pkgdir}/var/lib/mopidy/media"
75 install -dm755 -g 46 -o 46 "${pkgdir}/var/lib/mopidy/playlists"
77 install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
78 install -Dm644 "${srcdir}/mopidy.sysusers" "${pkgdir}/usr/lib/sysusers.d/$pkgname.conf"
81 # vim:set ts=2 sw=2 et: