summaryrefslogtreecommitdiffstats
path: root/python/python-sphinx10.spec
diff options
context:
space:
mode:
Diffstat (limited to 'python/python-sphinx10.spec')
-rw-r--r--python/python-sphinx10.spec48
1 files changed, 25 insertions, 23 deletions
diff --git a/python/python-sphinx10.spec b/python/python-sphinx10.spec
index e8332b9..0627349 100644
--- a/python/python-sphinx10.spec
+++ b/python/python-sphinx10.spec
@@ -6,7 +6,7 @@
Name: python-sphinx10
Version: 1.0.4
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: Python documentation generator
Group: Development/Tools
@@ -19,6 +19,7 @@ License: BSD and Public Domain and Python and (MIT or GPLv2)
URL: http://sphinx.pocoo.org/
Source0: http://pypi.python.org/packages/source/S/%{upstream_name}/%{upstream_name}-%{version}.tar.gz
Source1: README.Fedora
+Patch0: Sphinx-1.0.4-localedirs.patch
BuildArch: noarch
BuildRequires: python2-devel >= 2.4
@@ -83,6 +84,7 @@ This package contains documentation in reST and HTML formats.
%prep
%setup -q -n %{upstream_name}-%{version}%{?prerel}
+%patch0 -p1 -b .localedirs
cp -p %{SOURCE1} .
sed '1d' -i sphinx/pycode/pgen2/token.py
@@ -125,42 +127,39 @@ rm -rf doc/_build
sed -i 's|python ../sphinx-build.py|/usr/bin/sphinx-1.0-build|' doc/Makefile
mv doc reST
-%find_lang sphinx
+# Move language files to /usr/share;
+# patch to support this incorporated in 0.6.6
+pushd %{buildroot}%{python_sitelib}/Sphinx-%{version}-py*.egg
+
+for lang in `find sphinx/locale -maxdepth 1 -mindepth 1 -type d -printf "%f "`;
+do
+ install -d %{buildroot}%{_datadir}/sphinx-1.0/locale/$lang
+ install -d %{buildroot}%{_datadir}/locale/$lang/LC_MESSAGES
+ mv sphinx/locale/$lang/LC_MESSAGES/sphinx.js \
+ %{buildroot}%{_datadir}/sphinx-1.0/locale/$lang/
+ mv sphinx/locale/$lang/LC_MESSAGES/sphinx.mo \
+ %{buildroot}%{_datadir}/locale/$lang/LC_MESSAGES/sphinx-1.0.mo
+ rm -rf sphinx/locale/$lang
+done
+popd
+%find_lang sphinx-1.0
# Language files; Since these are javascript, it's not immediately obvious to
# find_lang that they need to be marked with a language.
(cd %{buildroot} && find . -name 'sphinx.js') | sed -e 's|^.||' | sed -e \
's:\(.*/locale/\)\([^/_]\+\)\(.*\.js$\):%lang(\2) \1\2\3:' \
- >> sphinx.lang
+ >> sphinx-1.0.lang
%check
make test
-%files -f sphinx.lang
+%files -f sphinx-1.0.lang
%defattr(-,root,root,-)
%doc AUTHORS CHANGES EXAMPLES LICENSE README README.Fedora TODO
%{_bindir}/sphinx-*
-%dir %{python_sitelib}/Sphinx-%{version}-py*.egg
-%{python_sitelib}/Sphinx-%{version}-py*.egg/EGG-INFO
-%dir %{python_sitelib}/Sphinx-%{version}-py*.egg/sphinx
-%{python_sitelib}/Sphinx-%{version}-py*.egg/sphinx/*.py*
-%{python_sitelib}/Sphinx-%{version}-py*.egg/sphinx/builders
-%{python_sitelib}/Sphinx-%{version}-py*.egg/sphinx/directives
-%{python_sitelib}/Sphinx-%{version}-py*.egg/sphinx/domains
-%{python_sitelib}/Sphinx-%{version}-py*.egg/sphinx/ext
-%dir %{python_sitelib}/Sphinx-%{version}-py*.egg/sphinx/locale
-# this includes locale/__init.py*; looks like %%dir just means
-# not recursing
-%dir %{python_sitelib}/Sphinx-%{version}-py*.egg/sphinx/locale/*
-%dir %{python_sitelib}/Sphinx-%{version}-py*.egg/sphinx/locale/*/LC_MESSAGES
-%{python_sitelib}/Sphinx-%{version}-py*.egg/sphinx/locale/*/LC_MESSAGES/*.po
-%{python_sitelib}/Sphinx-%{version}-py*.egg/sphinx/pycode
-%{python_sitelib}/Sphinx-%{version}-py*.egg/sphinx/texinputs
-%{python_sitelib}/Sphinx-%{version}-py*.egg/sphinx/themes
-%{python_sitelib}/Sphinx-%{version}-py*.egg/sphinx/util
-%{python_sitelib}/Sphinx-%{version}-py*.egg/sphinx/writers
+%{python_sitelib}/*
%{_mandir}/man1/*
%files doc
@@ -169,5 +168,8 @@ make test
%changelog
+* Tue Nov 2 2010 Michel Salim <salimma@fedoraproject.org> - 1.0.4-2
+- Move locale files to system directories
+
* Mon Nov 1 2010 Michel Salim <salimma@fedoraproject.org> - 1.0.4-1
- Initial package, based on python-sphinx-1.0.4-2