fix(yt-dlp): follow upstream versioning + rename package to -git (#3042) (#3068)

* fix(yt-dlp): follow upstream versioning + rename package to -git

* update anda.hcl with new spec filename

* correct spec syntax error

* use a git repo that's not empty ffs

use anda macros and generate proper version output in yt-dlp --version

(cherry picked from commit 740e79f8b4)

Co-authored-by: sadlerm4 <sad_lerm@hotmail.com>
This commit is contained in:
Raboneko
2025-01-18 23:34:36 -08:00
committed by GitHub
parent e8d1c093ae
commit 59462ee06d
3 changed files with 17 additions and 19 deletions
+1 -2
View File
@@ -1,9 +1,8 @@
project pkg {
rpm {
spec = "yt-dlp-nightly.spec"
spec = "yt-dlp-git.spec"
}
labels {
nightly = "1"
mock = 1
}
}
+3 -7
View File
@@ -1,8 +1,4 @@
if filters.contains("nightly") {
rpm.global("commit", gh_commit("yt-dlp/yt-dlp"));
if rpm.changed() {
rpm.global("ver", gh("yt-dlp/yt-dlp"));
rpm.global("commit_date", date());
rpm.release();
}
rpm.version(gh("yt-dlp/yt-dlp-master-builds"));
if rpm.changed() {
rpm.release();
}
@@ -1,18 +1,12 @@
#bcond_without tests
%global commit 164368610456e2d96b279f8b120dea08f7b1d74f
%global shortcommit %(c=%{commit}; echo ${c:0:7})
%global commit_date 20250117
%global ver 2025.01.15
Name: yt-dlp-nightly
Version: %commit_date.git~%shortcommit
Provides: yt-dlp-nightly = %ver^%version
Name: yt-dlp-git
Version: 2025.01.16.024033
Release: 1%?dist
Summary: A command-line program to download videos from online video platforms
License: Unlicense
URL: https://github.com/yt-dlp/yt-dlp
Source: %url/archive/%commit.tar.gz
# License of the specfile
Source: https://src.fedoraproject.org/rpms/yt-dlp/raw/rawhide/f/yt-dlp.spec.license
@@ -31,6 +25,8 @@ BuildRequires: %{py3_dist pytest}
BuildRequires: pandoc
BuildRequires: make
BuildRequires: anda-srpm-macros
# ffmpeg-free is now available in Fedora.
Recommends: /usr/bin/ffmpeg
Recommends: /usr/bin/ffprobe
@@ -39,12 +35,16 @@ Conflicts: yt-dlp
Suggests: python3dist(keyring)
Provides: yt-dlp-nightly = 1:0-1%?dist
Obsoletes: yt-dlp-nightly < 0:20250117.git~1643686-2%?dist
%global _description %{expand:
yt-dlp is a command-line program to download videos from many different online
video platforms, such as youtube.com. The project is a fork of youtube-dl with
additional features and fixes.}
%description %{_description}
%description %{_description}. This package is built from the yt-dlp master branch.
%package bash-completion
Summary: Bash completion for yt-dlp
@@ -83,13 +83,16 @@ Conflicts: yt-dlp-fish-completion
Fish command line completion support for %{name}.
%prep
%autosetup -n yt-dlp-%commit
%git_clone %{url} master
# Remove unnecessary shebangs
find -type f ! -executable -name '*.py' -print -exec sed -i -e '1{\@^#!.*@d}' '{}' +
# Relax version constraints
sed -i 's@"\(requests\|urllib3\|websockets\)>=.*"@"\1"@' pyproject.toml
# Update version number
%{python3} devscripts/update-version.py %{version} -c master -r yt-dlp/yt-dlp-master-builds
%generate_buildrequires
%pyproject_buildrequires -r