]> git.pld-linux.org Git - packages/python-dbus.git/blob - python-dbus.spec
416eb6f52a4df2201b2cf2b7ea2a068ea282f212
[packages/python-dbus.git] / python-dbus.spec
1 #
2 # Conditional build:
3 %bcond_without  python2         # Python 2.x module
4 %bcond_without  python3         # Python 3.x module
5 #
6 %define         rname           dbus-python
7 #
8 Summary:        Python library for using D-BUS
9 Summary(pl.UTF-8):      Biblioteka do używania D-BUS oparta o Pythona
10 Name:           python-dbus
11 Version:        1.2.0
12 Release:        8
13 License:        MIT
14 Group:          Libraries/Python
15 Source0:        http://dbus.freedesktop.org/releases/dbus-python/%{rname}-%{version}.tar.gz
16 # Source0-md5:  b09cd2d1a057cc432ce944de3fc06bf7
17 Patch0:         epydoc.patch
18 URL:            http://www.freedesktop.org/Software/DBusBindings
19 BuildRequires:  autoconf >= 2.59c
20 BuildRequires:  automake >= 1:1.9
21 BuildRequires:  cpp
22 BuildRequires:  dbus-devel >= 1.6
23 BuildRequires:  dbus-glib-devel >= 0.73
24 BuildRequires:  epydoc
25 BuildRequires:  libtool
26 BuildRequires:  pkgconfig
27 %{?with_python2:BuildRequires:  python-devel >= 1:2.6}
28 %{?with_python3:BuildRequires:  python3-devel >= 3.2}
29 BuildRequires:  rpm-pythonprov
30 BuildRequires:  rpmbuild(macros) >= 1.268
31 %pyrequires_eq  python-modules
32 Requires:       dbus-glib >= 0.73
33 Requires:       dbus-libs >= 1.6
34 Requires:       python-libxml2 >= 1:2.6.26
35 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
36
37 %description
38 D-BUS add-on library to integrate the standard D-BUS library with
39 Python.
40
41 %description -l pl.UTF-8
42 Dodatkowa biblioteka D-BUS do integracji standardowej biblioteki D-BUS
43 z Pythonem.
44
45 %package devel
46 Summary:        C API for _dbus_bindings module
47 Summary(pl.UTF-8):      API C dla modułu _dbus_bindings
48 License:        AFL v2.1 or LGPL v2.1
49 Group:          Development/Libraries
50 Requires:       dbus-devel >= 1.6
51 #R: python-dbus = %{version}-%{release}  or  python3-dbus = %{version}-%{release}
52 #R: python-devel >= 1:2.5  or  python3-devel
53
54 %description devel
55 C API for _dbus_bindings module.
56
57 %description devel -l pl.UTF-8
58 API C dla modułu _dbus_bindings.
59
60 %package -n python3-dbus
61 Summary:        Python 3 library for using D-BUS
62 Summary(pl.UTF-8):      Biblioteka do używania D-BUS oparta o Pythona 3
63 Group:          Libraries/Python
64 Requires:       dbus-glib >= 0.73
65 Requires:       dbus-libs >= 1.6
66
67 %description -n python3-dbus
68 D-BUS add-on library to integrate the standard D-BUS library with
69 Python 3.
70
71 %description -n python3-dbus -l pl.UTF-8
72 Dodatkowa biblioteka D-BUS do integracji standardowej biblioteki D-BUS
73 z Pythonem 3.
74
75 %prep
76 %setup -qn %{rname}-%{version}
77 %patch0 -p1
78
79 %build
80 %{__aclocal}
81 %{__autoconf}
82 %{__automake}
83
84 %if %{with python3}
85 mkdir py3
86 cd py3
87 ../%configure \
88         PYTHON=%{__python3} \
89         PYTHON_LIBS=-lpython3
90 %{__make}
91 cd ..
92 %endif
93
94 %if %{with python2}
95 mkdir py2
96 cd py2
97 ../%configure \
98         PYTHON=%{__python} \
99         PYTHON_LIBS=-lpython
100 %{__make}
101 cd ..
102 %endif
103
104 %install
105 rm -rf $RPM_BUILD_ROOT
106
107 # use sitedir instead of sitescriptdir to match PyQt4 dbus/mainloop dir
108 %if %{with python2}
109 %{__make} -C py2 install \
110         pythondir=%{py_sitedir} \
111         DESTDIR=$RPM_BUILD_ROOT
112
113 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
114 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
115 %py_postclean
116
117 %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/_dbus*.la
118 %endif
119
120 %if %{with python3}
121 %{__make} -C py3 install \
122         pythondir=%{py3_sitedir} \
123         DESTDIR=$RPM_BUILD_ROOT
124
125 %py3_comp $RPM_BUILD_ROOT%{py3_sitedir}
126 %py3_ocomp $RPM_BUILD_ROOT%{py3_sitedir}
127
128 %{__rm} $RPM_BUILD_ROOT%{py3_sitedir}/_dbus*.la
129 %endif
130
131 # packaged as %doc
132 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/dbus-python
133
134 %clean
135 rm -rf $RPM_BUILD_ROOT
136
137 %if %{with python2}
138 %files
139 %defattr(644,root,root,755)
140 %doc AUTHORS COPYING ChangeLog NEWS README doc/*.txt
141 %dir %{py_sitedir}/dbus
142 %{py_sitedir}/dbus/*.py[co]
143 %dir %{py_sitedir}/dbus/mainloop
144 %{py_sitedir}/dbus/mainloop/*.py[co]
145 %attr(755,root,root) %{py_sitedir}/_dbus_bindings.so
146 %attr(755,root,root) %{py_sitedir}/_dbus_glib_bindings.so
147 %endif
148
149 %files devel
150 %defattr(644,root,root,755)
151 %{_includedir}/dbus-1.0/dbus/dbus-python.h
152 %{_pkgconfigdir}/dbus-python.pc
153
154 %if %{with python3}
155 %files -n python3-dbus
156 %defattr(644,root,root,755)
157 %doc AUTHORS COPYING ChangeLog NEWS README doc/*.txt
158 %dir %{py3_sitedir}/dbus
159 %{py3_sitedir}/dbus/__pycache__
160 %{py3_sitedir}/dbus/*.py
161 %dir %{py3_sitedir}/dbus/mainloop
162 %{py3_sitedir}/dbus/mainloop/__pycache__
163 %{py3_sitedir}/dbus/mainloop/*.py
164 %attr(755,root,root) %{py3_sitedir}/_dbus_bindings.so
165 %attr(755,root,root) %{py3_sitedir}/_dbus_glib_bindings.so
166 %endif
This page took 0.039826 seconds and 3 git commands to generate.