summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: f62fd8bfbaf63d7051bf54cb8ff1bd33181c6334 (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
# Maintainer: only_vip <onlyme_vip@protonmail.com>
pkgname=yt-dlp-bin
_pkgname=yt-dlp
pkgver=2021.10.10
pkgrel=1
pkgdesc='A youtube-dl fork with additional features and fixes'
arch=('any')
url="https://github.com/yt-dlp/yt-dlp"
license=('Unlicense')
depends=('python3' 'python3-mutagen' 'python3-pycryptodome' 'python3-websockets')
makedepends=('git' 'glibc-source' 'pandoc' 'python3-setuptools')
optdepends=('ffmpeg: for video post-processing'
            'rtmpdump: for rtmp streams support'
            'atomicparsley: for embedding thumbnails into m4a files'
            'aria2: for using aria2 as external downloader')
provides=('yt-dlp')
conflicts=('yt-dlp')
source=("https://github.com/yt-dlp/yt-dlp/archive/${pkgver}.tar.gz")
sha512sums=(SKIP'')
#sha512sums=('8d78158384429a26ac20ed1d764d7d2c2c5b1459da1a72ba015cd5bd4496d743da8e04f720af645276b573ef4128b99db799d071593ae71c4ba6849cfeef43be')

prepare() {
    cd "${_pkgname}-$pkgver"
    sed -i 's|etc/bash_completion.d|share/bash-completion/completions|' setup.py
    sed -i 's|etc/fish/completions|share/fish/vendor_completions.d|' setup.py
}

build() {
    cd "${_pkgname}-$pkgver"
    make PREFIX="${pkgdir}/usr" README.txt yt-dlp.1 completion-bash completion-zsh completion-fish
    export PYTHONHASHSEED=0
    python3 setup.py build
}

package() {
    cd "${_pkgname}-$pkgver"
    python3 setup.py install --root="${pkgdir}/" --optimize=1 --skip-build
}