dbus-python/dbus-python.spec
hongjinghao fb04925745 Standardize the path name
(cherry picked from commit 1dcdb0c6c245892de41512c60dbdaa74b01dec88)
2023-06-19 21:21:10 +08:00

148 lines
3.6 KiB
RPMSpec

%global _configure ../configure
%global python3dir %{_builddir}/python3-%{name}-%{version}-%{release}
Name: dbus-python
Version: 1.2.18
Release: 5
Summary: original Python binding for dbus
License: MIT and (AFL-2.1 or GPL-2.0-or-later)
URL: http://www.freedesktop.org/wiki/Software/DBusBindings/
Source0: http://dbus.freedesktop.org/releases/dbus-python/%{name}-%{version}.tar.gz
Source1: http://dbus.freedesktop.org/releases/dbus-python/%{name}-%{version}.tar.gz.asc
Patch0: Move-python-modules-to-architecture-specific-directo.patch
Patch1: Fix-deprecation-warnings-due-to-invalid-escape-seque.patch
BuildRequires: dbus-devel dbus-glib-devel glib2-devel
BuildRequires: dbus-x11 python3-gobject
BuildRequires: autoconf-archive automake libtool
%description
Dbus-python is the original Python binding for dbus, the reference
implementation of the D-Bus protocol.
%package -n python3-dbus
Summary: Python3 bindings for dbus
BuildRequires: python3-devel
Provides: dbus-python = %{version}-%{release}
Obsoletes: dbus-python < %{version}-%{release}
%{?python_provide:%python_provide python3-dbus}
%description -n python3-dbus
Python3 bindings for dbus
%package devel
Summary: Development files for %{name}
Requires: %{name} = %{version}-%{release}
%description devel
The %{name}-devel package contains libraries and header files for
developing applications that use %{name}.
%package_help
%prep
%autosetup -n %{name}-%{version} -p1
%build
autoreconf -vif
install -d %{python3dir}
cp -a . %{python3dir}
mv %{python3dir} python3-build
pushd python3-build
%py3_build
%configure PYTHON="%{__python3}"
%make_build
popd
%install
pushd python3-build
%py3_install
%make_install
popd
%delete_la
%check
make check -k -C python3-build || (cat python3-build/test-suite.log && true)
%pre
%preun
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files -n python3-dbus
%license COPYING
%{python3_sitearch}/_dbus_bindings.so
%{python3_sitearch}/_dbus_glib_bindings.so
%{python3_sitearch}/dbus/
%{python3_sitearch}/dbus_python-%{version}-py%{python3_version}.egg-info
%files devel
%{_includedir}/dbus-1.0/dbus/%{name}.h
%{_libdir}/pkgconfig/%{name}.pc
%files help
%doc NEWS ChangeLog README doc/API_CHANGES.txt doc/tutorial.txt
%changelog
* Mon Jun 19 2023 hongjinghao <hongjinghao@huawei.com> - 1.2.18-5
- Standardize the patch name
* Wed Jan 11 2023 hongjinghao <hongjinghao@huawei.com> - 1.2.18-4
- correct licenses and provide pythonXdist
* Tue Oct 25 2022 zhangruifang <zhangruifang1@h-partners.com> - 1.2.18-3
- Rebuild for next release
* Fri Aug 27 2021 panxiaohe <panxiaohe@huawei.com> - 1.2.18-2
- Fix deprecation warnings due to invalid escape sequences
* Fri Jul 30 2021 panxiaohe <panxiaohe@huawei.com> - 1.2.18-1
- update to 1.2.18
- remove unnecessary BuildRequires: gdb
* Thu Oct 29 2020 panxiaohe <panxiaohe@huawei.com> - 1.2.16-2
- Type:requirement
- ID:NA
- SUG:NA
- DESC:remove subpackage python2-dbus
* Fri Jul 31 2020 Liquor <lirui130@huawei.com> - 1.2.16-1
- Type:update
- ID:NA
- SUG:NA
- DESC:update to 1.2.16
* Sat Mar 21 2020 openEuler Buildteam <buildteam@openeuler.org> - 1.2.8-8
- Type:enhancement
- ID:NA
- SUG:NA
- DESC:add build requires of gdb
* Wed Oct 30 2019 jiangchuangang<jiangchuangang@huawei.com> - 1.2.8-7
- Type:enhancement
- ID:NA
- SUG:NA
- DESC:modify provides
* Sat Oct 12 2019 shenyangyang <shenyangyang4@huawei.com> - 1.2.8-6
- Type: enhancement
- ID: NA
- SUG: NA
- DESC:add python-provides
* Mon Sep 30 2019 luhuaxin <luhuaxin@huawei.com> - 1.2.8-5
- Type: enhancement
- ID: NA
- SUG: NA
- DESC: package rebuild
* Fri Aug 30 2019 luhuaxin <luhuaxin@huawei.com> - 1.2.8-4
- Package init