summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: f678da9d47eeaf8a0478c70071e466488a05fdc0 (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
# Maintainer: Jonathan Neidel <aur at jneidel dot com>

pkgname=bandcamp-dl-git
pkgver=v0.0.16.r0.gcdf24c0
pkgrel=1
pkgdesc="Download audio from bandcamp.com"
arch=('any')
url="https://github.com/iheanyi/bandcamp-dl"
license=('Unlicense')
makedepends=('git' 'python-build' 'python-installer')
depends=(
  'python'
  'python-beautifulsoup4'
  'python-chardet'
  'python-demjson3'
  'python-docopt'
  'python-mock'
  'python-mutagen'
  'python-requests'
  'python-unicode-slugify'
  'python-setuptools'
  'python-urllib3-future'
)
provides=("${pkgname/-git/}")
conflicts=("${pkgname/-git/}")
options=(!emptydirs)
source=("git+https://github.com/iheanyi/bandcamp-dl.git")
sha512sums=('SKIP')

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

build() {
  cd "$srcdir/${pkgname/-git/}"
  sed -i 's/from urllib3.util/from urllib3_future.util/' bandcamp_dl/bandcamp.py
  python -m build --wheel --no-isolation
}

package() {
  cd "$srcdir/${pkgname/-git/}"
  python -m installer --destdir="$pkgdir" dist/*.whl
  install -Dm 643 LICENSE "$pkgdir/usr/share/licenses/${pkgname}/LICENSE.txt"
}