makedeb


yt-dlp-drop-in 2.0-1


Emulate youtube-dl executables with yt-dlp

Viewing /PKGBUILD.

View raw.

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.0
pkgrel=1
pkgdesc='Emulate youtube-dl executables 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/lib/python3/dist-packages"
  echo "$WRAPPER" > "${pkgdir}/usr/lib/python3/dist-packages/youtube_dl.py"
  chmod 755 "${pkgdir}/usr/lib/python3/dist-packages/youtube_dl.py"

  mkdir -p "${pkgdir}/usr/bin"
  ln -Tfs "/usr/lib/python3/dist-packages/youtube_dl.py" "${pkgdir}/usr/bin/youtube-dl"
}