Blame SPECS/i2c-tools.spec

7ae0b5
# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany.
7ae0b5
# Copyright (c) 2007 Hans de Goede <j.w.r.degoede@hhs>, the Fedora project.
7ae0b5
#
7ae0b5
# This file and all modifications and additions to the pristine
7ae0b5
# package are under the same license as the package itself.
7ae0b5
7ae0b5
Name:           i2c-tools
7ae0b5
Version:        4.3
7ae0b5
Release:        2%{?dist}
7ae0b5
Summary:        A heterogeneous set of I2C tools for Linux
7ae0b5
License:        GPLv2+
7ae0b5
URL:            https://i2c.wiki.kernel.org/index.php/I2C_Tools
7ae0b5
7ae0b5
Source0:        https://www.kernel.org/pub/software/utils/i2c-tools/%{name}-%{version}.tar.xz
7ae0b5
7ae0b5
# for /etc/udev/makedev.d resp /usr/lib/modprobe.d ownership
7ae0b5
Requires:       systemd-udev kmod
7ae0b5
Requires:       libi2c%{?_isa} = %{version}-%{release}
7ae0b5
BuildRequires:  gcc
7ae0b5
BuildRequires:  make
7ae0b5
BuildRequires:  perl-generators
7ae0b5
BuildRequires:  python3-devel
7ae0b5
ExcludeArch:    s390 s390x
7ae0b5
Obsoletes:      i2c-tools-eepromer < 4.2-2
7ae0b5
7ae0b5
%description
7ae0b5
This package contains a heterogeneous set of I2C tools for Linux: a bus
7ae0b5
probing tool, a chip dumper, register-level access helpers, EEPROM
7ae0b5
decoding scripts, and more.
7ae0b5
7ae0b5
7ae0b5
%package -n python3-i2c-tools
7ae0b5
Summary:        Python 3 bindings for Linux SMBus access through i2c-dev
7ae0b5
License:        GPLv2
7ae0b5
%{?python_provide:%python_provide python3-i2c-tools}
7ae0b5
Requires:       libi2c%{?_isa} = %{version}-%{release}
7ae0b5
%if %{without python2}
7ae0b5
# Remove before F30
7ae0b5
Obsoletes: %{name}-python < 4.0-4
7ae0b5
# Remove before F31
7ae0b5
Obsoletes: python2-i2c-tools < 4.0-5
7ae0b5
%endif
7ae0b5
7ae0b5
%description -n python3-i2c-tools
7ae0b5
Python 3 bindings for Linux SMBus access through i2c-dev
7ae0b5
7ae0b5
%package perl
7ae0b5
Summary:        i2c tools written in Perl
7ae0b5
License:        GPLv2+
7ae0b5
Requires:       libi2c%{?_isa} = %{version}-%{release}
7ae0b5
7ae0b5
%description perl
7ae0b5
A collection of tools written in perl for use with i2c devices.
7ae0b5
7ae0b5
%package -n libi2c
7ae0b5
Summary:        I2C/SMBus bus access library
7ae0b5
License:        LGPLv2+
7ae0b5
7ae0b5
%description -n libi2c
7ae0b5
libi2c offers a way for applications to interact with the devices
7ae0b5
connected to the I2C or SMBus buses of the system.
7ae0b5
7ae0b5
%package -n libi2c-devel
7ae0b5
Summary:        Development files for the I2C library
7ae0b5
License:        LGPLv2+
7ae0b5
Requires:       libi2c%{?_isa} = %{version}-%{release}
7ae0b5
# Remove in F30
7ae0b5
Obsoletes:      i2c-tools-devel < 4.0-1
7ae0b5
7ae0b5
%description -n libi2c-devel
7ae0b5
%{summary}.
7ae0b5
7ae0b5
%prep
7ae0b5
%autosetup -p1
7ae0b5
7ae0b5
%build
7ae0b5
make CFLAGS="$RPM_OPT_FLAGS" LDFLAGS="$RPM_LD_FLAGS" BUILD_STATIC_LIB=0 EXTRA=eeprog
7ae0b5
pushd py-smbus
7ae0b5
CFLAGS="$RPM_OPT_FLAGS -I../include" LDFLAGS="$RPM_LD_FLAGS" \
7ae0b5
  %{__python3} setup.py build -b build-py3
7ae0b5
popd
7ae0b5
7ae0b5
7ae0b5
%install
7ae0b5
make install DESTDIR=$RPM_BUILD_ROOT PREFIX=%{_prefix} BUILD_STATIC_LIB=0 \
7ae0b5
  EXTRA=eeprog libdir=%{_libdir}
