Search
SailfishOS Open Build Service
>
Projects
>
sailfishos
:
chum
>
youtube-dl
> _service:tar_git:youtube-dl.spec
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File _service:tar_git:youtube-dl.spec of Package youtube-dl
# # Do NOT Edit the Auto-generated Part! # Generated by: spectacle version 0.32 # Name: youtube-dl # >> macros # << macros %define int_name youtube_dl Summary: YouTube video downloader Version: 2021.12.17+obs1 Release: 1.1.2 Group: Applications/Multimedia License: Unlicense BuildArch: noarch URL: https://github.com/ytdl-org/youtube-dl Source0: %{name}-%{version}.tar.gz Source100: youtube-dl.yaml Patch0: fix_ffmpeg_sfos.patch Requires: ffmpeg-tools Requires: youtube-dl-bin BuildRequires: pkgconfig(python2) BuildRequires: pkgconfig(python) BuildRequires: make BuildRequires: sed BuildRequires: zip BuildRequires: python2-rpm-macros BuildRequires: python3-rpm-macros %description Command-line program to download videos from YouTube.com and other video sites %if "%{?vendor}" == "chum" PackageName: YouTube-DL Type: console-application DeveloperName: nephros Categories: - Media - Video %endif %package bash-completion Summary: bash-completion support for %{name} Group: Applications/Multimedia %description bash-completion %{summary}. %package standalone Summary: Standalone (zippped) version of %{name} Group: Applications/Multimedia Requires: python Provides: youtube-dl-bin = %{version} Conflicts: %{name}-script Obsoletes: youtube-dl-bin < %{version} %description standalone %{summary}. %package script Summary: Script (unzipped) version of %{name} Group: Applications/Multimedia Requires: %{name}-python Provides: youtube-dl-bin = %{version} Conflicts: %{name}-standalone Obsoletes: youtube-dl-bin < %{version} %description script %{summary}. %package python Summary: Embedded (python) version of %{name} for apps Group: Applications/Multimedia Requires: python %description python %{summary}. %package python3 Summary: Embedded (python3) version of %{name} for apps Group: Applications/Multimedia Requires: python3-base %description python3 %{summary}. %prep %setup -q -n %{name}-%{version}/upstream # fix_ffmpeg_sfos.patch %patch0 -p1 # >> 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}'/" youtube_dl/version.py echo "Build host SFOS version is: " %{sailfishos_version} # << setup %build # >> build pre # generate the bash completion file ./devscripts/bash-completion.py #%%{__python} setup.py build %py2_build %py3_build %{__make} youtube-dl # << build pre # >> build post cp youtube-dl youtube-dl-standalone # << 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 youtube-dl-standalone %{buildroot}%{_bindir}/youtube-dl-standalone %{__install} -m 755 -D bin/youtube-dl %{buildroot}%{_bindir}/youtube-dl.py %{__install} -m 644 -D youtube-dl.bash-completion %{buildroot}%{_sysconfdir}/bash_completion.d/%{name} #%%{__python} setup.py install --skip-build --prefix=%%{_prefix} --root=%%{buildroot} %py2_install %py3_install # << install pre # >> install post # gets installed here, does not belong as prefix/syconfdir expands to /usr/etc/... rm -r %{buildroot}%{_prefix}%{_sysconfdir}/bash_completion.d # 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}/youtube-dl ||: fi # << preun standalone %post standalone # >> post standalone ln -sf youtube-dl-standalone %{_bindir}/youtube-dl ||: # << post standalone %preun script # >> preun script if [ $1 -lt 1 ] ; then rm %{_bindir}/youtube-dl ||: fi # << preun script %post script # >> post script ln -sf youtube-dl.py %{_bindir}/youtube-dl ||: # << post script %files %defattr(-,root,root,-) # >> files # << files %files bash-completion %defattr(-,root,root,-) %config %{_sysconfdir}/bash_completion.d/%{name} # >> files bash-completion # << files bash-completion %files standalone %defattr(-,root,root,-) %{_bindir}/youtube-dl-standalone %ghost %{_bindir}/youtube-dl # >> files standalone # << files standalone %files script %defattr(-,root,root,-) %{_bindir}/youtube-dl.py %ghost %{_bindir}/youtube-dl # >> files script # << files script %files python %defattr(-,root,root,-) %{python2_sitelib}/%{int_name} %{python2_sitelib}/%{int_name}*egg-info # >> files python # << files python %files python3 %defattr(-,root,root,-) %{python3_sitelib}/%{int_name} %{python3_sitelib}/%{int_name}*egg-info # >> files python3 # << files python3