- Bump for FC6 rebuild.

- Remove python byte compilation as this is handled automatically in FC4+.
- No longer %ghost .pyo files.
This commit is contained in:
Toshio くらとみ 2006-08-30 06:16:15 +00:00
parent 174e4d2dca
commit b1583bab26

View File

@ -4,15 +4,15 @@
Name: python-%{srcname} Name: python-%{srcname}
Version: 0.4 Version: 0.4
Release: 2%{?dist} Release: 3%{?dist}
Summary: A system for processing plaintext documentation Summary: A system for processing plaintext documentation
Group: Development/Languages Group: Development/Languages
License: Public Domain, BSD, Python License, GPL - see COPYING.txt License: Public Domain, BSD, Python License, GPL - see COPYING.txt
URL: http://docutils.sourceforge.net URL: http://docutils.sourceforge.net
Source0: http://dl.sourceforge.net/docutils/%{srcname}-%{version}.tar.gz Source0: http://dl.sourceforge.net/docutils/%{srcname}-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch BuildArch: noarch
BuildRequires: python-devel BuildRequires: python-devel
Requires(missingok): python-imaging Requires(missingok): python-imaging
@ -42,10 +42,11 @@ CFLAGS="$RPM_OPT_FLAGS" %{__python} setup.py build
%install %install
rm -rf %{buildroot} rm -rf %{buildroot}
%{__python} setup.py install -O1 --skip-build --root %{buildroot}
%{__python} setup.py install --skip-build --root %{buildroot}
for file in %{buildroot}/%{_bindir}/*.py; do for file in %{buildroot}/%{_bindir}/*.py; do
mv $file `dirname $file`/`basename $file .py` mv $file `dirname $file`/`basename $file .py`
done done
# We want the licenses but don't need this build file # We want the licenses but don't need this build file
@ -57,37 +58,25 @@ rm -f licenses/docutils.conf
file=roman.py file=roman.py
extradest=%{python_sitelib} extradest=%{python_sitelib}
fullextradest=%{buildroot}/$extradest fullextradest=%{buildroot}/$extradest
install -m 0644 extras/$file $fullextradest install -D -m 0644 extras/$file $fullextradest/$file
%{__python} -c "import py_compile; py_compile.compile(\
'$fullextradest/$file', \
'$fullextradest/$file' + 'c', \
'$extradest/$file')"
%{__python} -O -c "import py_compile; py_compile.compile(\
'$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 %clean
rm -rf %{buildroot} rm -rf %{buildroot}
%files -f pyfiles %files
%defattr(-,root,root,-) %defattr(-,root,root,-)
%doc BUGS.txt COPYING.txt FAQ.txt HISTORY.txt README.txt RELEASE-NOTES.txt %doc BUGS.txt COPYING.txt FAQ.txt HISTORY.txt README.txt RELEASE-NOTES.txt
%doc THANKS.txt licenses docs tools/editors %doc THANKS.txt licenses docs tools/editors
%{_bindir}/* %{_bindir}/*
%{python_sitelib}/roman.py %{python_sitelib}/docutils/
%{python_sitelib}/roman.pyc %{python_sitelib}/roman.*
%ghost %{python_sitelib}/roman.pyo
%changelog %changelog
* Tue Aug 29 2006 Toshio Kuratomi <toshio-tiki-lounge.com> 0.4-3
- Bump for FC6 rebuild.
- Remove python byte compilation as this is handled automatically in FC4+.
- No longer %%ghost .pyo files.
* Thu Feb 16 2006 Toshio Kuratomi <toshio-tiki-lounge.com> 0.4-2 * Thu Feb 16 2006 Toshio Kuratomi <toshio-tiki-lounge.com> 0.4-2
- Bump and rebuild for FC5. - Bump and rebuild for FC5.