python-cssutils-vl.spec 3.9 KB

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