diff --git a/.cvsignore b/.cvsignore index 679ea62..71e68d7 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -docutils-0.3.9.tar.gz +docutils-0.4.tar.gz diff --git a/python-docutils.spec b/python-docutils.spec index 6270492..f9469c6 100644 --- a/python-docutils.spec +++ b/python-docutils.spec @@ -1,25 +1,23 @@ -%define pyver %(%{__python} -c "import sys; print sys.version[:3]") %{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} -%{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")} %define srcname docutils Name: python-%{srcname} -Version: 0.3.9 +Version: 0.4 Release: 1%{?dist} Summary: A system for processing plaintext documentation Group: Development/Languages -License: Public domain, BSD, PSF, GPL - see COPYING.txt +License: Public Domain, BSD, Python License, GPL - see COPYING.txt URL: http://docutils.sourceforge.net Source0: http://dl.sourceforge.net/docutils/%{srcname}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch BuildRequires: python-devel +Requires(missingok): python-imaging Provides: docutils = %{version}-%{release} Obsoletes: docutils < %{version}-%{release} -Requires: python-abi = %{pyver} %description The Docutils project specifies a plaintext markup language, reStructuredText, @@ -35,15 +33,18 @@ Python inline documentation modules and packages. %prep %setup -q -n %{srcname}-%{version} +# Remove a shebang from one of the library files +sed -i -e '/#! *\/usr\/bin\/.*python.*/{1D}' docutils/readers/python/pynodes.py + %build CFLAGS="$RPM_OPT_FLAGS" %{__python} setup.py build %install -rm -rf $RPM_BUILD_ROOT -%{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT +rm -rf %{buildroot} +%{__python} setup.py install -O1 --skip-build --root %{buildroot} -for file in $RPM_BUILD_ROOT/%{_bindir}/*.py; do +for file in %{buildroot}/%{_bindir}/*.py; do mv $file `dirname $file`/`basename $file .py` done @@ -55,7 +56,7 @@ rm -f licenses/docutils.conf # it manually here. file=roman.py extradest=%{python_sitelib} -fullextradest=$RPM_BUILD_ROOT/$extradest +fullextradest=%{buildroot}/$extradest install -m 0644 extras/$file $fullextradest %{__python} -c "import py_compile; py_compile.compile(\ '$fullextradest/$file', \ @@ -65,42 +66,34 @@ install -m 0644 extras/$file $fullextradest '$fullextradest/$file', \ '$fullextradest/$file' + 'o', \ '$extradest/$file')" + +echo '%defattr (0644,root,root,0755)' > pyfiles +find %{buildroot}%{python_sitelib}/docutils -type d | \ + sed 's:%{buildroot}\(.*\):%dir \1:' >> pyfiles +find %{buildroot}%{python_sitelib}/docutils -not -type d -not -name '*.pyo' | \ + sed 's:%{buildroot}\(.*\):\1:' >> pyfiles +find %{buildroot}%{python_sitelib}/docutils -not -type d -name '*.pyo' | \ + sed 's:%{buildroot}\(.*\):%ghost \1:' >> pyfiles %clean -rm -rf $RPM_BUILD_ROOT +rm -rf %{buildroot} -%files +%files -f pyfiles %defattr(-,root,root,-) -%doc COPYING.txt FAQ.txt HISTORY.txt README.txt THANKS.txt licenses docs tools +%doc BUGS.txt COPYING.txt FAQ.txt HISTORY.txt README.txt RELEASE-NOTES.txt +%doc THANKS.txt licenses docs tools/editors %{_bindir}/* -%dir %{python_sitelib}/docutils -%dir %{python_sitelib}/docutils/languages -%dir %{python_sitelib}/docutils/parsers -%dir %{python_sitelib}/docutils/parsers/rst -%dir %{python_sitelib}/docutils/parsers/rst/directives -%dir %{python_sitelib}/docutils/parsers/rst/languages -%dir %{python_sitelib}/docutils/readers -%dir %{python_sitelib}/docutils/readers/python -%dir %{python_sitelib}/docutils/transforms -%dir %{python_sitelib}/docutils/writers %{python_sitelib}/roman.py %{python_sitelib}/roman.pyc -%{python_sitelib}/docutils/*.py -%{python_sitelib}/docutils/*.pyc -%{python_sitelib}/docutils/*/*.py -%{python_sitelib}/docutils/*/*.pyc -%{python_sitelib}/docutils/*/*/*.py -%{python_sitelib}/docutils/*/*/*.pyc -%{python_sitelib}/docutils/*/*/*/*.py -%{python_sitelib}/docutils/*/*/*/*.pyc - %ghost %{python_sitelib}/roman.pyo -%ghost %{python_sitelib}/docutils/*.pyo -%ghost %{python_sitelib}/docutils/*/*.pyo -%ghost %{python_sitelib}/docutils/*/*/*.pyo -%ghost %{python_sitelib}/docutils/*/*/*/*.pyo %changelog +* Sun Jan 15 2006 Toshio Kuratomi 0.4-1 +- Update to 0.4. +- Scripted the listing of files in the python module. +- Add a missingok requirement on python-imaging as docutils can make use of + it when converting to formats that have images. + * Tue Jun 7 2005 Toshio Kuratomi 0.3.9-1 - Update to version 0.3.9. - Use a dist tag as there aren't any differences between supported fc diff --git a/sources b/sources index 96aad01..5a0659f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -3b6727e4f53e88ae7cea7c296694fc6c docutils-0.3.9.tar.gz +0fe7b42bb3c2aa3680fe30f9a5fbf712 docutils-0.4.tar.gz