summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 94b745405903e54fbbca6a06d3441f8c54beacb3 (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
# Maintainer: Malte J├╝rgens <maltejur@dismail.de>

pkgname=zspotify
pkgver=0.5.2
pkgrel=4
pkgdesc="A Spotify downloader needing only a python interpreter and ffmpeg."
arch=("x86_64")
url="https://github.com/afkcodes/zspotify"
license=("GPL3")
depends=(python python-librespot python-music-tag python-pillow python-protobuf python-tabulate python-tqdm python-ffmpy python-mutagen)
makedepends=(python-setuptools)
source=(
  "https://github.com/afkcodes/zspotify/archive/c11cfed6bc811adb2edb9709c16b6a344c000682.tar.gz"
  "zspotify-module-imports.patch"
  "zspotify-paths.patch"
)
sha256sums=("167a53da648096c1193b35cca2732e1230212d18d3e225e07984507a6fcaad98" SKIP SKIP)

build() {
  cd zspotify-c11cfed6bc811adb2edb9709c16b6a344c000682
  patch -p1 -i $srcdir/zspotify-module-imports.patch
  patch -p1 -i $srcdir/zspotify-paths.patch
  python setup.py build
}

package() {
  cd zspotify-c11cfed6bc811adb2edb9709c16b6a344c000682
  python setup.py install --root="$pkgdir" --optimize=1
  mkdir -p "$pkgdir/usr/bin"
  cat <<EOF >"$pkgdir/usr/bin/zspotify"
#!/bin/sh
python -m zspotify \$@
EOF
  chmod +x "$pkgdir/usr/bin/zspotify"
}