From 43f99b854e2732135c8df2dd29c3e069e50fafd9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luis=20Guzm=C3=A1n?= Date: Tue, 14 Jan 2025 17:38:49 +0000 Subject: [PATCH] yt-dlp: add latest stable upstream and remove explicit site listing --- helpers/make-yt-dlp | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 helpers/make-yt-dlp diff --git a/helpers/make-yt-dlp b/helpers/make-yt-dlp new file mode 100644 index 0000000..292439e --- /dev/null +++ b/helpers/make-yt-dlp @@ -0,0 +1,36 @@ +#!/bin/sh +# +# Copyright (C) 2025 Luis Guzman +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# + +VERSION=1 +EXTERNAL='deb-src http://deb.debian.org/debian sid main' +BACKPORTS=true +. ./config + +SUPPORTED_SITES="https://ytdl-org.github.io/youtube-dl/supportedsites.html" +LAST_SUPPORTED="$(tail -n1 debian/control|sed 's|^ ||')" + +sed -i "/Currently supported/s|are:|are at:|" debian/control +/bin/sed -n -i '/Currently supported/{p;:a;N;/'$LAST_SUPPORTED'/!ba;s| .*| '$SUPPORTED_SITES'\n|};p' debian/control +# Make sure it fails if we don't get the wanted output. +[ "$SUPPORTED_SITES" != "$(tail -n2 debian/control|awk NF|sed 's|^ ||')" ] && \ + echo -e ">>>Site replacement needs fixing, exiting...<<<\n" && exit + +changelog "Track latest release and remove explicit site listing, redirecting to website author." + +package