summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 1eeffc169f7e4423d0076da4eb546430e23e523a (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
70
71
72
73
74
# Maintainer:
# Contributor: Sumner Evans <sumner.evans98 at gmail dot com>

_pkgname="sublime-music"
pkgname="$_pkgname"
pkgver='0.12.0'
pkgrel=3
pkgdesc='A Subsonic/Airsonic/*sonic client'
url="https://github.com/sublime-music/sublime-music"
license=('GPL-3.0-or-later')
arch=('any')

depends=(
  'python'
)
makedepends=(
  'python-build'
  'python-flit'
  'python-installer'
  'python-wheel'
  'python-sphinx'
)
optdepends=(
  'libnotify: for system song notification support'
  'python-keyring: support for storing passwords in the system keyring'
)

_pkgsrc="${_pkgname//-/_}-$pkgver"
_pkgext="tar.gz"
source=(
  "$_pkgsrc.$_pkgext"::"https://files.pythonhosted.org/packages/source/${_pkgname::1}/${_pkgname}/$_pkgsrc.$_pkgext"
)
sha256sums=(
  '458bacab6be5c926852d4a43ce675b5e767210287844c6fce921832e263db3c0'
)

build() {
  cd "$_pkgsrc"
  python -m build --no-isolation --wheel --skip-dependency-check

  cd "docs"
  make man
}

package() {
  depends+=(
    'glib2'
    'hicolor-icon-theme'
    'python-bleach'
    'python-bottle'
    'python-dateutil'
    'python-deepdiff'
    'python-mpv'
    'python-peewee'
    'python-requests'
    'python-semver'

    ## AUR
    'python-dataclasses-json'
    'python-pychromecast'
    'python-thefuzz'
  )

  python -m installer --destdir="$pkgdir" "$_pkgsrc"/dist/*.whl

  install -Dm644 "$_pkgsrc"/sublime-music.desktop -t "$pkgdir"/usr/share/applications/
  install -Dm644 "$_pkgsrc"/sublime-music.metainfo.xml -t "$pkgdir"/usr/share/metainfo/

  install -Dm644 "$_pkgsrc"/docs/_build/man/sublime-music.1 -t "$pkgdir"/usr/share/man/man1/

  for sz in 16 22 24 32 36 48 64 72 96 128 192 512 1024; do
    install -Dm644 "$_pkgsrc"/logo/rendered/$sz.png "$pkgdir"/usr/share/icons/hicolor/${sz}x${sz}/apps/sublime-music.png
  done
}