makedeb


yt-dlp-bin 2023.11.16-1


A youtube-dl fork with additional features and fixes

Viewing /PKGBUILD.

View raw.

Click here to go back to the Git tree for yt-dlp-bin.

# Maintainer: only_vip <onlyme_vip@protonmail.com>
pkgname=yt-dlp-bin
_pkgname=yt-dlp
pkgver=2023.11.16
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' 'pandoc')
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=("3b168cad25807366624ef081537cc30f3585c1bd0aa528c4d9119c33681fd7bc30753d5ec33de7ca29f02e550fcd2d3e3c2813736b86537d0c55db382411ebee")
options=(!strip)

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
}