mirror of
https://abf.rosa.ru/djam/livestreamer.git
synced 2025-02-23 08:52:55 +00:00
Imported from SRPM
This commit is contained in:
commit
1a508a2de2
2 changed files with 89 additions and 0 deletions
2
.abf.yml
Normal file
2
.abf.yml
Normal file
|
@ -0,0 +1,2 @@
|
|||
sources:
|
||||
livestreamer-1.12.2.tar.gz: 399b57353296f53383205ab38782ddc5c81dcd07
|
87
livestreamer.spec
Normal file
87
livestreamer.spec
Normal file
|
@ -0,0 +1,87 @@
|
|||
Name: livestreamer
|
||||
Version: 1.12.2
|
||||
Release: 1
|
||||
License: BSD and MIT
|
||||
Summary: Extracts streams and pipes them into a video player of choice
|
||||
Url: http://livestreamer.tanuki.se/
|
||||
Group: Sound
|
||||
Source: https://pypi.python.org/packages/source/l/%{name}/%{name}-%{version}.tar.gz
|
||||
BuildRequires: python3-devel
|
||||
BuildRequires: python3-setuptools
|
||||
BuildRequires: python3-requests
|
||||
BuildRequires: python3-sphinx
|
||||
BuildRequires: python-singledispatch
|
||||
#BuildRequires: python-futures
|
||||
BuildRequires: dos2unix
|
||||
Requires: python3-requests
|
||||
#Requires: fontawesome-fonts
|
||||
|
||||
BuildArch: noarch
|
||||
|
||||
%description
|
||||
Livestreamer is a CLI program that extracts streams from various services and
|
||||
pipes them into a video player of choice.
|
||||
Livestreamer is built upon a plugin system which allows support for new
|
||||
services to be easily added.
|
||||
|
||||
%prep
|
||||
%setup -q -n %{name}-%{version}
|
||||
|
||||
# edit .py file and use python3
|
||||
find . -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python3}|'
|
||||
|
||||
# delete version-control-internal-file
|
||||
find . -name .gitignore -exec rm -f {} \; >/dev/null
|
||||
# remove bundles fonts
|
||||
rm -r docs/_themes/sphinx_rtd_theme_violet/static/fonts
|
||||
# Remove bundled egg-info
|
||||
rm -rf src/livestreamer.egg-info
|
||||
|
||||
%build
|
||||
%{__python3} setup.py build
|
||||
|
||||
# Generate man page and html documentation (needs python-sphinx)
|
||||
%{__python3} setup.py build_sphinx -b man
|
||||
%{__python3} setup.py build_sphinx -b html
|
||||
|
||||
%install
|
||||
%{__python3} setup.py install --root=%{buildroot} --skip-build
|
||||
for file in %{buildroot}%{python3_sitelib}/%{name}/packages/flashmedia/{tag,packet,__init__,flv,f4v,util,error}.py; do
|
||||
chmod a+x $file
|
||||
done
|
||||
|
||||
# install man page
|
||||
install -p -d -m755 %{buildroot}%{_mandir}/man1
|
||||
# rename manual page due rpmlint warning W: no-manual-page-for-binary python3-livestreamer
|
||||
install -p -m644 build/sphinx/man/%{name}.1 %buildroot%{_mandir}/man1/%{name}.1
|
||||
|
||||
# install html docs
|
||||
install -p -d -m755 %{buildroot}%{_docdir}/%{name}
|
||||
mv build/sphinx/html %{buildroot}%{_docdir}/%{name}
|
||||
|
||||
# convert to unix format due rpmlint warning W: wrong-file-end-of-line-encoding
|
||||
dos2unix %{buildroot}/%{_docdir}/%{name}/html/_static/jquery.js
|
||||
|
||||
# convert to utf8 due rpmling warning W: file-not-utf8 /usr/share/doc/python-livestreamer/html/objects.inv
|
||||
iconv -f iso-8859-1 -t utf-8 %{buildroot}/%{_docdir}/%{name}/html/objects.inv > objects.inv.utf8; \
|
||||
mv objects.inv.utf8 %{buildroot}/%{_docdir}/%{name}/html/objects.inv
|
||||
|
||||
# convert to unix format due rpmlint warning W: wrong-file-end-of-line-encoding
|
||||
dos2unix %{buildroot}/%{_docdir}/%{name}/html/objects.inv
|
||||
|
||||
# Sphinx info file for hashing, no longer needed
|
||||
rm %{buildroot}/%{_docdir}/%{name}/html/.buildinfo
|
||||
|
||||
%check
|
||||
%{__python3} setup.py test
|
||||
|
||||
%files
|
||||
%doc *.rst LICENSE*
|
||||
#license LICENSE*
|
||||
%{_bindir}/%{name}
|
||||
%{python3_sitelib}/%{name}
|
||||
%{python3_sitelib}/%{name}_cli
|
||||
%{python3_sitelib}/%{name}-%{version}-py*.egg-info
|
||||
%{_mandir}/man1/%{name}.1.*
|
||||
|
||||
%changelog
|
Loading…
Add table
Reference in a new issue