mirror of
https://github.com/yann64/haikuports.git
synced 2026-05-06 06:58:57 +02:00
youtube-dl: update to 2019.01.17
This commit is contained in:
99
net-misc/youtube_dl/youtube_dl-2019.01.17.recipe
Normal file
99
net-misc/youtube_dl/youtube_dl-2019.01.17.recipe
Normal file
@@ -0,0 +1,99 @@
|
||||
SUMMARY="A command-line program to download videos from various sites"
|
||||
DESCRIPTION="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://rg3.github.io/youtube-dl/"
|
||||
COPYRIGHT="2006-2019 youtube-dl contributors"
|
||||
LICENSE="Unlicense"
|
||||
REVISION="1"
|
||||
SOURCE_URI="https://yt-dl.org/downloads/$portVersion/youtube-dl-$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="278f04408ce2f80d58843b1d4ab1b5e5fa913269bd728a13970bac803697aa3b"
|
||||
SOURCE_DIR="youtube-dl"
|
||||
|
||||
ARCHITECTURES="any"
|
||||
|
||||
PROVIDES="
|
||||
youtube_dl = $portVersion
|
||||
cmd:youtube_dl = $portVersion
|
||||
"
|
||||
REQUIRES="
|
||||
haiku
|
||||
cmd:python
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku_devel
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
cmd:find
|
||||
cmd:make
|
||||
"
|
||||
|
||||
PYTHON_PACKAGES=(python python3)
|
||||
PYTHON_VERSIONS=(2.7 3.6)
|
||||
for i in "${!PYTHON_PACKAGES[@]}"; do
|
||||
pythonPackage=${PYTHON_PACKAGES[i]}
|
||||
pythonVersion=${PYTHON_VERSIONS[$i]}
|
||||
eval "\
|
||||
PROVIDES_${pythonPackage}=\"\n\
|
||||
${portName}_$pythonPackage = $portVersion\n\
|
||||
cmd:youtube_dl_$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"/youtube-dl "$binDir"/youtube-dl-$pythonPackage
|
||||
packageEntries $pythonPackage \
|
||||
"$prefix"/lib/$python \
|
||||
"$binDir"/youtube-dl-$pythonPackage
|
||||
done
|
||||
|
||||
make install PREFIX="$prefix" MANDIR="$manDir" SHAREDIR="$dataDir"
|
||||
install -d "$dataDir"/bash-completion "$docDir"
|
||||
mv "$prefix"/share/doc/youtube_dl/README.txt "$docDir"
|
||||
|
||||
# We now have two identical files in $prefix/etc/bash_completion.d/
|
||||
# Let's drop "youtube-dl.bash-completion" and keep "youtube-dl".
|
||||
rm -f "$prefix"/etc/bash_completion.d/youtube-dl.bash-completion
|
||||
|
||||
# We need "youtube-dl" in "$dataDir/bash-completion/completions/".
|
||||
mv "$prefix"/etc/bash_completion.d "$dataDir"/bash-completion/completions
|
||||
|
||||
mv "$prefix"/etc/fish "$dataDir"
|
||||
cd "$prefix"
|
||||
rmdir -p etc share/doc/youtube_dl
|
||||
}
|
||||
|
||||
TEST()
|
||||
{
|
||||
# Will fail because flake8 is not available
|
||||
make offlinetest
|
||||
}
|
||||
Reference in New Issue
Block a user