aboutsummaryrefslogtreecommitdiff
path: root/network/youtube-dl/youtube-dl.SlackBuild
diff options
context:
space:
mode:
authorB. Watson <urchlay@slackware.uk>2023-06-27 00:30:35 -0400
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2023-07-08 16:41:57 +0700
commit7c380bcbd85fcf61f3859819964fe016b76ab8ef (patch)
treec46a951101de17c7d1e9c133bc8ad4a659394d95 /network/youtube-dl/youtube-dl.SlackBuild
parent50d1b63bd395ba251e7c49d6f8fb27b293d4a804 (diff)
network/youtube-dl: Install man page and shell completions.
Signed-off-by: B. Watson <urchlay@slackware.uk> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'network/youtube-dl/youtube-dl.SlackBuild')
-rw-r--r--network/youtube-dl/youtube-dl.SlackBuild30
1 files changed, 21 insertions, 9 deletions
diff --git a/network/youtube-dl/youtube-dl.SlackBuild b/network/youtube-dl/youtube-dl.SlackBuild
index ef646435d096f..24dc489070e0c 100644
--- a/network/youtube-dl/youtube-dl.SlackBuild
+++ b/network/youtube-dl/youtube-dl.SlackBuild
@@ -23,6 +23,11 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# 20230627 bkw: Modified by SlackBuilds.org, BUILD=2:
+# - include the man page and shell completions in the package.
+# - get rid of empty (and wrong) /usr/doc/youtube_dl/ dir.
+# - get rid of doinst.sh: there is no need for update-desktop-database as
+# there are no .desktop files in the package.
# Date: 20/06/2023
# Many Thanks to B. Watson for the tool git2tarxz.sh
@@ -32,7 +37,7 @@ cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=youtube-dl
VERSION=${VERSION:-2021.12.17+20230618_07af47960}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@@ -44,9 +49,6 @@ if [ -z "$ARCH" ]; then
esac
fi
-# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
-# the name of the created package would be, and then exit. This information
-# could be useful to other scripts.
if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
exit 0
@@ -82,18 +84,29 @@ 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
+# 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
+
+# 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
-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
+gzip $PKG/usr/man/man*/*
+
+# 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
@@ -101,7 +114,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