Search
SailfishOS Open Build Service
>
Projects
>
sailfishos
:
chum
:
testing
>
yt-dlp
> _service:tar_git:yt-dlp.spec
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File _service:tar_git:yt-dlp.spec of Package yt-dlp
# # Do NOT Edit the Auto-generated Part! # Generated by: spectacle version 0.32 # Name: yt-dlp # >> macros # << macros %define int_name yt_dlp Summary: Video downloader fork with additional features and fixes Version: 2023.12.30+obs2 Release: 0 Group: Applications/Multimedia License: Unlicense BuildArch: noarch URL: https://github.com/yt-dlp/yt-dlp Source0: %{name}-%{version}.tar.gz Source1: yt-dlp.py Source100: yt-dlp.yaml AutoReq: 0 Requires: yt-dlp-bin BuildRequires: pkgconfig(python3) >= 3.7 BuildRequires: make BuildRequires: sed BuildRequires: zip BuildRequires: python3-rpm-macros BuildRequires: python3dist(setuptools) %description >_dlp (yt-dlp) is a youtube-dl fork based on the now inactive youtube-dlc. The main focus of this project is adding new features and patches while also keeping up to date with the original project %if "%{?vendor}" == "chum" This is the Meta package for >_dlp. The packages on SailfishOS:Chum are split up into several variants: This package: empty package which depends on one of the others Standalone: provides the binary as a zipped shell archive. This is fine for regular users, but can not be used by other applications (except by calling the script). Script: Shell script and Python module. No difference for end users, but can be used by applications as well. Python/Embedded: The Python module dependency There are additional packages: Autocomplete: files for shell completion Wrapper: compatability script aiming to be a (somewhat) backwards compatible drop-in for the original youtube-dl Title: '>_dlp' Type: console-application PackagedBy: nephros Custom: PackagingRepo: https://gitlab.com/nephros/youtube-dl/-/tree/dlp Repo: https://github.com/yt-dlp/yt-dlp PackageIcon: https://avatars.githubusercontent.com/u/79589310 Categories: - Media - Video %endif # hack: use the description to place a macro: %global _version %(echo %{version}|sed -e 's/\+.*//') %package shell-completions Summary: Shell completion support for %{name} Group: Applications/Multimedia %description shell-completions %{summary} This installs shell autocompletion files for bash, fish, and zsh. %if "%{?vendor}" == "chum" Title: '>_dlp Shell completions' Type: addon PackagedBy: nephros Custom: PackagingRepo: https://gitlab.com/nephros/youtube-dl/-/tree/dlp Repo: https://github.com/yt-dlp/yt-dlp PackageIcon: https://dashboard.snapcraft.io/site_media/appmedia/2021/12/yt-dlp.png %endif %package standalone Summary: Standalone (zippped) version of %{name} Group: Applications/Multimedia Requires: python3-base >= 3.7 Requires: ffmpeg-tools Requires: python3dist(certifi) Requires: python3dist(mutagen) Requires: python3dist(pycryptodomex) Provides: %{name}-bin = %{version} Conflicts: %{name}-script Obsoletes: %{name}-bin < %{version} %description standalone %{summary} >_dlp (yt-dlp) is a youtube-dl fork based on the now inactive youtube-dlc. The main focus of this project is adding new features and patches while also keeping up to date with the original project %if "%{?vendor}" == "chum" Title: '>_dlp Standalone' Type: console-application PackagedBy: nephros Custom: PackagingRepo: https://gitlab.com/nephros/youtube-dl/-/tree/dlp Repo: https://github.com/yt-dlp/yt-dlp PackageIcon: https://avatars.githubusercontent.com/u/79589310 Categories: - Media - Video %endif %package script Summary: Script (unzipped) version of %{name} Group: Applications/Multimedia Requires: python3dist(%{name}) Requires: ffmpeg-tools Requires: python3dist(certifi) Requires: python3dist(mutagen) Requires: python3dist(pycryptodomex) Provides: %{name}-bin = %{version} Conflicts: %{name}-standalone Obsoletes: %{name}-bin < %{version} %description script %{summary} >_dlp (yt-dlp) is a youtube-dl fork based on the now inactive youtube-dlc. The main focus of this project is adding new features and patches while also keeping up to date with the original project %if "%{?vendor}" == "chum" Title: '>_dlp Script' Type: console-application PackagedBy: nephros Custom: PackagingRepo: https://gitlab.com/nephros/youtube-dl/-/tree/dlp Repo: https://github.com/yt-dlp/yt-dlp PackageIcon: https://avatars.githubusercontent.com/u/79589310 Categories: - Media - Video %endif %package wrapper Summary: Wrapper around %{name} for youtube-dl compatability Group: Applications/Multimedia Requires: %{name}-bin = %{version} Provides: youtube-dl = %{version} Conflicts: youtube-dl Obsoletes: youtube-dl < %{version} %description wrapper %{summary} This installs a /usr/bin/youtube-dl binary which wraps %{name} in compatability mode. >_dlp (yt-dlp) is a youtube-dl fork based on the now inactive youtube-dlc. The main focus of this project is adding new features and patches while also keeping up to date with the original project %if "%{?vendor}" == "chum" Title: 'YouTube-DL (wrapper via >_dlp)' Type: console-application PackagedBy: nephros Custom: PackagingRepo: https://gitlab.com/nephros/youtube-dl/-/tree/dlp Repo: https://github.com/yt-dlp/yt-dlp PackageIcon: https://avatars.githubusercontent.com/u/79589310 Categories: - Media - Video %endif %package -n python3-%{name} Summary: Embedded (python3) version of %{name} for inclusion in apps Group: Applications/Multimedia Requires: python3-base >= 3.7 Provides: %{name}-python3 = %{version} %description -n python3-%{name} %{summary} %if "%{?vendor}" == "chum" Title: '>_dlp Python Module' PackagedBy: nephros Custom: PackagingRepo: https://gitlab.com/nephros/youtube-dl/-/tree/dlp Repo: https://github.com/yt-dlp/yt-dlp PackageIcon: https://avatars.githubusercontent.com/u/79589310 Categories: - Library - Python %endif %prep %setup -q -n %{name}-%{version}/%{int_name} # >> setup # lets just set the revision, otherwise the subpackage version might be used for %%{version} #sed -i "s/__version__ = '.*'/__version__ = '%%{version}-%%{release}'/" youtube_dl/version.py sed -i "s/__version__ = '\(.*\)'/__version__ = '\1-%{release}'/" %{int_name}/version.py echo "Build host SFOS version is: " %{sailfishos_version} # << setup %build # >> build pre #%%{__python} setup.py build #%%py2_build %py3_build %{__make} lazy-extractors %{__make} yt-dlp %{__make} completion-bash %{__make} completion-fish %{__make} completion-zsh # << build pre # >> build post cp yt-dlp yt-dlp-standalone cp %{SOURCE1} yt-dlp.py printf '#!/bin/sh\nexec yt-dlp --compat-options youtube-dl "$@"\n' > youtube-dl # << build post %install rm -rf %{buildroot} # >> install pre # do a manual install instead of make so we don't get docs etc. %{__install} -m 755 -D yt-dlp-standalone %{buildroot}%{_bindir}/yt-dlp-standalone %{__install} -m 755 -D yt-dlp.py %{buildroot}%{_bindir}/yt-dlp.py # install the wrapper script: %{__install} -m 755 -D youtube-dl %{buildroot}%{_bindir}/youtube-dl %py3_install # << install pre # >> install post # fix shebangs for python3: find %{buildroot}%{python3_sitelib} -type f -exec sed -i '1s=^#!/usr/bin/\(python\|env python\)[23]\?=#!%{__python3}=' {} + # << install post %preun standalone # >> preun standalone if [ $1 -lt 1 ] ; then rm %{_bindir}/yt-dlp ||: fi # << preun standalone %post standalone # >> post standalone ln -sf yt-dlp-standalone %{_bindir}/yt-dlp ||: # << post standalone %preun script # >> preun script if [ $1 -lt 1 ] ; then rm %{_bindir}/yt-dlp ||: fi # << preun script %post script # >> post script ln -sf yt-dlp.py %{_bindir}/yt-dlp ||: # << post script %files %defattr(-,root,root,-) # >> files # << files %files shell-completions %defattr(-,root,root,-) %{_datadir}/bash-completion/completions/* %{_datadir}/fish/vendor_completions.d/* %{_datadir}/zsh/site-functions/* # >> files shell-completions # << files shell-completions %files standalone %defattr(-,root,root,-) %{_bindir}/yt-dlp-standalone %ghost %{_bindir}/yt-dlp # >> files standalone # << files standalone %files script %defattr(-,root,root,-) %{_bindir}/yt-dlp.py %ghost %{_bindir}/yt-dlp # >> files script # << files script %files wrapper %defattr(-,root,root,-) %{_bindir}/youtube-dl # >> files wrapper # << files wrapper %files -n python3-%{name} %defattr(-,root,root,-) %{python3_sitelib}/%{int_name} %{python3_sitelib}/%{int_name}*egg-info # >> files python3-%{name} # << files python3-%{name}