diff options
Diffstat (limited to 'network/youtube-dl/youtube-dl.SlackBuild')
-rw-r--r-- | network/youtube-dl/youtube-dl.SlackBuild | 45 |
1 files changed, 29 insertions, 16 deletions
diff --git a/network/youtube-dl/youtube-dl.SlackBuild b/network/youtube-dl/youtube-dl.SlackBuild index 68db540832..6cd1b232de 100644 --- a/network/youtube-dl/youtube-dl.SlackBuild +++ b/network/youtube-dl/youtube-dl.SlackBuild @@ -1,9 +1,9 @@ -#!/bin/sh +#!/bin/bash # Slackware build script for youtube-dl # Copyright 2010 GPLeo <gpleomail@gmail.com> # Copyright 2010-2012 byteframe <byteframe@gmail.com> -# Copyright 2015-2019 Dimitris Zlatanidis Orestiada, Greece +# Copyright 2015-2024 Dimitris Zlatanidis Orestiada, Greece # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -23,10 +23,13 @@ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +cd $(dirname $0) ; CWD=$(pwd) + PRGNAM=youtube-dl -VERSION=${VERSION:-2019.11.28} +VERSION=${VERSION:-2021.12.17+20240122_dc512e3a8} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} if [ -z "$ARCH" ]; then case "$( uname -m )" in @@ -36,7 +39,11 @@ if [ -z "$ARCH" ]; then esac fi -CWD=$(pwd) +if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then + echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE" + exit 0 +fi + TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} @@ -62,27 +69,34 @@ mkdir -p $TMP $PKG $OUTPUT cd $TMP rm -rf $PRGNAM-$VERSION mkdir $PRGNAM-$VERSION -tar xvf $CWD/$PRGNAM-$VERSION.tar.gz -C $PRGNAM-$VERSION --strip-components 1 +tar xvf $CWD/$PRGNAM-$VERSION.tar.xz -C $PRGNAM-$VERSION --strip-components 1 cd $PRGNAM-$VERSION chown -R root:root . find -L . \ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ - -o -perm 511 \) -exec chmod 755 {} \; -o \ + -o -perm 511 \) -exec chmod 755 {} + -o \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ - -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; + -o -perm 440 -o -perm 400 \) -exec chmod 644 {} + # setup.py patch patch -p1 < $CWD/setup.patch -python setup.py install --root=$PKG +# 20230627 bkw: building the man page would require pandoc or pandoc-bin. +# Easier to just include the prebuilt manpage in the SBo repo. +cat $CWD/$PRGNAM.1 > $PRGNAM.1 -# Python 3 support. -if $(python3 -c 'import sys' 2>/dev/null); then - python3 setup.py install --root=$PKG -fi +# 20230627 bkw: Unusual for a python build, we need this for the man page +# and shell completions. It also installs the all-in-one youtube-dl +# 'frozen' binary, which we don't want, but setup.py will overwrite that. +make install DESTDIR=$PKG PREFIX=/usr MANDIR=/usr/man + +python2 setup.py install --root=$PKG +python3 setup.py install --root=$PKG + +gzip $PKG/usr/man/man*/* -find $PKG/usr/man -type f -exec gzip -9 {} \; -for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done +# 20230627 bkw: this empty dir gets created, but we don't need it. +rmdir $PKG/usr/doc/youtube_dl mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION cp -a README.md LICENSE AUTHORS ChangeLog $PKG/usr/doc/$PRGNAM-$VERSION @@ -90,7 +104,6 @@ cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc -cat $CWD/doinst.sh > $PKG/install/doinst.sh cd $PKG -/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE |