makedeb
Emulate youtube-dl executables and modules with yt-dlp
Viewing /PKGBUILD
.
Click here to go back to the Git tree for yt-dlp-drop-in.
# Maintainer: exponential <echo ZXhwb25lbnRpYWxtYXRyaXhAcHJvdG9ubWFpbC5jb20K | base64 -d>
# Contributor: Minmo (AUR) <com dot gmail at maroboromike>
# Contributor: Sematre (AUR) <sematre at gmx dot de>
pkgname=yt-dlp-drop-in
pkgver=2.1.1
pkgrel=1
pkgdesc='Emulate youtube-dl executables and modules with yt-dlp'
arch=('all')
license=('MIT')
depends=('yt-dlp')
provides=('youtube-dl')
conflicts=('youtube-dl')
package() {
_WRAPPER="#!/usr/bin/python3
import sys
from yt_dlp import *
if __name__ == '__main__':
args=sys.argv.copy()
args.pop(0)
args=['--compat-options','youtube-dl']+args
main(args)"
mkdir -p "${pkgdir}/usr/bin"
echo "$_WRAPPER" > "${pkgdir}/usr/bin/youtube-dl"
chmod 755 "${pkgdir}/usr/bin/youtube-dl"
mkdir -p "${pkgdir}/usr/lib/python3/dist-packages"
ln -Tfs "/usr/lib/python3/dist-packages/yt_dlp" "${pkgdir}/usr/lib/python3/dist-packages/youtube_dl"
}