Assign %attrs to %ghosted files so that rpm knows what permissions they

should have.
Cleanup source files that should not be installed
Fix the __init__
This commit is contained in:
Toshio Kuratomi 2017-02-18 09:53:25 -08:00
commit a3d3cf9a8e

View file

@ -15,7 +15,7 @@
Name: python-sphinx
Version: 1.5.2
Release: 1%{?dist}
Release: 2%{?dist}
Summary: Python documentation generator
Group: Development/Tools
@ -348,6 +348,10 @@ sed '1d' -i sphinx/pycode/pgen2/token.py
# fix line encoding of bundled jquery.js
dos2unix -k ./sphinx/themes/basic/static/jquery.js
# In 1.5.2, the upstream tarball left this .pyc by mistake.
# Remove it so that it doesn't get included in the python3 build by mistake
rm sphinx/locale/__init__.pyc
%if 0%{?with_python3}
rm -rf %{py3dir}
cp -a . %{py3dir}
@ -369,12 +373,19 @@ popd
%install
%if 0%{?with_python3}
%py3_install
for i in sphinx-{apidoc,autogen,build,quickstart}; do
mv %{buildroot}%{_bindir}/$i %{buildroot}%{_bindir}/$i-%{python3_version}
ln -s $i-%{python3_version} %{buildroot}%{_bindir}/$i-3
done
# These appear to be incomplete C extensions to speed up parsing. They are not
# built by setup.py yet. Removing them in %%install so that if sphinx does
# make use of them, and we don't notice, we only remove these source files
# after the build has created the .so's
rm %{builddir}%{python3_sitelib}/sphinx/pycode/pgen2/parse.{pyx,c}
%endif # with_python3
%py2_install
@ -383,6 +394,12 @@ for i in sphinx-{apidoc,autogen,build,quickstart}; do
ln -s $i-%{python2_version} %{buildroot}%{_bindir}/$i-2
done
# These appear to be incomplete C extensions to speed up parsing. They are not
# built by setup.py yet. Removing them in %%install so that if sphinx does
# make use of them, and we don't notice, we only remove these source files
# after the build has created the .so's
rm %{builddir}%{python2_sitelib}/sphinx/pycode/pgen2/parse.{pyx,c}
for i in sphinx-{apidoc,autogen,build,quickstart}; do
touch %{buildroot}%{_bindir}/$i
done
@ -516,14 +533,14 @@ fi
%exclude %{_mandir}/man1/sphinx-*-%{python3_version}.1*
%{_mandir}/man1/*
%ghost %{_bindir}/sphinx-apidoc
%ghost %{_bindir}/sphinx-autogen
%ghost %{_bindir}/sphinx-build
%ghost %{_bindir}/sphinx-quickstart
%ghost %{_mandir}/man1/sphinx-all.1.gz
%ghost %{_mandir}/man1/sphinx-apidoc.1.gz
%ghost %{_mandir}/man1/sphinx-build.1.gz
%ghost %{_mandir}/man1/sphinx-quickstart.1.gz
%ghost %attr(755, root, root) %{_bindir}/sphinx-apidoc
%ghost %attr(755, root, root) %{_bindir}/sphinx-autogen
%ghost %attr(755, root, root) %{_bindir}/sphinx-build
%ghost %attr(755, root, root) %{_bindir}/sphinx-quickstart
%ghost %attr(644, root, root) %{_mandir}/man1/sphinx-all.1.gz
%ghost %attr(644, root, root) %{_mandir}/man1/sphinx-apidoc.1.gz
%ghost %attr(644, root, root) %{_mandir}/man1/sphinx-build.1.gz
%ghost %attr(644, root, root) %{_mandir}/man1/sphinx-quickstart.1.gz
%if 0%{?with_python3}
%files -n python3-sphinx
@ -534,14 +551,14 @@ fi
%{python3_sitelib}/Sphinx-%{version}-py%{python3_version}.egg-info/
%{_mandir}/man1/sphinx-*-%{python3_version}.1*
%ghost %{_bindir}/sphinx-apidoc
%ghost %{_bindir}/sphinx-autogen
%ghost %{_bindir}/sphinx-build
%ghost %{_bindir}/sphinx-quickstart
%ghost %{_mandir}/man1/sphinx-all.1.gz
%ghost %{_mandir}/man1/sphinx-apidoc.1.gz
%ghost %{_mandir}/man1/sphinx-build.1.gz
%ghost %{_mandir}/man1/sphinx-quickstart.1.gz
%ghost %attr(755, root, root) %{_bindir}/sphinx-apidoc
%ghost %attr(755, root, root) %{_bindir}/sphinx-autogen
%ghost %attr(755, root, root) %{_bindir}/sphinx-build
%ghost %attr(755, root, root) %{_bindir}/sphinx-quickstart
%ghost %attr(644, root, root) %{_mandir}/man1/sphinx-all.1.gz
%ghost %attr(644, root, root) %{_mandir}/man1/sphinx-apidoc.1.gz
%ghost %attr(644, root, root) %{_mandir}/man1/sphinx-build.1.gz
%ghost %attr(644, root, root) %{_mandir}/man1/sphinx-quickstart.1.gz
%endif # with_python3
@ -550,6 +567,12 @@ fi
%changelog
* Sat Feb 18 2017 Toshio Kuratomi <toshio@fedoraproject.org> - - 1.5.2-2
- Assign %%attrs to %%ghosted files so that rpm knows what permissions they
should have.
- Cleanup source files that should not be installed
- Fix the __init__
* Fri Feb 17 2017 Toshio Kuratomi <toshio@fedoraproject.org> - - 1.5.2-1
- Update to 1.5.2
- Remove a few latex dependencies that are no longer needed