diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..1eb8f684cfa2b45c219ddf10734bfc8b1f59480e --- /dev/null +++ b/LICENSE @@ -0,0 +1,20 @@ +The MIT License (MIT) + +Copyright (c) 2016 Antoine Bertin + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/python-subliminal.spec b/python-subliminal.spec new file mode 100644 index 0000000000000000000000000000000000000000..d50b8060e5aff3c9a3fb9ab2a72992c1892f5007 --- /dev/null +++ b/python-subliminal.spec @@ -0,0 +1,98 @@ +%global srcname subliminal + +Name: python-%{srcname} +Version: 2.1.0 +Release: 1 +Summary: Python library to search and download subtitles +License: MIT +URL: https://github.com/Diaoul/subliminal +Source: https://github.com/Diaoul/%{srcname}/archive/%{version}/%{srcname}-%{version}.tar.gz +Patch0: python-subliminal_doc-inventories.patch +BuildArch: noarch +BuildRequires: make +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-appdirs +BuildRequires: python3-docs +BuildRequires: python3-sphinx +BuildRequires: python3-sphinx_rtd_theme +BuildRequires: python3-babelfish +BuildRequires: python3-guessit +BuildRequires: python3-sphinxcontrib-programoutput +BuildRequires: python3-beautifulsoup4 +BuildRequires: python3-click +BuildRequires: python-guessit-doc +BuildRequires: python3-rarfile +BuildRequires: python3-stevedore +BuildRequires: python3-enzyme +BuildRequires: python3-pysrt +BuildRequires: python3-dogpile-cache +BuildRequires: python3-rebulk + +%global _description\ +Subliminal is a Python library to search and download subtitles.\ +It comes with an easy to use yet powerful CLI suitable for direct use or\ +cron jobs.\ +\ +Subliminal uses multiple providers to give users a vast choice and have\ +a better chance to find the best matching subtitles. Current supported\ +providers are:\ +\ + - Addic7ed\ + - LegendasTV\ + - NapiProjekt\ + - OpenSubtitles\ + - Podnapisi\ + - Shooter\ + - TheSubDB\ + - TvSubtitles + +%description %_description + +%package -n python3-%{srcname} +Summary: %summary +%{?python_provide:%python_provide python3-%{srcname}} +Suggests: %{name}-doc + +%description -n python3-%{srcname} %_description + +%package doc +Summary: %summary + +%description doc %_description + +%prep +%autosetup -p1 -n %{srcname}-%{version} + +%build +%py3_build + +%install +%py3_install + +pushd docs +export SPHINXBUILD=sphinx-build-3 +PYTHONPATH=%{buildroot}%{python3_sitelib} PATH=$PATH:%{buildroot}%{_bindir} %make_build html +PYTHONPATH=%{buildroot}%{python3_sitelib} PATH=$PATH:%{buildroot}%{_bindir} %make_build text +PYTHONPATH=%{buildroot}%{python3_sitelib} PATH=$PATH:%{buildroot}%{_bindir} %make_build man +find . -name .buildinfo -type f -delete +popd +install -D -m 0644 docs/_build/man/%{srcname}.1 %{buildroot}%{_mandir}/man1/%{srcname}.1 + +%check + +%files -n python3-%{srcname} +%license LICENSE +%{_bindir}/subliminal +%{python3_sitelib}/%{srcname} +%{python3_sitelib}/%{srcname}-%{version}-py*.egg-info + +%files doc +%doc README.rst docs/_build/html docs/_build/text +%license LICENSE +%{_mandir}/man1/%{srcname}.1* + +%changelog +* Fri Jul 16 2021 anyunhao - 2.1.0-1 +- Package init + diff --git a/python-subliminal_doc-inventories.patch b/python-subliminal_doc-inventories.patch new file mode 100644 index 0000000000000000000000000000000000000000..f81a31029b75eacde82a778796d1aef2f90962e3 --- /dev/null +++ b/python-subliminal_doc-inventories.patch @@ -0,0 +1,42 @@ +diff -rupN subliminal-2.0.5/docs/conf.py subliminal-2.0.5-new/docs/conf.py +--- subliminal-2.0.5/docs/conf.py 2016-09-03 21:43:35.000000000 +0200 ++++ subliminal-2.0.5-new/docs/conf.py 2017-09-03 21:45:51.924735838 +0200 +@@ -303,17 +303,18 @@ texinfo_documents = [ + + # Example configuration for intersphinx: refer to the Python standard library. + intersphinx_mapping = { +- 'python': ('http://docs.python.org/3.5', None), +- 'guessit': ('http://guessit.readthedocs.org/en/latest', None), +- 'babelfish': ('http://babelfish.readthedocs.org/en/latest', None), +- 'dogpilecache': ('http://dogpilecache.readthedocs.org/en/latest', None), +- 'dogpilecore': ('http://dogpilecore.readthedocs.org/en/latest', None), +- 'stevedore': ('http://docs.openstack.org/developer/stevedore', None), +- 'click': ('http://click.pocoo.org/4', None), +- 'rarfile': ('http://rarfile.readthedocs.org/en/latest/', None) ++ 'python': ('/usr/share/doc/python3-docs/html/', None), ++ 'guessit': ('/usr/share/doc/python-guessit-doc/html/', None), ++# 'babelfish': ('http://babelfish.readthedocs.org/en/latest', None), ++# 'dogpilecache': ('http://dogpilecache.readthedocs.org/en/latest', None), ++# 'dogpilecore': ('http://dogpilecore.readthedocs.org/en/latest', None), ++# 'stevedore': ('http://docs.openstack.org/developer/stevedore', None), ++# 'click': ('http://click.pocoo.org/4', None), ++# 'rarfile': ('http://rarfile.readthedocs.org/en/latest/', None) + } + + ++ + # -- Options for autodoc ------------------------------------------------------- + autodoc_member_order = 'bysource' + +diff -rupN subliminal-2.0.5/docs/Makefile subliminal-2.0.5-new/docs/Makefile +--- subliminal-2.0.5/docs/Makefile 2016-09-03 21:43:35.000000000 +0200 ++++ subliminal-2.0.5-new/docs/Makefile 2017-09-03 21:46:26.636654245 +0200 +@@ -2,7 +2,7 @@ + # + + # You can set these variables from the command line. +-SPHINXOPTS = -n -W ++SPHINXOPTS = -n + SPHINXBUILD = sphinx-build + PAPER = + BUILDDIR = _build diff --git a/subliminal-2.1.0.tar.gz b/subliminal-2.1.0.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..88ce8e45356b589776388325eba27792ce54eb11 Binary files /dev/null and b/subliminal-2.1.0.tar.gz differ