# # spec file for package saltbundlepy-dbus-python # # Copyright (c) 2024 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via https://bugs.opensuse.org/ # AutoReqProv: no %{?!saltbundlepy_module:%define saltbundlepy_module() saltbundlepy-%{**}} %define pythons saltbundlepy %define realname saltbundlepy-dbus-python %define realversion 1.2.18 Name: saltbundlepy-dbus-python-sle12 Version: 1.2.18.1 # NOTE ABOUT VERSION HACK # The real version of this package is "1.2.18". We had to fake the version # number by adding and extra ".1" to it. # The reason is that, after having to rename the package due to Git workflow restrictions, # the release number counter is reset for this new package, and therefore the # new binaries are using an lower release number than previous builds before the package renaming. # To avoid the Salt Bundle to take older binaries we just faked the version here to a higher one. # NOTE: Once we upgrade this package to a higher version than 1.2.18, we can just drop this # hack. Release: 0 Summary: Python bindings for D-Bus License: MIT Group: Development/Libraries/Python URL: https://www.freedesktop.org/wiki/Software/DBusBindings/ Source: https://dbus.freedesktop.org/releases/dbus-python/dbus-python-%{realversion}.tar.gz Source2: https://dbus.freedesktop.org/releases/dbus-python/dbus-python-%{realversion}.tar.gz.asc Source99: saltbundlepy-dbus-python-sle12-rpmlintrc Patch1: glib-2.40-to-2.38-requires.patch # Only build for SLE12 %if ! (0%{?suse_version} && 0%{?suse_version} == 1315) ExclusiveArch: do_not_build %endif BuildRequires: saltbundlepy >= 3.11 BuildRequires: %{saltbundlepy_module devel >= 3.11} BuildRequires: fdupes BuildRequires: pkgconfig BuildRequires: saltbundlepy-rpm-macros %if 0%{?suse_version} >= 1315 BuildRequires: pkgconfig(dbus-1) >= 1.8.0 BuildRequires: pkgconfig(dbus-glib-1) %else ExclusiveArch: do-not-build %endif #Requires: saltbundlepy-gobject Requires: dbus-1 %description D-Bus python bindings for use with python programs. %package -n %{realname}-devel Summary: Python bindings for D-Bus -- development files Group: Development/Libraries/Python Requires: %{name} = %{version} Requires: saltbundlepy-devel Requires: dbus-1 Requires: dbus-1-devel %description -n %{realname}-devel D-Bus python bindings for use with python programs. This package contains the development files for Python bindings for D-Bus. %package -n %{realname} Summary: Python bindings for D-Bus License: MIT Group: Development/Libraries/Python %python_subpackages %description -n %{realname} D-Bus python bindings for use with python programs. %prep %autosetup -p1 -n dbus-python-%{realversion} # Remove Makefile* (fix rpmlint warning "makefile-junk") rm -f examples/Makefile* # Remove shebang from examples sed -i '1 {\|^#!%{_bindir}/env| d}' examples/*.py %build export CFLAGS="%{optflags} -fstack-protector -fno-strict-aliasing -fPIC" %configure PYTHON=%{_bindir}/python3.11 %make_build %check %if 0%{suse_version} >= 1500 make check %endif %install %make_install %python_expand rm -f %{buildroot}%{$python_sitearch}/*.la %fdupes %{buildroot} %files -n %{realname} %license COPYING %doc AUTHORS ChangeLog NEWS README %{saltbundlepy_sitelib}/dbus/ %{saltbundlepy_sitearch}/_dbus_bindings.so %{saltbundlepy_sitearch}/_dbus_glib_bindings.so %files -n %{realname}-devel %license COPYING %doc AUTHORS %{_includedir}/dbus-1.0/dbus/dbus-python.h %{_libdir}/pkgconfig/dbus-python.pc %changelog