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