summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 5ad728a2901b36708cc43e15026fa5900f12f9c4 (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
# Maintainer: sitiyou <sitiyou7@gmail.com>
# Contributor: sitiyou <sitiyou7@gmail.com>

pkgname=layrics-git
_pkgname=layrics
pkgver=r100.7f83b10
pkgrel=1
pkgdesc="Desktop lyrics overlay for Wayland — auto-synced with MPRIS players, rendered via libass on wlr-layer-shell"
arch=('x86_64')
url="https://github.com/sitiyou/layrics"
license=('GPL-3.0-only')
depends=(
  'python'
  'python-httpx'
  'python-brotli'
  'python-h2'
  'python-dbus'
  'python-gobject'
  'python-click'
  'python-diskcache'
  'python-pyaes'
  'python-appdirs'
  'wayland'
  'vulkan-driver'
  'vulkan-icd-loader'
  'libass'
  'fontconfig'
)
makedepends=(
  'git'
  'meson'
  'python-build'
  'python-installer'
  'python-wheel'
  'meson-python'
  'pybind11'
  'vulkan-headers'
  'shaderc'
)
provides=('layrics')
conflicts=('layrics')
source=("$_pkgname::git+https://github.com/sitiyou/layrics.git")
sha256sums=('SKIP')

pkgver() {
  cd "$_pkgname"
  ( set -o pipefail
    git describe --long --abbrev=7 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' ||
    printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short=7 HEAD)"
  )
}

build() {
  cd "$_pkgname"
  python -m build --wheel --no-isolation -Cbuild-dir=build
}

package() {
  cd "$_pkgname"
  python -m installer --destdir="$pkgdir" dist/*.whl

  install -Dm644 layrics.desktop "$pkgdir/usr/share/applications/layrics.desktop"
  install -Dm644 assets/icon.png "$pkgdir/usr/share/pixmaps/layrics.png"
}