summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 765872e65c1c05e3977ebc53b55f5e28134e1274 (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
# Maintainer: Egor Vorontsov <sdoregor@sdore.me>

_pkgbase=ymaudio
_gitname=YMAudio
pkgname=${_pkgbase}-git
pkgver=r18.082e86e
pkgrel=1
pkgdesc="Yandex.Music CLI Audio Player"
arch=('any')
url="https://apps.sdore.me/${_gitname}"
license=('LGPL3')
depends=('python-yandex-music-api' 'python-vlc' 'python-scurses' 'python-sutils' 'python-scimg')
optdepends=('python-notify2: for playback notifications when MPRIS is not available'
            'python-gobject: for MPRIS support'
            'dbus-python: for MPRIS support')
source=("git+${url}.git")
sha256sums=('SKIP')

pkgver() {
	cd "${srcdir}/${_gitname}"

	printf 'r%s.%s' "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

build() {
	cd "${srcdir}"

	touch 'pyproject.toml'

	python -m build --wheel --no-isolation
}

package() {
	cd "${srcdir}"

	python -m installer --destdir="${pkgdir}" "dist/${_gitname}-"*.whl

	cd "${_gitname}"

	install -Dm755 'YMAudio' -t "${pkgdir}/usr/bin/"
	install -Dm644 'YMAudio.desktop' -t "${pkgdir}/usr/share/applications/"
}