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