]> git.pld-linux.org Git - packages/python-rcssmin.git/blob - python-rcssmin.spec
090fc9cdaf8500b943a0046e43258bca1e53f5d1
[packages/python-rcssmin.git] / python-rcssmin.spec
1 #
2 # Conditional build:
3 %bcond_without  python2 # CPython 2.x module
4 %bcond_without  python3 # CPython 3.x module
5
6 %define         module          rcssmin
7 %define         pypi_name       rcssmin
8 Summary:        RCSSmin is a CSS minifier
9 Name:           python-%{pypi_name}
10 Version:        1.0.6
11 Release:        8
12 License:        Apache v2.0
13 Group:          Libraries/Python
14 Source0:        https://pypi.python.org/packages/source/r/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
15 # Source0-md5:  467d56503ce386c0b0e52f69ac143a9a
16 URL:            http://opensource.perlig.de/rcssmin/
17 BuildRequires:  rpm-pythonprov
18 BuildRequires:  rpmbuild(macros) >= 1.714
19 %if %{with python2}
20 BuildRequires:  python-modules
21 BuildRequires:  python-setuptools
22 %endif
23 %if %{with python3}
24 BuildRequires:  python3-modules
25 BuildRequires:  python3-setuptools
26 %endif
27 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
28
29 %description
30 The minifier is based on the semantics of the YUI compressor, which
31 itself is based on the rule list by Isaac Schlueter.
32
33 This module is a re-implementation aiming for speed instead of maximum
34 compression, so it can be used at runtime (rather than during a
35 preprocessing step).
36
37 %package -n python3-%{pypi_name}
38 Summary:        RCSSmin is a CSS minifier
39 Group:          Libraries/Python
40
41 %description -n python3-%{pypi_name}
42 RCSSmin is a CSS minifier.
43
44 The minifier is based on the semantics of the YUI compressor, which
45 itself is based on the rule list by Isaac Schlueter.
46
47 This module is a re-implementation aiming for speed instead of maximum
48 compression, so it can be used at runtime (rather than during a
49 preprocessing step).
50
51 %package apidocs
52 Summary:        %{module} API documentation
53 Summary(pl.UTF-8):      Dokumentacja API %{module}
54 Group:          Documentation
55 BuildArch:      noarch
56
57 %description apidocs
58 API documentation for %{module}.
59
60 %description apidocs -l pl.UTF-8
61 Dokumentacja API %{module}.
62
63 %prep
64 %setup -q -n %{pypi_name}-%{version}
65
66 # strip bang path from rcssmin.py
67 sed -i '1d' rcssmin.py
68
69 %build
70 %if %{with python2}
71 %py_build
72 %endif
73
74 %if %{with python3}
75 %py3_build
76 %endif
77
78 %install
79 rm -rf $RPM_BUILD_ROOT
80 %if %{with python2}
81 %py_install
82 %py_postclean
83 %endif
84
85 %if %{with python3}
86 %py3_install
87 %endif
88
89 # remove upstream developer documentation
90 rm -r $RPM_BUILD_ROOT%{_docdir}/%{module}
91
92 %clean
93 rm -rf $RPM_BUILD_ROOT
94
95 %if %{with python2}
96 %files
97 %defattr(644,root,root,755)
98 %doc README.rst LICENSE bench/LICENSE.cssmin
99 %attr(755,root,root) %{py_sitedir}/_%{module}.so
100 %{py_sitedir}/%{module}.py[oc]
101 %{py_sitedir}/%{pypi_name}-%{version}-py*.egg-info
102 %endif
103
104 %if %{with python3}
105 %files -n python3-%{pypi_name}
106 %defattr(644,root,root,755)
107 %doc README.rst LICENSE bench/LICENSE.cssmin
108 %{py3_sitedir}/%{module}.py
109 %attr(755,root,root) %{py3_sitedir}/_%{module}.*.so
110 %{py3_sitedir}/__pycache__/%{module}.*
111 %{py3_sitedir}/%{pypi_name}-%{version}-py*.egg-info
112 %endif
113
114 %files apidocs
115 %defattr(644,root,root,755)
116 %doc docs/apidoc/*
This page took 0.059998 seconds and 2 git commands to generate.