## Blatantly stolen from https://github.com/terrapkg/packages/blob/frawhide/anda/tools/yt-dlp-ejs/python-yt-dlp-ejs.spec ## I'm not ashamed... %global git_date 20251106 %global git_hash 4b4ac2b %global git_ver 0.3.1 %global rel 1 %global alt_name ejs %global src_name %{alt_name}-%{git_date}-%{git_hash}.tar.xz Name: python-yt-dlp-ejs Version: %{git_ver}^%{git_date}g%{git_hash} Release: %{rel}%{?dist} Summary: External JavaScript for yt-dlp supporting many runtimes License: Unlicense AND MIT AND ISC URL: https://github.com/yt-dlp/ejs #Source0: %{pypi_source yt_dlp_ejs} Source: %{url}/%{src_name} BuildArch: noarch BuildRequires: python3-devel BuildRequires: python3dist(pip) BuildRequires: python3dist(hatch-vcs) BuildRequires: (deno or bun or nodejs-npm) BuildRequires: git %global _description %{expand: %summary.} %description %_description %package -n python3-yt-dlp-ejs Summary: %{summary} Provides: yt-dlp-ejs = %{version} Requires: (deno or bun or nodejs-npm) %description -n python3-yt-dlp-ejs %_description %prep %autosetup -p1 -n %{alt_name} %generate_buildrequires %pyproject_buildrequires %build %pyproject_wheel %install %pyproject_install %pyproject_save_files -l yt_dlp_ejs %check %pyproject_check_import %files -n python3-yt-dlp-ejs -f %{pyproject_files}