7ae0b5
pushd py-smbus
7ae0b5
%{__python3} setup.py build -b build-py3 install --skip-build --root=$RPM_BUILD_ROOT
7ae0b5
popd
7ae0b5
7ae0b5
# cleanup
7ae0b5
rm -f $RPM_BUILD_ROOT%{_bindir}/decode-edid.pl
7ae0b5
# Remove unpleasant DDC tools.  KMS already exposes the EDID block in sysfs,
7ae0b5
# and edid-decode is a more complete tool than decode-edid.
7ae0b5
rm -f $RPM_BUILD_ROOT%{_bindir}/{ddcmon,decode-edid}
7ae0b5
7ae0b5
# for i2c-dev ondemand loading through kmod
7ae0b5
mkdir -p $RPM_BUILD_ROOT%{_prefix}/lib/modprobe.d 
7ae0b5
echo "alias char-major-89-* i2c-dev" > \
7ae0b5
  $RPM_BUILD_ROOT%{_prefix}/lib/modprobe.d/i2c-dev.conf
7ae0b5
# for /dev/i2c-# creation (which are needed for kmod i2c-dev autoloading)
7ae0b5
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/udev/makedev.d
7ae0b5
for (( i = 0 ; i < 8 ; i++ )) do
7ae0b5
  echo "i2c-$i" >> $RPM_BUILD_ROOT%{_sysconfdir}/udev/makedev.d/99-i2c-dev.nodes
7ae0b5
done
7ae0b5
7ae0b5
# auto-load i2c-dev after reboot
7ae0b5
mkdir -p $RPM_BUILD_ROOT%{_prefix}/lib/modules-load.d
7ae0b5
echo 'i2c-dev' > $RPM_BUILD_ROOT%{_prefix}/lib/modules-load.d/%{name}.conf
7ae0b5
7ae0b5
7ae0b5
%post
7ae0b5
# load i2c-dev after the first install
7ae0b5
if [ "$1" = 1 ] ; then
7ae0b5
  /usr/sbin/modprobe i2c-dev
