]> git.pld-linux.org Git - packages/sphinx-pdg.git/blame - sphinx-pdg.spec
- create symmetric -2 and -3 subpackages; base package contains just symlinks to...
[packages/sphinx-pdg.git] / sphinx-pdg.spec
CommitLineData
992edea4 1# there are sphinx.spec, sphinx2.spec... Sphinx.spec is too confusing
2# therefore the name for this package is sphinx-pdg (pdg - python
3# documentation generator)
b9b9d288
JK
4#
5# Conditional build:
19a39066
JB
6%bcond_without python2 # CPython 2.x version
7%bcond_without python3 # CPython 3.x version
b9b9d288
JK
8%bcond_without python3_default # Use Python 3.x for easy_install executable
9
79af714d
JB
10Summary: Sphinx - Python documentation generator
11Summary(pl.UTF-8): Sphinx - narzędzie do tworzenia dokumentacji dla Pythona
4acf166f 12Name: sphinx-pdg
a84e9210
JB
13Version: 1.3.2
14Release: 1
4acf166f 15License: BSD
16Group: Development/Languages/Python
a84e9210 17#Source0Download: https://pypi.python.org/pypi/Sphinx
4ecfdc9d 18Source0: https://pypi.python.org/packages/source/S/Sphinx/Sphinx-%{version}.tar.gz
a84e9210 19# Source0-md5: 740b8171b760fb1fa801bf2d1f2d3133
b844f666 20URL: http://sphinx.pocoo.org/
19a39066
JB
21%if %{with python2}
22BuildRequires: python-babel >= 1.3
5c7437a8 23BuildRequires: python-devel >= 1:2.5
5c7437a8 24BuildRequires: python-modules >= 1:2.5
15943969 25BuildRequires: python-setuptools >= 7.0
19a39066
JB
26%endif
27%if %{with python3}
7f1d6506 28BuildRequires: python3-2to3
19a39066 29BuildRequires: python3-babel >= 1.3
7f1d6506 30BuildRequires: python3-devel
f82fee34 31BuildRequires: python3-modules
15943969 32BuildRequires: python3-setuptools >= 7.0
19a39066 33%endif
d6f62011 34BuildRequires: rpm-pythonprov
15943969 35BuildRequires: rpmbuild(macros) >= 1.710
b9b9d288 36%if %{with python3_default}
19a39066 37Requires: sphinx-pdg-3 = %{version}-%{release}
b9b9d288 38%else
19a39066 39Requires: sphinx-pdg-2 = %{version}-%{release}
b9b9d288 40%endif
4acf166f 41BuildArch: noarch
42BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
43
44%description
d6f62011 45Sphinx is a tool that makes it easy to create intelligent and
46beautiful documentation for Python projects (or other documents
47consisting of multiple reStructuredText sources), written by Georg
48Brandl. It was originally created to translate the new Python
49documentation, but has now been cleaned up in the hope that it will be
50useful to many other projects.
4acf166f 51
79af714d
JB
52%description -l pl.UTF-8
53Sphinx to narzędzie ułatwiające tworzenie inteligentnej i ładnej
54dokumentacji dla projektów w Pythonie (lub innych dokumentów
55składających się z wielu źródeł w formacie reStructuredText), napisane
56przez Georga Brandla. Pierwotnie powstało do tłumaczenia nowej
57dokumentacji Pythona, ale potem zostało wyczyszczone w nadziei, że
58będzie przydatne dla wielu innych projektów.
59
a84e9210
JB
60%package 2
61Summary: Sphinx Python documentation generator (Python 2 version)
62Summary(pl.UTF-8): Sphinx - narzędzie do tworzenia dokumentacji dla Pythona (wersja dla Pythona 2)
e7b5373a 63Group: Development/Languages/Python
a84e9210 64Requires: python-Sphinx = %{version}-%{release}
19a39066 65Conflicts: sphinx-pdg < 1.3.2
e7b5373a 66
a84e9210 67%description 2
e7b5373a 68Sphinx is a tool that makes it easy to create intelligent and
69beautiful documentation for Python projects (or other documents
70consisting of multiple reStructuredText sources), written by Georg
71Brandl. It was originally created to translate the new Python
72documentation, but has now been cleaned up in the hope that it will be
73useful to many other projects.
74
a84e9210 75%description 2 -l pl.UTF-8
79af714d
JB
76Sphinx to narzędzie ułatwiające tworzenie inteligentnej i ładnej
77dokumentacji dla projektów w Pythonie (lub innych dokumentów
78składających się z wielu źródeł w formacie reStructuredText), napisane
79przez Georga Brandla. Pierwotnie powstało do tłumaczenia nowej
80dokumentacji Pythona, ale potem zostało wyczyszczone w nadziei, że
81będzie przydatne dla wielu innych projektów.
82
a84e9210
JB
83%package 3
84Summary: Sphinx Python documentation generator (Python 3 version)
85Summary(pl.UTF-8): Sphinx - narzędzie do tworzenia dokumentacji dla Pythona (wersja dla Pythona 3)
b9b9d288 86Group: Development/Languages/Python
a84e9210 87Requires: python3-Sphinx = %{version}-%{release}
19a39066 88Conflicts: sphinx-pdg < 1.3.2
b9b9d288 89
a84e9210 90%description 3
b9b9d288
JK
91Sphinx is a tool that makes it easy to create intelligent and
92beautiful documentation for Python projects (or other documents
93consisting of multiple reStructuredText sources), written by Georg
94Brandl. It was originally created to translate the new Python
95documentation, but has now been cleaned up in the hope that it will be
96useful to many other projects.
97
a84e9210 98%description 3 -l pl.UTF-8
b9b9d288
JK
99Sphinx to narzędzie ułatwiające tworzenie inteligentnej i ładnej
100dokumentacji dla projektów w Pythonie (lub innych dokumentów
101składających się z wielu źródeł w formacie reStructuredText), napisane
102przez Georga Brandla. Pierwotnie powstało do tłumaczenia nowej
103dokumentacji Pythona, ale potem zostało wyczyszczone w nadziei, że
104będzie przydatne dla wielu innych projektów.
105
8dffcc23
JB
106%package -n python-Sphinx
107Summary: Sphinx Python documentation generator (Python 2.x modules)
108Summary(pl.UTF-8): Sphinx - narzędzie do tworzenia dokumentacji dla Pythona (moduły Pythona 2.x)
109Group: Development/Languages/Python
b18e6f45 110Requires: python-modules
8dffcc23
JB
111Conflicts: sphinx-pdg < 1.0.7-2
112
113%description -n python-Sphinx
114Sphinx Python documentation generator (Python 2.x modules).
115
116For command-line utilities, see sphinx-pdg package.
117
118%description -n python-Sphinx -l pl.UTF-8
119Sphinx - narzędzie do tworzenia dokumentacji dla Pythona (moduły
120Pythona 2.x).
121
122Narzędzia działające z linii poleceń znajdują się w pakiecie
123sphinx-pdg.
124
125%package -n python3-Sphinx
126Summary: Sphinx Python documentation generator (Python 3.x modules)
127Summary(pl.UTF-8): Sphinx - narzędzie do tworzenia dokumentacji dla Pythona (moduły Pythona 3.x)
128Group: Development/Languages/Python
8dffcc23
JB
129Conflicts: sphinx-pdg-3 < 1.0.7-2
130
131%description -n python3-Sphinx
132Sphinx Python documentation generator (Python 3.x modules).
133
134For command-line utilities, see sphinx-pdg-3 package.
135
136%description -n python3-Sphinx -l pl.UTF-8
137Sphinx - narzędzie do tworzenia dokumentacji dla Pythona (moduły
138Pythona 3.x).
139
140Narzędzia działające z linii poleceń znajdują się w pakiecie
141sphinx-pdg-3.
142
4acf166f 143%prep
144%setup -q -n Sphinx-%{version}
145
146%build
19a39066 147%if %{with python2}
b9b9d288 148%py_build
3d438c82 149%{__rm} sphinx/__init__.pyc
19a39066
JB
150%endif
151
152%if %{with python3}
b9b9d288 153%py3_build
3d438c82 154%{__rm} -r sphinx/__pycache__
19a39066 155%endif
4acf166f 156
157%install
158rm -rf $RPM_BUILD_ROOT
4acf166f 159
19a39066 160%if %{with python2}
b9b9d288
JK
161%py_install
162%{__rm} sphinx/__init__.pyc
163%py_postclean
164
165for f in $RPM_BUILD_ROOT%{_bindir}/*; do
19a39066 166 %{__mv} "${f}" "${f}-2"
b9b9d288 167done
19a39066 168%endif
b9b9d288 169
19a39066 170%if %{with python3}
b9b9d288 171%py3_install
3d438c82 172%{__rm} -r sphinx/__pycache__
e7b5373a 173
174for f in $RPM_BUILD_ROOT%{_bindir}/*; do
b9b9d288 175 [ "${f%%-2}" == "$f" ] || continue
19a39066 176 %{__mv} "${f}" "${f}-3"
e7b5373a 177done
19a39066 178%endif
e7b5373a 179
b9b9d288
JK
180%if %{with python3_default}
181for f in $RPM_BUILD_ROOT%{_bindir}/*-3; do
19a39066 182 ln -sf "$(basename "$f")" "${f%%-3}"
b9b9d288
JK
183done
184%else
185for f in $RPM_BUILD_ROOT%{_bindir}/*-2; do
19a39066 186 ln -sf "$(basename "$f")" "${f%%-2}"
b9b9d288
JK
187done
188%endif
4acf166f 189
190%clean
191rm -rf $RPM_BUILD_ROOT
192
193%files
194%defattr(644,root,root,755)
1f35fc81 195%attr(755,root,root) %{_bindir}/sphinx-apidoc
19a39066 196%attr(755,root,root) %{_bindir}/sphinx-autogen
79af714d
JB
197%attr(755,root,root) %{_bindir}/sphinx-build
198%attr(755,root,root) %{_bindir}/sphinx-quickstart
b9b9d288 199
19a39066 200%if %{with python2}
b9b9d288
JK
201%files 2
202%defattr(644,root,root,755)
203%doc AUTHORS CHANGES EXAMPLES LICENSE PKG-INFO README.rst
b9b9d288 204%attr(755,root,root) %{_bindir}/sphinx-apidoc-2
b9b9d288 205%attr(755,root,root) %{_bindir}/sphinx-autogen-2
b9b9d288
JK
206%attr(755,root,root) %{_bindir}/sphinx-build-2
207%attr(755,root,root) %{_bindir}/sphinx-quickstart-2
19a39066 208%endif
e7b5373a 209
19a39066 210%if %{with python3}
79af714d 211%files 3
e7b5373a 212%defattr(644,root,root,755)
1c0e06e7 213%doc AUTHORS CHANGES EXAMPLES LICENSE PKG-INFO README.rst
1f35fc81 214%attr(755,root,root) %{_bindir}/sphinx-apidoc-3
19a39066 215%attr(755,root,root) %{_bindir}/sphinx-autogen-3
79af714d
JB
216%attr(755,root,root) %{_bindir}/sphinx-build-3
217%attr(755,root,root) %{_bindir}/sphinx-quickstart-3
b9b9d288 218%endif
8dffcc23 219
19a39066 220%if %{with python2}
8dffcc23
JB
221%files -n python-Sphinx
222%defattr(644,root,root,755)
223%{py_sitescriptdir}/sphinx
224%{py_sitescriptdir}/Sphinx-%{version}-py*.egg-info
19a39066 225%endif
8dffcc23 226
19a39066 227%if %{with python3}
8dffcc23
JB
228%files -n python3-Sphinx
229%defattr(644,root,root,755)
e7b5373a 230%{py3_sitescriptdir}/sphinx
79af714d 231%{py3_sitescriptdir}/Sphinx-%{version}-py*.egg-info
19a39066 232%endif
This page took 0.663753 seconds and 4 git commands to generate.