#!/bin/bash # Slackware build script for yt-dlp-bin # Originally written by G. Galdini. Modified and now maintained by # B. Watson . # Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details. # 20251209 bkw: updated for v2025.12.08. # 20251114 bkw: updated for v2025.11.12. # 20251022 bkw: updated for v2025.10.22. # 20251015 bkw: updated for v2025.10.14. # 20250929 bkw: updated for v2025.09.26. # 20250923 bkw: updated for v2025.09.23. # 20250913 bkw: # - updated for v2025.09.05. # - add version check, since the "source" filename never changes. # 20250901 bkw: DOWNLOAD="UNSUPPORTED", add fake .info file for aarch64. # 20250825 bkw: # - take over maintenance. # - relicense as WTFPL. # - update for v2025.08.22. # - add getdocs.sh script to auto-download the documentation from github. # - use the ELF binary compiled for linux (yt-dlp_linux) rather than # the python-wrapped zip file (yt-dlp), to avoid the impending EOL # of python-3.9: the ELF binary includes its own python interpreter. # probably this can be changed back after the next Slackware release # (15.1 or 16.0, whatever it ends up being called). this means no # 32-bit x86 support, sorry. cd $(dirname $0) ; CWD=$(pwd) PRGNAM=yt-dlp-bin SRCNAM=${PRGNAM%-bin} VERSION=${VERSION:-2025.12.08} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} if [ -z "$ARCH" ]; then case "$( uname -m )" in i?86) ARCH=i586 ;; arm*) ARCH=arm ;; *) ARCH=$( uname -m ) ;; esac fi # 20250826 bkw: Should this come before or after the unsupported arch # error? I think it's safer but more confusing if it's before... if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE" exit 0 fi case "$ARCH" in x86_64) SRCNAM=yt-dlp_linux ;; aarch64) SRCNAM=yt-dlp_linux_aarch64 ;; *) # get the user's attention. cat < $PKGDOC/$( basename $i ) done cat $CWD/$PRGNAM.SlackBuild > $PKGDOC/$PRGNAM.SlackBuild mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc cd $PKG /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE