From 099d85ec6fa28fabee97486f7fd4526014870d95 Mon Sep 17 00:00:00 2001 From: Peter Robinson Date: Aug 13 2018 12:49:31 +0000 Subject: Add requires on libi2c NVR, Minor spec cleanups, use %%license --- diff --git a/i2c-tools.spec b/i2c-tools.spec index 594adfe..1e633c5 100644 --- a/i2c-tools.spec +++ b/i2c-tools.spec @@ -12,10 +12,11 @@ Name: i2c-tools Version: 4.0 -Release: 10%{?dist} +Release: 11%{?dist} Summary: A heterogeneous set of I2C tools for Linux License: GPLv2+ URL: https://i2c.wiki.kernel.org/index.php/I2C_Tools + Source0: https://www.kernel.org/pub/software/utils/i2c-tools/%{name}-%{version}.tar.xz # Upstream patch Patch0: 0001-i2c-tools-i2cbusses-Avoid-buffer-overflows-in-sysfs-.patch @@ -27,7 +28,8 @@ Patch2: 0003-py-smbus-Fix-FSF-address-in-smbusmodule.c.patch Patch3: 0001-libi2c-Mention-the-correct-license-in-source-files.patch # for /etc/udev/makedev.d resp /etc/modprobe.d ownership -Requires: udev module-init-tools +Requires: systemd-udev kmod +Requires: libi2c%{?_isa} = %{version}-%{release} BuildRequires: perl-generators %if %{with python2} BuildRequires: python2-devel @@ -44,10 +46,11 @@ decoding scripts, and more. %package eepromer Summary: Programs for reading / writing i2c / smbus eeproms -# For the device nodes -Requires: %{name} = %{version}-%{release} # /usr/sbin/eeprom is Public Domain, the rest is GPLv2+ License: GPLv2+ and Public Domain +Requires: libi2c%{?_isa} = %{version}-%{release} +# For the device nodes +Requires: %{name} = %{version}-%{release} %description eepromer Programs for reading / writing i2c / smbus eeproms. Notice that writing the @@ -57,28 +60,30 @@ what you are doing. %if %{with python2} %package -n python2-i2c-tools +Summary: Python 2 bindings for Linux SMBus access through i2c-dev +License: GPLv2 %{?python_provide:%python_provide python2-i2c-tools} +Requires: libi2c%{?_isa} = %{version}-%{release} # Remove before F30 Provides: %{name}-python = %{version}-%{release} Provides: %{name}-python%{?_isa} = %{version}-%{release} Obsoletes: %{name}-python < 4.0-4 -Summary: Python 2 bindings for Linux SMBus access through i2c-dev -License: GPLv2 %description -n python2-i2c-tools Python 2 bindings for Linux SMBus access through i2c-dev %endif %package -n python3-i2c-tools +Summary: Python 3 bindings for Linux SMBus access through i2c-dev +License: GPLv2 %{?python_provide:%python_provide python3-i2c-tools} +Requires: libi2c%{?_isa} = %{version}-%{release} %if %{without python2} # Remove before F30 Obsoletes: %{name}-python < 4.0-4 # Remove before F31 Obsoletes: python2-i2c-tools < 4.0-5 %endif -Summary: Python 3 bindings for Linux SMBus access through i2c-dev -License: GPLv2 %description -n python3-i2c-tools Python 3 bindings for Linux SMBus access through i2c-dev @@ -86,6 +91,7 @@ Python 3 bindings for Linux SMBus access through i2c-dev %package perl Summary: i2c tools written in Perl License: GPLv2+ +Requires: libi2c%{?_isa} = %{version}-%{release} %description perl A collection of tools written in perl for use with i2c devices. @@ -143,11 +149,13 @@ pushd py-smbus %endif %{__python3} setup.py build -b build-py3 install --skip-build --root=$RPM_BUILD_ROOT popd + # cleanup rm -f $RPM_BUILD_ROOT%{_bindir}/decode-edid.pl # Remove unpleasant DDC tools. KMS already exposes the EDID block in sysfs, # and edid-decode is a more complete tool than decode-edid. rm -f $RPM_BUILD_ROOT%{_bindir}/{ddcmon,decode-edid} + # for i2c-dev ondemand loading through kmod mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/modprobe.d echo "alias char-major-89-* i2c-dev" > \ @@ -175,14 +183,13 @@ exit 0 %files -%doc CHANGES COPYING README +%license COPYING +%doc CHANGES README %config(noreplace) %{_sysconfdir}/modprobe.d/i2c-dev.conf %config(noreplace) %{_sysconfdir}/udev/makedev.d/99-i2c-dev.nodes -%{_sbindir}/* -%exclude %{_sbindir}/eepro* +%{_sbindir}/i2c* %exclude %{_sbindir}/i2c-stub* -%{_mandir}/man8/*.8.gz -%exclude %{_mandir}/man8/eepro* +%{_mandir}/man8/i2c*.8.gz %exclude %{_mandir}/man8/i2c-stub-from-dump.8.gz %{_prefix}/lib/modules-load.d/%{name}.conf @@ -210,8 +217,8 @@ exit 0 %{_mandir}/man8/i2c-stub-from-dump.8.gz %files -n libi2c -%doc COPYING.LGPL -%{_libdir}/libi2c.so.* +%license COPYING.LGPL +%{_libdir}/libi2c.so.0* %files -n libi2c-devel %dir %{_includedir}/i2c @@ -220,6 +227,10 @@ exit 0 %changelog +* Mon Aug 13 2018 Peter Robinson 4.0-11 +- Add requires on libi2c NVR +- Minor spec cleanups, use %%license + * Fri Aug 03 2018 Ondřej Lysoněk - 4.0-10 - Add upstream patch fixing libi2c license headers