mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-22 11:40:06 +02:00
yt-dlp: new version 2025.02.19
I must've used "mv" instead of "git mv" to rename the recipe...
This commit is contained in:
102
net-misc/yt_dlp/yt_dlp-2025.02.19.recipe
Normal file
102
net-misc/yt_dlp/yt_dlp-2025.02.19.recipe
Normal file
@@ -0,0 +1,102 @@
|
||||
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 'yt-dlp --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. yt-dlp is not able \
|
||||
to download these videos by itself."
|
||||
HOMEPAGE="https://github.com/yt-dlp/yt-dlp"
|
||||
COPYRIGHT="2006-2025 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="28a8c33e4c32bd12e16601180b9f3a43fdc2896ad5467bc6e5a9f1fa6c280e28"
|
||||
SOURCE_DIR="yt-dlp"
|
||||
|
||||
ARCHITECTURES="any"
|
||||
|
||||
PROVIDES="
|
||||
yt_dlp = $portVersion
|
||||
cmd:yt_dlp = $portVersion
|
||||
"
|
||||
REQUIRES="
|
||||
haiku
|
||||
ffmpeg6_tools
|
||||
cmd:python3
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku_devel
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
cmd:find
|
||||
cmd:make
|
||||
cmd:zip
|
||||
"
|
||||
|
||||
PYTHON_PACKAGES=(python310)
|
||||
PYTHON_VERSIONS=(3.10)
|
||||
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\
|
||||
requests_$pythonPackage\n\
|
||||
\"\
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="$BUILD_REQUIRES
|
||||
build_$pythonPackage
|
||||
hatchling_$pythonPackage
|
||||
installer_$pythonPackage
|
||||
"
|
||||
BUILD_PREREQUIRES="$BUILD_PREREQUIRES
|
||||
cmd:python$pythonVersion
|
||||
"
|
||||
TEST_REQUIRES="
|
||||
pytest_$pythonPackage
|
||||
"
|
||||
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 -m build --wheel --no-isolation
|
||||
$python -m installer -p $prefix dist/*.whl
|
||||
|
||||
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()
|
||||
{
|
||||
pytest-3.10 -v -m "not download"
|
||||
}
|
||||
Reference in New Issue
Block a user