summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 900a5ea81e5d0b2a7993db014aebc7f3e97347b2 (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
# Maintainer: Deepjyoti <deep.barman30@gmail.com>

_pkgname="ytmdl"
pkgname="$_pkgname"
pkgver=2023.11.26
pkgrel=2
pkgdesc="Download songs from YouTube with metadata from iTunes, Spotify, LastFM, etc"
arch=("any")
url="https://github.com/deepjyoti30/ytmdl"
license=('MIT')

depends=(
  'python-beautifulsoup4'
  'python-musicbrainzngs'
  'python-mutagen'
  'python-pyxdg'
  'python-rich'
  'python-unidecode'
  'python-urllib3'
  'python-ytmusicapi'
  'yt-dlp'

  # AUR
  'downloader-cli'
  'python-ffmpeg-python'
  'python-itunespy'
  'python-pydes'
  'python-simber'
  'python-spotipy'
  'youtube-search-python'
)
makedepends=(
  'git'
  'python-build'
  'python-installer'
  'python-setuptools'
  'python-wheel'
)

_pkgsrc="$_pkgname"
source=("$_pkgsrc"::"git+$url#tag=$pkgver")
sha256sums=("SKIP")

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

  python "utils/completion.py"
}

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

  install -Dm664 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname"

  install -Dm644 "ytmdl.zsh" "$pkgdir/usr/share/zsh/site-functions/_ytmdl"
  install -Dm644 "ytmdl.bash" "$pkgdir/usr/share/bash-completion/completions/ytmdl"
}