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