]>
Commit | Line | Data |
---|---|---|
9a7ae3ce JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without python2 # CPython 2.x module | |
4 | %bcond_without python3 # CPython 3.x module | |
5 | ||
d35b8ac5 | 6 | %define module pycups |
9a7ae3ce JB |
7 | Summary: Set of Python 2 bindings for the CUPS API |
8 | Summary(pl.UTF-8): Zbiór wiązań Pythona 2 do API CUPS-a | |
d35b8ac5 | 9 | Name: python-%{module} |
18282743 | 10 | Version: 1.9.73 |
00932b14 | 11 | Release: 9 |
44ca03bb | 12 | License: GPL v2+ |
d35b8ac5 AF |
13 | Group: Development/Languages/Python |
14 | Source0: http://cyberelk.net/tim/data/pycups/pycups-%{version}.tar.bz2 | |
18282743 | 15 | # Source0-md5: ee0e7204d7a2ae942e2f4c4508afdbfb |
25f6a54d | 16 | URL: http://cyberelk.net/tim/software/pycups/ |
2ba271ec | 17 | BuildRequires: rpmbuild(macros) >= 1.710 |
7d3e3981 | 18 | BuildRequires: cups-devel >= 1.2.1 |
44ca03bb | 19 | BuildRequires: epydoc |
9a7ae3ce | 20 | %if %{with python2} |
f4abb5fa | 21 | BuildRequires: python-devel >= 1:2.5 |
9a7ae3ce JB |
22 | %endif |
23 | %if %{with python3} | |
24 | BuildRequires: python3-devel >= 1:3.2 | |
25 | %endif | |
541b7fbe | 26 | BuildRequires: rpm-pythonprov |
9a7ae3ce | 27 | Requires: python-modules |
44ca03bb | 28 | Obsoletes: python-cups |
d35b8ac5 AF |
29 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
30 | ||
31 | %description | |
9a7ae3ce | 32 | This package provides Python 2 bindings for the CUPS API, known as |
44ca03bb ER |
33 | pycups. It was written for use with system-config-printer, but can be |
34 | put to other uses as well. | |
d35b8ac5 | 35 | |
052e6a33 | 36 | %description -l pl.UTF-8 |
9a7ae3ce JB |
37 | Ten pakiet udostępnia wiązania Pythona 2 do API CUPS-a, znane jako |
38 | pycups. Został napisany z myślą o pakiecie system-config-printer, ale | |
39 | może mieć także inne zastosowania. | |
40 | ||
41 | %package -n python3-pycups | |
42 | Summary: Set of Python 3 bindings for the CUPS API | |
43 | Summary(pl.UTF-8): Zbiór wiązań Pythona 3 do API CUPS-a | |
44 | Group: Development/Languages/Python | |
45 | Requires: python3-modules | |
46 | ||
47 | %description -n python3-pycups | |
48 | This package provides Python 3 bindings for the CUPS API, known as | |
49 | pycups. It was written for use with system-config-printer, but can be | |
50 | put to other uses as well. | |
51 | ||
52 | %description -n python3-pycups -l pl.UTF-8 | |
53 | Ten pakiet udostępnia wiązania Pythona 3 do API CUPS-a, znane jako | |
4a5d6911 JB |
54 | pycups. Został napisany z myślą o pakiecie system-config-printer, ale |
55 | może mieć także inne zastosowania. | |
541b7fbe | 56 | |
44ca03bb | 57 | %package doc |
4a5d6911 JB |
58 | Summary: Documentation for pycups |
59 | Summary(pl.UTF-8): Dokumentacja do pycupsa | |
44ca03bb ER |
60 | Group: Documentation |
61 | ||
62 | %description doc | |
4a5d6911 JB |
63 | Documentation for pycups. |
64 | ||
65 | %description doc -l pl.UTF-8 | |
66 | Dokumentacja do pycupsa. | |
44ca03bb | 67 | |
d35b8ac5 AF |
68 | %prep |
69 | %setup -q -n %{module}-%{version} | |
70 | ||
71 | %build | |
9a7ae3ce JB |
72 | %if %{with python2} |
73 | CC="%{__cc}" \ | |
74 | CFLAGS="%{rpmcflags} -fno-strict-aliasing" \ | |
f3e9c3e5 | 75 | %py_build \ |
9a7ae3ce JB |
76 | --build-base build-2 |
77 | %endif | |
78 | ||
79 | %if %{with python3} | |
80 | CC="%{__cc}" \ | |
81 | CFLAGS="%{rpmcflags} -fno-strict-aliasing" \ | |
f3e9c3e5 | 82 | %py3_build \ |
9a7ae3ce JB |
83 | --build-base build-3 |
84 | %endif | |
d35b8ac5 | 85 | |
44ca03bb | 86 | %{__make} doc |
9a7ae3ce | 87 | |
d35b8ac5 AF |
88 | %install |
89 | rm -rf $RPM_BUILD_ROOT | |
9a7ae3ce JB |
90 | |
91 | %if %{with python2} | |
f3e9c3e5 | 92 | %py_install |
9a7ae3ce JB |
93 | |
94 | %endif | |
95 | ||
96 | %if %{with python3} | |
f3e9c3e5 | 97 | %py3_install |
9a7ae3ce | 98 | %endif |
d35b8ac5 | 99 | |
d35b8ac5 AF |
100 | %clean |
101 | rm -rf $RPM_BUILD_ROOT | |
102 | ||
9a7ae3ce | 103 | %if %{with python2} |
d35b8ac5 AF |
104 | %files |
105 | %defattr(644,root,root,755) | |
fce083f8 | 106 | %doc NEWS README TODO |
44ca03bb | 107 | %attr(755,root,root) %{py_sitedir}/cups.so |
4a5d6911 | 108 | %{py_sitedir}/pycups-%{version}-py*.egg-info |
9a7ae3ce JB |
109 | %endif |
110 | ||
111 | %if %{with python3} | |
112 | %files -n python3-pycups | |
113 | %defattr(644,root,root,755) | |
fce083f8 | 114 | %doc NEWS README TODO |
9a7ae3ce JB |
115 | %attr(755,root,root) %{py3_sitedir}/cups.cpython-*.so |
116 | %{py3_sitedir}/pycups-%{version}-py*.egg-info | |
117 | %endif | |
4a5d6911 JB |
118 | |
119 | %files doc | |
120 | %defattr(644,root,root,755) | |
121 | %doc html/* |