7ae0b5
fi
7ae0b5
exit 0
7ae0b5
7ae0b5
%ldconfig_post -n libi2c
7ae0b5
%ldconfig_postun -n libi2c
7ae0b5
7ae0b5
7ae0b5
%files
7ae0b5
%license COPYING
7ae0b5
%doc CHANGES README
7ae0b5
%config(noreplace) %{_prefix}/lib/modprobe.d/i2c-dev.conf
7ae0b5
%config(noreplace) %{_sysconfdir}/udev/makedev.d/99-i2c-dev.nodes
7ae0b5
%{_sbindir}/i2c*
7ae0b5
%{_sbindir}/eeprog
7ae0b5
%exclude %{_sbindir}/i2c-stub*
7ae0b5
%{_mandir}/man8/i2c*.8.*
7ae0b5
%{_mandir}/man8/eeprog.8.*
7ae0b5
%exclude %{_mandir}/man8/i2c-stub-from-dump.8.*
7ae0b5
%{_prefix}/lib/modules-load.d/%{name}.conf
7ae0b5
7ae0b5
%files -n python3-i2c-tools
7ae0b5
%doc py-smbus/README
7ae0b5
%{python3_sitearch}/*
7ae0b5
7ae0b5
%files perl
7ae0b5
%doc eeprom/README
7ae0b5
%{_bindir}/decode-*
7ae0b5
%{_sbindir}/i2c-stub*
7ae0b5
%{_mandir}/man1/decode-*.1.*
7ae0b5
%{_mandir}/man8/i2c-stub-from-dump.8.*
7ae0b5
7ae0b5
%files -n libi2c
7ae0b5
%license COPYING.LGPL
7ae0b5
%{_libdir}/libi2c.so.0*
7ae0b5
7ae0b5
%files -n libi2c-devel
7ae0b5
%dir %{_includedir}/i2c
7ae0b5
%{_includedir}/i2c/smbus.h
7ae0b5
%{_libdir}/libi2c.so
7ae0b5
%{_mandir}/man3/libi2c.3.*
7ae0b5
7ae0b5
%changelog
7ae0b5
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 4.3-2
7ae0b5
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
7ae0b5
  Related: rhbz#1991688
7ae0b5
7ae0b5
* Tue Aug 03 2021 Artem Egorenkov <aegorenk@redhat.com> - 4.3-1
7ae0b5
- Version 4.3
7ae0b5
- Resolves: rhbz#1989260
7ae0b5
7ae0b5
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 4.2-4
7ae0b5
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
7ae0b5
7ae0b5
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 4.2-3
7ae0b5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
7ae0b5
7ae0b5
* Sat Jan 16 2021 Peter Robinson <pbrobinson@fedoraproject.org> - 4.2-2
7ae0b5
- Move eeprog to i2c-tools (shouldn't have been in eepromer sub package)
7ae0b5
- Drop/obsolete eepromer subpackage, deprecated for 6 years
7ae0b5
- Drop python2 conditionals
7ae0b5
- Minor cleanups
7ae0b5
7ae0b5
* Thu Jan 07 2021 Artem Egorenkov <aegorenk@redhat.com> - 4.2-1
7ae0b5
- Version 4.2
7ae0b5
7ae0b5
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 4.1-6
7ae0b5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
7ae0b5
7ae0b5
* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 4.1-5
7ae0b5
- Rebuilt for Python 3.9
7ae0b5
7ae0b5
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 4.1-4
7ae0b5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
7ae0b5
7ae0b5
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 4.1-3
7ae0b5
- Rebuilt for Python 3.8
7ae0b5
7ae0b5
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 4.1-2
7ae0b5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
7ae0b5
7ae0b5
* Mon Feb  4 2019 Peter Robinson <pbrobinson@fedoraproject.org> 4.1-1
7ae0b5
- Version 4.1
7ae0b5
7ae0b5
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 4.0-13
7ae0b5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
7ae0b5
7ae0b5
* Thu Nov 15 2018 Ondřej Lysoněk <olysonek@redhat.com> - 4.0-12
7ae0b5
- Ship modprobe.d files in /usr/lib/modprobe.d (rhbz#1195285)
7ae0b5
7ae0b5
* Mon Aug 13 2018 Peter Robinson <pbrobinson@fedoraproject.org> 4.0-11
7ae0b5
- Add requires on libi2c NVR
7ae0b5
- Minor spec cleanups, use %%license
7ae0b5
7ae0b5
* Fri Aug 03 2018 Ondřej Lysoněk <olysonek@redhat.com> - 4.0-10
7ae0b5
- Add upstream patch fixing libi2c license headers
7ae0b5
7ae0b5
* Tue Jul 31 2018 Ondřej Lysoněk <olysonek@redhat.com> - 4.0-9
7ae0b5
- Corrected the License tags
7ae0b5
7ae0b5
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 4.0-8
7ae0b5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
7ae0b5
7ae0b5
* Fri Jun 29 2018 Adam Jackson <ajax@redhat.com> - 4.0-7
7ae0b5
- Use ldconfig scriptlets
7ae0b5
7ae0b5
* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 4.0-6
7ae0b5
- Rebuilt for Python 3.7
7ae0b5
7ae0b5
* Thu Mar 22 2018 Ondřej Lysoněk <olysonek@redhat.com> - 4.0-5
7ae0b5
- Don't build Python 2 subpackage on EL > 7 and Fedora > 28
7ae0b5
7ae0b5
* Mon Feb 19 2018 Ondřej Lysoněk <olysonek@redhat.com> - 4.0-4
7ae0b5
- Add gcc to BuildRequires
7ae0b5
7ae0b5
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 4.0-3
7ae0b5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
7ae0b5
7ae0b5
* Thu Feb  1 2018 Florian Weimer <fweimer@redhat.com> - 4.0-2
7ae0b5
- Build with linker flags from redhat-rpm-config
7ae0b5
7ae0b5
* Tue Nov 21 2017 Ondřej Lysoněk <olysonek@redhat.com> - 4.0-1
7ae0b5
- New version
7ae0b5
- Dropped i2c-tools-devel, introduced libi2c, libi2c-devel
7ae0b5
7ae0b5
* Sat Oct 7 2017 Troy Curtis, Jr <troycurtisjr@gmail.com> - 3.1.2-7
7ae0b5
- Add Python3 subpackage.
7ae0b5
7ae0b5
* Sun Aug 20 2017 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 3.1.2-6
7ae0b5
- Add Provides for the old name without %%_isa
7ae0b5
7ae0b5
* Sat Aug 19 2017 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 3.1.2-5
7ae0b5
- Python 2 binary package renamed to python2-i2c-tools
7ae0b5
  See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3
7ae0b5
7ae0b5
* Wed Aug 02 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.1.2-4
7ae0b5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
7ae0b5
7ae0b5
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.1.2-3
7ae0b5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
7ae0b5
7ae0b5
* Thu Jul 20 2017 Ondřej Lysoněk <olysonek@redhat.com> - 3.1.2-2
7ae0b5
- Provide i2c-dev.h in /usr/include/i2c-tools/
7ae0b5
- Resolves: rhbz#1288823
7ae0b5
- Dropped Group: tags as per https://fedoraproject.org/wiki/Packaging:Guidelines#Tags_and_Sections
7ae0b5
7ae0b5
* Wed Jul 19 2017 Ondřej Lysoněk <olysonek@redhat.com> - 3.1.2-1
7ae0b5
- New version
7ae0b5
- Updated upstream and source code URL
7ae0b5
- Dropped patches accepted by upstream
7ae0b5
7ae0b5
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.1.0-18
7ae0b5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
7ae0b5
7ae0b5
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.1.0-17
7ae0b5
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
7ae0b5
7ae0b5
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 3.1.0-16
7ae0b5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
7ae0b5
7ae0b5
* Thu Oct 08 2015 Jaromir Capik <jcapik@redhat.com> - 3.1.0-15
7ae0b5
- Adding i2c-dev auto-load in th %%post and modules-load.d (#913203)
7ae0b5
7ae0b5
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.1.0-14
7ae0b5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
7ae0b5
7ae0b5
* Sat Aug 16 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.1.0-13
7ae0b5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
7ae0b5
7ae0b5
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.1.0-12
7ae0b5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
7ae0b5
7ae0b5
* Wed Oct 9  2013 Peter Robinson <pbrobinson@fedoraproject.org> 3.1.0-11
7ae0b5
- Split out perl tools to a separate subpackage
7ae0b5
7ae0b5
* Fri Oct 04 2013 Jaromir Capik <jcapik@redhat.com> - 3.1.0-10
7ae0b5
- Making the decode-* man pages installable with Makefile
7ae0b5
7ae0b5
* Thu Oct 03 2013 Jaromir Capik <jcapik@redhat.com> - 3.1.0-9
7ae0b5
- Introducing man pages for decode-* binaries
7ae0b5
- Cleaning the spec
7ae0b5
7ae0b5
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.1.0-8
7ae0b5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
7ae0b5
7ae0b5
* Wed Jul 17 2013 Petr Pisar <ppisar@redhat.com> - 3.1.0-7
7ae0b5
- Perl 5.18 rebuild
7ae0b5
7ae0b5
* Wed Jul 03 2013 Jaromir Capik <jcapik@redhat.com> - 3.1.0-6
7ae0b5
- Installing the man pages and putting them in the files section
7ae0b5
7ae0b5
* Wed Jul 03 2013 Jaromir Capik <jcapik@redhat.com> - 3.1.0-5
7ae0b5
- Introducing man pages for binaries in the eepromer subpackage
7ae0b5
- Introducing -r switch in the i2cset help
7ae0b5
7ae0b5
* Sat Jun  1 2013 Henrik Nordstrom <henrik@henriknordstrom.net> - 3.1.0-4
7ae0b5
- Package python interface
7ae0b5
7ae0b5
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.1.0-3
7ae0b5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
7ae0b5
7ae0b5
* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.1.0-2
7ae0b5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
7ae0b5
7ae0b5
* Mon Feb 20 2012 Adam Jackson <ajax@redhat.com> 3.1.0-1
7ae0b5
- i2c-tools 3.1.0
7ae0b5
7ae0b5
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.0.3-2
7ae0b5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
7ae0b5
7ae0b5
* Tue Jul 05 2011 Adam Jackson <ajax@redhat.com> 3.0.3-1
7ae0b5
- i2c-tools 3.0.3
7ae0b5
7ae0b5
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.0.2-5
7ae0b5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
7ae0b5
7ae0b5
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.0.2-4
7ae0b5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
7ae0b5
7ae0b5
* Mon Apr 13 2009 Adam Jackson <ajax@redhat.com> 3.0.2-3
7ae0b5
- mv /etc/modprobe.d/i2c-dev /etc/modprobe.d/i2c-dev.conf (#495455)
7ae0b5
7ae0b5
* Tue Feb 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.0.2-2
7ae0b5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
7ae0b5
7ae0b5
* Thu Dec 11 2008 Adam Jackson <ajax@redhat.com> 3.0.2-1
7ae0b5
- i2c-tools 3.0.2
7ae0b5
7ae0b5
* Wed Mar  5 2008 Hans de Goede <j.w.r.degoede@hhs.nl> 3.0.0-3
7ae0b5
- Change /dev/i2c-# creation from /lib/udev/devices to /etc/udev/makedev.d
7ae0b5
  usage
7ae0b5
- Add an /etc/modprobe.d/i2c-dev file to work around bug 380971
7ae0b5
7ae0b5
* Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 3.0.0-2
7ae0b5
- Autorebuild for GCC 4.3
7ae0b5
7ae0b5
* Tue Nov 13 2007 Hans de Goede <j.w.r.degoede@hhs.nl> 3.0.0-1
7ae0b5
- Initial Fedora package, based on Suse specfile
7ae0b5
7ae0b5
* Mon Oct 15 2007 - jdelvare@suse.de
7ae0b5
- Initial release.