summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: c0214464bbe70ad7315bbc0d7a5f779748c6f0b5 (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
# Maintainer: Jiachen Yang <farseerfc@gmail.com>
# Maintainer: Ariel AxionL <axionl@aosc.io>

pkgname=netease-musicbox-git
_gitname=musicbox
pkgver=0.3.1.r3.ga0a6969
pkgrel=3
pkgdesc="A sexy command line interface musicbox for NetEase based on Python"
arch=(any)
url="https://github.com/darknessomi/musicbox"
depends=('mpg123' 'python-pycryptodomex' 'python-requests' 'python-future'
         'python-fuzzywuzzy' 'python-requests-cache' 'python-importlib-metadata'
         'python-url-normalize' 'python-cattrs' 'python-levenshtein')
makedepends=('python-setuptools' 'python-poetry' 'git')
optdepends=('aria2: music caching'
            'libnotify: notifications'
            'qt5-base: lyrics support'
            'python-qtpy: lyrics support'
            'python-pyqt5: lyrics support'
            'python-dbus: lyrics support'
            'python-levenshtein: fuzzy search support')
provides=('netease-musicbox')
conflicts=('netease-musicbox')
license=('MIT')

source=("${_gitname}::git+https://github.com/darknessomi/musicbox"
        "LICENSE::https://raw.githubusercontent.com/darknessomi/musicbox/master/LICENSE")

sha256sums=('SKIP'
            '40aaf7aea7939284b07c487929472fa9cc5a842ff5f0c1e474ac93e6de7aa64e')

pkgver() {
  cd "${srcdir}/${_gitname}"
  git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}

build() {
  cd "${srcdir}/${_gitname}"
  poetry build -f sdist
  export mainver=$(echo "${pkgver}" | cut -d "." -f1-3)
  tar xvf "./dist/NetEase-MusicBox-${mainver}.tar.gz"
}

package() {
  install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
  
  cd "${srcdir}/${_gitname}/NetEase-MusicBox-${mainver}"
  python setup.py install --root="${pkgdir}/" --optimize=1
}
# vim:set ts=2 sw=2 et: