diff --git a/net-misc/yt_dlp/licenses/Unlicense b/net-misc/yt_dlp/licenses/Unlicense new file mode 100644 index 000000000..68a49daad --- /dev/null +++ b/net-misc/yt_dlp/licenses/Unlicense @@ -0,0 +1,24 @@ +This is free and unencumbered software released into the public domain. + +Anyone is free to copy, modify, publish, use, compile, sell, or +distribute this software, either in source code form or as a compiled +binary, for any purpose, commercial or non-commercial, and by any +means. + +In jurisdictions that recognize copyright laws, the author or authors +of this software dedicate any and all copyright interest in the +software to the public domain. We make this dedication for the benefit +of the public at large and to the detriment of our heirs and +successors. We intend this dedication to be an overt act of +relinquishment in perpetuity of all present and future rights to this +software under copyright law. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR +OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +For more information, please refer to diff --git a/net-misc/yt_dlp/yt_dlp-2021.11.10.1.recipe b/net-misc/yt_dlp/yt_dlp-2021.11.10.1.recipe new file mode 100644 index 000000000..903f02513 --- /dev/null +++ b/net-misc/yt_dlp/yt_dlp-2021.11.10.1.recipe @@ -0,0 +1,96 @@ +SUMMARY="A command-line program to download videos from various sites" +DESCRIPTION="A fork of youtube-dl with additional features and fixes. \ +The program is usually invoked as youtube-dl followed by \ +options and the video URL. Run 'youtube-dl --help' and get a summary \ +of all options. +Some YouTube videos are served using Adobe's proprietary RTMP protocol, which \ +imposes DRM restrictions and encrypts the connection. youtube-dl is not able \ +to download these videos by itself." +HOMEPAGE="https://github.com/yt-dlp/yt-dlp" +COPYRIGHT="2006-2021 youtube-dl and yt-dlp contributors" +LICENSE="Unlicense" +REVISION="1" +SOURCE_URI="https://github.com/yt-dlp/yt-dlp/releases/download/$portVersion/yt-dlp.tar.gz" +SOURCE_FILENAME="yt-dlp-$portVersion.tar.gz" +CHECKSUM_SHA256="2eb1c67e095ded9d328eaa0e6e26952248b55dd1031a3751c6d60b759aefa16a" +SOURCE_DIR="yt-dlp" + +ARCHITECTURES="any" + +PROVIDES=" + yt_dlp = $portVersion + cmd:yt_dlp = $portVersion + " +REQUIRES=" + haiku + ffmpeg_tools + cmd:python3 + " + +BUILD_REQUIRES=" + haiku_devel + " +BUILD_PREREQUIRES=" + cmd:find + cmd:make + cmd:zip + " + +PYTHON_PACKAGES=(python3) +PYTHON_VERSIONS=(3.7) +for i in "${!PYTHON_PACKAGES[@]}"; do + pythonPackage=${PYTHON_PACKAGES[i]} + pythonVersion=${PYTHON_VERSIONS[$i]} + eval "\ + PROVIDES_${pythonPackage}=\"\n\ + ${portName}_$pythonPackage = $portVersion\n\ + cmd:yt_dlp_$pythonPackage = $portVersion\n\ + \"; \ + REQUIRES_$pythonPackage=\"\n\ + haiku\n\ + cmd:python$pythonVersion\n\ + \"\ + " + + BUILD_REQUIRES="$BUILD_REQUIRES + setuptools_$pythonPackage + " + BUILD_PREREQUIRES="$BUILD_PREREQUIRES + cmd:python$pythonVersion + " +done + +INSTALL() +{ + for i in "${!PYTHON_PACKAGES[@]}"; do + pythonPackage=${PYTHON_PACKAGES[i]} + pythonVersion=${PYTHON_VERSIONS[$i]} + + python=python$pythonVersion + installLocation="$prefix"/lib/$python/vendor-packages/ + export PYTHONPATH="$installLocation" + rm -rf build + mkdir -p "$installLocation" + $python setup.py build install --root=/ --prefix="$prefix" + + rm -rf "$prefix"/share/man + mv "$binDir"/yt-dlp "$binDir"/yt-dlp-$pythonPackage + packageEntries $pythonPackage \ + "$prefix"/lib/$python \ + "$binDir"/yt-dlp-$pythonPackage + done + + make install PREFIX="$prefix" MANDIR="$manDir" SHAREDIR="$dataDir" \ + PYTHON="/system/bin/python3" BINDIR="$binDir" DESTDIR= + + install -d "$dataDir"/bash-completion "$docDir" + mv "$prefix"/share/doc/yt_dlp/README.txt "$docDir" + + rm -rf "$prefix"/etc "$prefix"/share +} + +TEST() +{ + # Will fail because flake8 is not available + make offlinetest +}