makedeb


yt-dlp-bin 2022.06.29-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=2022.06.29
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=("68286f4b5ee96748cbe66a81f8718cd879c7b41c93fa73a7637ac2f0b8e6f550546bb9068a9cc212b7526299fedc7db1c524fa0d387e21fbb4765e81de85c5a3")
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
}