]>
Commit | Line | Data |
---|---|---|
df8d59d4 JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_with python3 # use Python 3.x instead of 2.x | |
4 | %bcond_with tests # unit tests (not present in 0.13 sources) | |
5 | ||
dbc77c82 | 6 | Summary: A simple command line tool to generate CSS sprites |
df8d59d4 | 7 | Summary(pl.UTF-8): Proste narzędzie linii poleceń do generowania "duszków" CSS |
dbc77c82 | 8 | Name: glue |
df8d59d4 | 9 | Version: 0.13 |
ca4028ad | 10 | Release: 3 |
dbc77c82 ER |
11 | License: BSD |
12 | Group: Applications/Graphics | |
df8d59d4 JB |
13 | Source0: http://files.pythonhosted.org/packages/source/g/glue/%{name}-%{version}.tar.gz |
14 | # Source0-md5: 65ac9f9b4667b7ef5f7665273b68bc56 | |
15 | Patch0: %{name}-deps.patch | |
dbc77c82 | 16 | URL: http://github.com/jorgebastida/glue |
df8d59d4 JB |
17 | %if %{with python3} |
18 | BuildRequires: python3-devel >= 1:3.3 | |
19 | BuildRequires: python3-setuptools | |
20 | %if %{with tests} | |
21 | BuildRequires: python3-cssutils >= 0.9.10 | |
22 | BuildRequires: python3-jinja2 >= 2.7 | |
23 | BuildRequires: python3-pillow >= 2.2.2 | |
24 | %endif | |
25 | %else | |
26 | BuildRequires: python-devel >= 1:2.7 | |
dbc77c82 | 27 | BuildRequires: python-setuptools |
df8d59d4 JB |
28 | %if %{with tests} |
29 | BuildRequires: python-cssutils >= 0.9.10 | |
30 | BuildRequires: python-jinja2 >= 2.7 | |
31 | BuildRequires: python-mock >= 1.0 | |
32 | BuildRequires: python-pillow >= 2.2.2 | |
33 | %endif | |
34 | %endif | |
35 | BuildRequires: rpmbuild(macros) >= 1.714 | |
36 | %if %{with python3} | |
37 | Requires: python3-jinja2 >= 2.7 | |
38 | Requires: python3-modules >= 1:3.3 | |
39 | Requires: python3-pillow >= 2.2.2 | |
40 | %else | |
41 | Requires: python-jinja2 >= 2.7 | |
42 | Requires: python-modules >= 2.7 | |
43 | Requires: python-pillow >= 2.2.2 | |
44 | %endif | |
dbc77c82 ER |
45 | BuildArch: noarch |
46 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
47 | ||
48 | %description | |
49 | Glue is a simple command line tool to generate CSS sprites using any | |
50 | kind of source images like PNG, JPEG or GIF. Glue will generate a | |
51 | unique PNG file containing every source image and a CSS file including | |
52 | the necessary CSS classes to use the sprite. | |
53 | ||
df8d59d4 JB |
54 | %description -l pl.UTF-8 |
55 | Glue to proste narzędzie linii poleceń do generowania "duszków" | |
56 | (sprite'ów) CSS przy użyciu dowolnego rodzaju obrazów źródłowych (PNG, | |
57 | JPEG, GIF). Glue generuje unikatowy plik PNG zawierający wszystkie | |
58 | obrazy źródłowe oraz plik CSS zawierający klasy CSS potrzebne do | |
59 | używania duszka. | |
60 | ||
dbc77c82 ER |
61 | %prep |
62 | %setup -q | |
df8d59d4 JB |
63 | %patch0 -p1 |
64 | ||
65 | %{__rm} -r glue.egg-info | |
dbc77c82 ER |
66 | |
67 | %build | |
df8d59d4 JB |
68 | %if %{with python3} |
69 | %py3_build %{?with_tests:test} | |
70 | %else | |
71 | %py_build %{?with_tests:test} | |
72 | %endif | |
dbc77c82 ER |
73 | |
74 | %install | |
75 | rm -rf $RPM_BUILD_ROOT | |
df8d59d4 JB |
76 | |
77 | %if %{with python3} | |
78 | %py3_install | |
79 | %else | |
80 | %py_install | |
dbc77c82 ER |
81 | |
82 | %py_postclean | |
df8d59d4 | 83 | %endif |
dbc77c82 ER |
84 | |
85 | %clean | |
86 | rm -rf $RPM_BUILD_ROOT | |
87 | ||
88 | %files | |
89 | %defattr(644,root,root,755) | |
df8d59d4 | 90 | %doc AUTHORS COPYING README.rst docs |
dbc77c82 | 91 | %attr(755,root,root) %{_bindir}/glue |
df8d59d4 JB |
92 | %if %{with python3} |
93 | %{py3_sitescriptdir}/glue | |
94 | %{py3_sitescriptdir}/glue-%{version}-py*.egg-info | |
95 | %else | |
96 | %{py_sitescriptdir}/glue | |
dbc77c82 | 97 | %{py_sitescriptdir}/glue-%{version}-py*.egg-info |
df8d59d4 | 98 | %endif |