python-cssutils-vl.spec 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")
  2. %define pkg_release 2%{?_dist_release}
  3. Summary: CSS Cascading Style Sheets library for Python
  4. Summary(ja): Python 用 CSS カスケーディング・スタイル・シート ライブラリ
  5. Name: python-cssutils
  6. Version: 0.9.5.1
  7. Release: %{pkg_release}
  8. License: LGPLv3+
  9. Group: Development/Libraries
  10. URL: http://cthedot.de/cssutils/
  11. Source: http://cssutils.googlecode.com/files/cssutils-%{version}.zip
  12. Patch0: cssutils-0.9.5.1-nohashbang.patch
  13. BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
  14. # Required at runtime for the css* executables
  15. Requires: python-setuptools
  16. BuildRequires: python-devel
  17. BuildRequires: python-setuptools
  18. BuildArch: noarch
  19. %description
  20. A Python package to parse and build CSS Cascading Style Sheets. DOM only, not
  21. any rendering facilities.
  22. %description -l ja
  23. CSS カスケーディング・スタイル・シートの作成と構文解析用の Pythonパッケージ
  24. です。ただし DOM にのみ対応しており、レンダリングには対応していません。
  25. %package doc
  26. Summary: Documentation for the CSS Cascading Style Sheets library for Python
  27. Summary(ja): Python 用 CSS カスケーディング・スタイル・シート ライブラリのドキュメント
  28. Group: Applications/Documentation
  29. %description doc
  30. This is the documentation for python-cssutils, a Python package to parse and
  31. build CSS Cascading Style Sheets.
  32. %description doc -l ja
  33. CSS カスケーディング・スタイル・シートの作成と構文解析用の Pythonパッケージ
  34. である、python-cssutils のドキュメントです。
  35. %prep
  36. %setup -q -n cssutils-%{version}
  37. %patch0 -p1
  38. # Convert all CRLF files, keeping original timestamps
  39. for FILE in `find . -type f -exec grep -Gl '\r\n' {} \;`; do
  40. tr -d '\r' < ${FILE} > ${FILE}.tmp
  41. touch -r ${FILE} ${FILE}.timestamp
  42. cat ${FILE}.tmp > ${FILE}
  43. touch -r ${FILE}.timestamp ${FILE}
  44. rm -f ${FILE}.timestamp ${FILE}.tmp
  45. done
  46. %build
  47. %{__python} setup.py build
  48. %install
  49. %{__rm} -rf ${RPM_BUILD_ROOT}
  50. %{__python} setup.py install \
  51. --single-version-externally-managed \
  52. -O1 \
  53. --skip-build \
  54. --root ${RPM_BUILD_ROOT}
  55. %clean
  56. %{__rm} -rf ${RPM_BUILD_ROOT}
  57. %files
  58. # The sources have some 2755 mode directories (as of 0.9.5.1), fix here
  59. %defattr(-,root,root,0755)
  60. %doc CHANGELOG.txt COPYING* docs/ README.txt
  61. %{_bindir}/csscapture
  62. %{_bindir}/csscombine
  63. %{_bindir}/cssparse
  64. %{python_sitelib}/cssutils-*.egg-info/
  65. %{python_sitelib}/cssutils/
  66. %{python_sitelib}/encutils/
  67. # This is a way too generic name!
  68. %exclude %{python_sitelib}/tests/
  69. %files doc
  70. %defattr(-,root,root,-)
  71. %doc doc/*
  72. %changelog
  73. * Tue Feb 02 2010 Shu KONNO <owa@bg.wakwak.com> 0.9.5.1-2
  74. - rebuild with python-2.6
  75. * Sun Dec 14 2008 Kazutaka HARADA <kazutaka@dc4.so-net.ne.jp> 0.9.5.1-1
  76. - initial build for Vine Linux based on fedora package
  77. * Sat Nov 29 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 0.9.5.1-4
  78. - Rebuild for Python 2.6
  79. * Fri Oct 10 2008 Matthias Saou <http://freshrpms.net/> 0.9.5.1-3
  80. - Add missing python-setuptools BR, split off doc sub-package (mschwendt).
  81. * Thu Oct 9 2008 Matthias Saou <http://freshrpms.net/> 0.9.5.1-2
  82. - Update license, group, add python-setuptools requirement (mschwendt).
  83. * Tue Aug 19 2008 Matthias Saou <http://freshrpms.net/> 0.9.5.1-1
  84. - Update to 0.9.5.1.
  85. * Fri Aug 8 2008 Matthias Saou <http://freshrpms.net/> 0.9.5-1
  86. - Update to 0.9.5 final.
  87. * Tue Jul 15 2008 Matthias Saou <http://freshrpms.net/> 0.9.5b2-0.2.rc2
  88. - Convert CRLF end of lines.
  89. - Patch out #!/... magic from python files meant to be included and not run.
  90. * Tue Jul 15 2008 Matthias Saou <http://freshrpms.net/> 0.9.5b2-0.1.rc2
  91. - Initial RPM release.