]>
Commit | Line | Data |
---|---|---|
c2d3f0f5 JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without python2 # Python 2.x module | |
4 | %bcond_without python3 # Python 3.x module | |
5 | # | |
54c320b3 | 6 | %define module pyatspi |
685f0dca MB |
7 | Summary: AT-SPI Python bindings |
8 | Summary(pl.UTF-8): Wiązania AT-SPI dla Pythona | |
9 | Name: python-%{module} | |
1a0ce248 JB |
10 | Version: 2.38.1 |
11 | Release: 1 | |
685f0dca MB |
12 | License: LGPL v2 |
13 | Group: Development/Languages/Python | |
1a0ce248 JB |
14 | Source0: https://download.gnome.org/sources/pyatspi/2.38/%{module}-%{version}.tar.xz |
15 | # Source0-md5: bac820e859310c64fe37c227be657656 | |
151ef173 | 16 | URL: https://wiki.linuxfoundation.org/accessibility/d-bus |
685f0dca | 17 | BuildRequires: pkgconfig |
c2d3f0f5 | 18 | BuildRequires: python-pygobject3-common-devel >= 3.0.0 |
685f0dca | 19 | BuildRequires: rpm-pythonprov |
128fdc70 MB |
20 | BuildRequires: tar >= 1:1.22 |
21 | BuildRequires: xz | |
c2d3f0f5 JB |
22 | %if %{with python2} |
23 | BuildRequires: python-devel >= 1:2.6 | |
c2d3f0f5 JB |
24 | %endif |
25 | %if %{with python3} | |
423c85cf | 26 | BuildRequires: python3-devel >= 1:3.2 |
c2d3f0f5 | 27 | %endif |
cb632f17 | 28 | Requires: at-spi2-core >= 2.12.0 |
ad61a71f | 29 | Requires: gobject-introspection |
685f0dca | 30 | Requires: python-modules |
128fdc70 | 31 | Requires: python-pygobject3 >= 3.0.0 |
54c320b3 | 32 | BuildArch: noarch |
685f0dca MB |
33 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
34 | ||
35 | %description | |
36 | This package provides AT-SPI Python bindings. | |
37 | ||
38 | %description -l pl.UTF-8 | |
39 | Ten pakiet dostarcza wiązania AT-SPI dla Pythona. | |
40 | ||
ad61a71f MB |
41 | %package -n python3-%{module} |
42 | Summary: AT-SPI Python 3 bindings | |
43 | Summary(pl.UTF-8): Wiązania AT-SPI dla Pythona 3 | |
44 | Group: Development/Languages/Python | |
cb632f17 | 45 | Requires: at-spi2-core >= 2.12.0 |
ad61a71f MB |
46 | Requires: gobject-introspection |
47 | Requires: python3-modules | |
48 | Requires: python3-pygobject3 >= 3.0.0 | |
49 | ||
50 | %description -n python3-%{module} | |
51 | This package provides AT-SPI Python 3 bindings. | |
52 | ||
53 | %description -n python3-%{module} -l pl.UTF-8 | |
54 | Ten pakiet dostarcza wiązania AT-SPI dla Pythona 3. | |
55 | ||
685f0dca MB |
56 | %prep |
57 | %setup -q -n %{module}-%{version} | |
58 | ||
59 | %build | |
54c320b3 JR |
60 | %{__libtoolize} |
61 | %{__aclocal} | |
62 | %{__autoconf} | |
63 | %{__autoheader} | |
64 | %{__automake} | |
c2d3f0f5 | 65 | %if %{with python3} |
54c320b3 | 66 | mkdir -p py3 |
ad61a71f MB |
67 | cd py3 |
68 | ../%configure \ | |
88d1ec45 JR |
69 | --host=%{_host_alias} \ |
70 | --build=%{_build_alias} \ | |
54c320b3 | 71 | --with-python="%{__python3}" |
685f0dca | 72 | %{__make} |
ad61a71f | 73 | cd .. |
c2d3f0f5 | 74 | %endif |
ad61a71f | 75 | |
c2d3f0f5 | 76 | %if %{with python2} |
54c320b3 | 77 | mkdir -p py2 |
ad61a71f MB |
78 | cd py2 |
79 | ../%configure \ | |
88d1ec45 JR |
80 | --host=%{_host_alias} \ |
81 | --build=%{_build_alias} \ | |
ad61a71f MB |
82 | --with-python="%{__python}" |
83 | %{__make} | |
84 | cd .. | |
c2d3f0f5 | 85 | %endif |
685f0dca MB |
86 | |
87 | %install | |
88 | rm -rf $RPM_BUILD_ROOT | |
89 | ||
c2d3f0f5 | 90 | %if %{with python3} |
ad61a71f MB |
91 | %{__make} -C py3 install \ |
92 | DESTDIR=$RPM_BUILD_ROOT | |
c2d3f0f5 | 93 | %endif |
ad61a71f | 94 | |
c2d3f0f5 | 95 | %if %{with python2} |
ad61a71f | 96 | %{__make} -C py2 install \ |
685f0dca | 97 | DESTDIR=$RPM_BUILD_ROOT |
c2d3f0f5 | 98 | %endif |
685f0dca MB |
99 | |
100 | %clean | |
101 | rm -rf $RPM_BUILD_ROOT | |
102 | ||
c2d3f0f5 | 103 | %if %{with python2} |
685f0dca MB |
104 | %files |
105 | %defattr(644,root,root,755) | |
106 | %doc AUTHORS NEWS README | |
107 | %{py_sitescriptdir}/pyatspi | |
c2d3f0f5 | 108 | %endif |
ad61a71f | 109 | |
c2d3f0f5 | 110 | %if %{with python3} |
ad61a71f MB |
111 | %files -n python3-%{module} |
112 | %defattr(644,root,root,755) | |
c2d3f0f5 | 113 | %doc AUTHORS NEWS README |
54c320b3 | 114 | %{py3_sitescriptdir}/pyatspi |
c2d3f0f5 | 115 | %endif |