# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
checksums rmd160 3958b538feb2d23968a96051f52487b61980b215 \
sha256 93dfcb77811cafb5aef090504eb43e8fd3fca0df694676a4ff71023a6ce3b1a7 \
maintainers {ryandesign @ryandesign} openmaintainer
description command-line program to download videos from YouTube.com and other sites
long_description ${name} is a small ${description}.
homepage https://rg3.github.io/youtube-dl/
master_sites https://yt-dl.org/downloads/${version}
depends_build bin:zip:zip
# Force the script to be regenerated by `make`.
delete ${worksrcpath}/${name}
patchfiles patch-config-location.diff \
patch-youtube_dl-update.py.diff
reinplace -W ${worksrcpath} "s|@PREFIX@|${prefix}|g" \
# Restore original mtimes of files changed by the patch so that `make` doesn't try to regenerate the documentation with `pandoc`.
foreach f {youtube_dl/update.py youtube_dl/options.py README.md youtube-dl.1} {
file mtime ${worksrcpath}/${f} [file mtime ${worksrcpath}/${f}.orig]
build.args-append PYTHON=${configure.python}
destroot.args PREFIX=${prefix} \
MANDIR=${prefix}/share/man \
set docdir ${prefix}/share/doc/${name}
xinstall -d ${destroot}${docdir}
xinstall -m 0644 -W ${worksrcpath} LICENSE README.md ${destroot}${docdir}