Accepting request 745121 from Base:System
OBS-URL: https://build.opensuse.org/request/show/745121 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/i2c-tools?expand=0&rev=36
This commit is contained in:
commit
bab50cb7ed
@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Oct 31 09:23:26 UTC 2019 - Guillaume GARDET <guillaume.gardet@opensuse.org>
|
||||||
|
|
||||||
|
- Enable python binding python3-smbus for openSUSE Leap 15+
|
||||||
|
and SLE15+
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Tue Dec 4 11:08:28 UTC 2018 - Jan Engelhardt <jengelh@inai.de>
|
Tue Dec 4 11:08:28 UTC 2018 - Jan Engelhardt <jengelh@inai.de>
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package i2c-tools
|
# spec file for package i2c-tools
|
||||||
#
|
#
|
||||||
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
|
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@ -16,6 +16,13 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
|
# Python build is broken on SLE12 / Leap 42.x
|
||||||
|
%if 0%{?sle_version} >= 150000 || 0%{?suse_version} >= 1500
|
||||||
|
%bcond_without i2ctools_python_binding
|
||||||
|
%else
|
||||||
|
%bcond_with i2ctools_python_binding
|
||||||
|
%endif
|
||||||
|
|
||||||
Name: i2c-tools
|
Name: i2c-tools
|
||||||
Version: 4.1
|
Version: 4.1
|
||||||
Release: 0
|
Release: 0
|
||||||
@ -28,6 +35,8 @@ Url: https://i2c.wiki.kernel.org/index.php/I2C_Tools
|
|||||||
Source0: https://www.kernel.org/pub/software/utils/i2c-tools/%{name}-%{version}.tar.xz
|
Source0: https://www.kernel.org/pub/software/utils/i2c-tools/%{name}-%{version}.tar.xz
|
||||||
Source1: https://www.kernel.org/pub/software/utils/i2c-tools/%{name}-%{version}.tar.sign
|
Source1: https://www.kernel.org/pub/software/utils/i2c-tools/%{name}-%{version}.tar.sign
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
|
BuildRequires: python3-devel
|
||||||
|
BuildRequires: python3-setuptools
|
||||||
ExcludeArch: s390 s390x
|
ExcludeArch: s390 s390x
|
||||||
|
|
||||||
%description
|
%description
|
||||||
@ -56,16 +65,40 @@ Provides: /usr/include/i2c/smbus.h
|
|||||||
libi2c offers a way for applications to interact with the devices
|
libi2c offers a way for applications to interact with the devices
|
||||||
connected to the I2C or SMBus buses of the system.
|
connected to the I2C or SMBus buses of the system.
|
||||||
|
|
||||||
|
%if %{with i2ctools_python_binding}
|
||||||
|
%package -n python3-smbus
|
||||||
|
Summary: Python binding for Device Tree
|
||||||
|
License: GPL-2.0-or-later
|
||||||
|
Group: Development/Tools/Other
|
||||||
|
|
||||||
|
%description -n python3-smbus
|
||||||
|
libi2c offers a way for applications to interact with the devices
|
||||||
|
connected to the I2C or SMBus buses of the system.
|
||||||
|
|
||||||
|
Python binding part.
|
||||||
|
%endif
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
|
|
||||||
%build
|
%build
|
||||||
make %{?_smp_mflags} CFLAGS="%{optflags}" CC="%{__cc}" BUILD_STATIC_LIB:=0
|
make %{?_smp_mflags} CFLAGS="%{optflags}" CC="%{__cc}" BUILD_STATIC_LIB:=0
|
||||||
|
%if %{with i2ctools_python_binding}
|
||||||
|
cd py-smbus
|
||||||
|
python3 setup.py build_ext
|
||||||
|
%py3_build
|
||||||
|
cd ..
|
||||||
|
%endif
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%make_install PREFIX=/usr libdir=%{_libdir} BUILD_STATIC_LIB:=0
|
%make_install PREFIX=/usr libdir=%{_libdir} BUILD_STATIC_LIB:=0
|
||||||
# cleanup
|
# cleanup
|
||||||
rm -f "%{buildroot}/usr/bin/decode-edid"
|
rm -f "%{buildroot}/usr/bin/decode-edid"
|
||||||
|
%if %{with i2ctools_python_binding}
|
||||||
|
cd py-smbus
|
||||||
|
%python3_install
|
||||||
|
cd ..
|
||||||
|
%endif
|
||||||
|
|
||||||
%post -n libi2c0 -p /sbin/ldconfig
|
%post -n libi2c0 -p /sbin/ldconfig
|
||||||
|
|
||||||
@ -86,4 +119,10 @@ rm -f "%{buildroot}/usr/bin/decode-edid"
|
|||||||
%dir %{_includedir}/i2c
|
%dir %{_includedir}/i2c
|
||||||
%{_includedir}/i2c/smbus.h
|
%{_includedir}/i2c/smbus.h
|
||||||
|
|
||||||
|
%if %{with i2ctools_python_binding}
|
||||||
|
%files -n python3-smbus
|
||||||
|
%{python3_sitearch}/*.so
|
||||||
|
%{python3_sitearch}/*.egg-info
|
||||||
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
Loading…
x
Reference in New Issue
Block a user