Files
saltbundlepy-dbus-python-sle12/saltbundlepy-dbus-python-sle12.spec

127 lines
4.1 KiB
RPMSpec
Raw Permalink Normal View History

2026-01-09 13:32:03 +00:00
#
# 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
2026-01-09 13:43:05 +00:00
%define realname saltbundlepy-dbus-python
2026-01-12 15:14:26 +00:00
%define realversion 1.2.18
2026-01-09 13:32:03 +00:00
2026-01-09 13:43:05 +00:00
Name: saltbundlepy-dbus-python-sle12
2026-01-12 15:14:26 +00:00
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.
2026-01-09 13:32:03 +00:00
Release: 0
Summary: Python bindings for D-Bus
License: MIT
Group: Development/Libraries/Python
URL: https://www.freedesktop.org/wiki/Software/DBusBindings/
2026-01-12 15:14:26 +00:00
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
2026-01-09 13:51:07 +00:00
Source99: saltbundlepy-dbus-python-sle12-rpmlintrc
2026-01-09 13:32:03 +00:00
Patch1: glib-2.40-to-2.38-requires.patch
2026-01-09 13:54:30 +00:00
# Only build for SLE12
%if ! (0%{?suse_version} && 0%{?suse_version} == 1315)
ExclusiveArch: do_not_build
%endif
2026-01-09 13:32:03 +00:00
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.
2026-01-09 13:43:05 +00:00
%package -n %{realname}-devel
2026-01-09 13:32:03 +00:00
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
2026-01-09 13:43:05 +00:00
%description -n %{realname}-devel
2026-01-09 13:32:03 +00:00
D-Bus python bindings for use with python programs.
This package contains the development files for
Python bindings for D-Bus.
2026-01-09 13:43:05 +00:00
%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.
2026-01-09 13:32:03 +00:00
%prep
2026-01-12 15:14:26 +00:00
%autosetup -p1 -n dbus-python-%{realversion}
2026-01-09 13:32:03 +00:00
# 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}
2026-01-09 13:43:05 +00:00
%files -n %{realname}
2026-01-09 13:32:03 +00:00
%license COPYING
%doc AUTHORS ChangeLog NEWS README
%{saltbundlepy_sitelib}/dbus/
%{saltbundlepy_sitearch}/_dbus_bindings.so
%{saltbundlepy_sitearch}/_dbus_glib_bindings.so
2026-01-09 13:43:05 +00:00
%files -n %{realname}-devel
2026-01-09 13:32:03 +00:00
%license COPYING
%doc AUTHORS
%{_includedir}/dbus-1.0/dbus/dbus-python.h
%{_libdir}/pkgconfig/dbus-python.pc
%changelog