Files
python-yt_dlp/python-yt_dlp.spec

60 lines
1.6 KiB
RPMSpec

%define pkgname %(echo %name | cut -d- -f2- | tr - _)
Name: python-yt_dlp
Version: 2025.3.31
Release: 1mamba
Summary: A feature-rich command-line audio/video downloader
Group: System/Libraries
Vendor: openmamba
Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: https://github.com/yt-dlp/yt-dlp
Source: https://pypi.debian.net/yt-dlp/yt_dlp-%{version}.tar.gz
License: Unlicense
BuildArch: noarch
## AUTOBUILDREQ-BEGIN
BuildRequires: libpython311-devel
## AUTOBUILDREQ-END
%description
%{summary}.
%if 0%{?with_pyver}
%pyver_package
%endif
%prep
%setup -q -n yt_dlp-%{version}
%build
CFLAGS="%{optflags}" %{__python} -m build --no-isolation --wheel
%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%{__python} -m installer --destdir=%{buildroot} dist/*.whl
#%if "%{?with_pyver}" != "3"
## Rename any conflicting file outside of python site packages tree
#for f in %{_bindir}/pdm; do
# mv %{buildroot}${f}{,-%{?pyappend}}
#done
#%endif
%files %{?pyappend}
%defattr(-,root,root)
%{_bindir}/yt-dlp
%{_datadir}/bash-completion/completions/yt-dlp
%{_datadir}/fish/vendor_completions.d/yt-dlp.fish
%{_datadir}/zsh/site-functions/_yt-dlp
%dir %{python_sitelib}/%{pkgname}-%{version}.dist-info
%{python_sitelib}/%{pkgname}-%{version}.dist-info/*
%dir %{python_sitelib}/%{pkgname}
%{python_sitelib}/%{pkgname}/*
%dir %{_docdir}/yt_dlp
%{_docdir}/yt_dlp/README.txt
%{_mandir}/man1/yt-dlp.1*
%doc AUTHORS LICENSE
%changelog
* Fri Apr 18 2025 Silvan Calarco <silvan.calarco@mambasoft.it> 2025.3.31-1mamba
- package created using the webbuild interface