File i2c-tools.spec of Package i2c-tools

# spec file for package i2c-tools
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
# 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

Name:           i2c-tools
Version:        4.1
Release:        65.2
Summary:        A heterogeneous set of I2C tools for Linux
License:        GPL-2.0-or-later
Group:          Development/Tools/Other
BuildRequires:  xz glibc-devel
Requires:       udev
Recommends:     modules
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
ExcludeArch:    s390 s390x

This package contains a heterogeneous set of I2C tools for Linux: a bus
probing tool, a chip dumper, register-level access helpers, EEPROM
decoding scripts, and more.

%package -n libi2c0
Summary:        I2C/SMBus bus access library
License:        LGPL-2.1-or-later
Group:          System/Libraries

%description -n libi2c0
libi2c offers a way for applications to interact with the devices
connected to the I2C or SMBus buses of the system.

%package -n libi2c0-devel
Summary:        Development files for the I2C/SMBus bus access library
License:        LGPL-2.1-or-later
Group:          Development/Libraries/C and C++
Requires:       glibc-devel
Requires:       libi2c0 = %{version}
Provides:       /usr/include/i2c/smbus.h

%description -n libi2c0-devel
libi2c offers a way for applications to interact with the devices
connected to the I2C or SMBus buses of the system.

%setup -q

make %{?_smp_mflags} CFLAGS="%{optflags}" CC="%{__cc}" BUILD_STATIC_LIB:=0

%make_install PREFIX=/usr libdir=%{_libdir} BUILD_STATIC_LIB:=0
# cleanup
rm -f "%{buildroot}/usr/bin/decode-edid"

%post -n libi2c0 -p /sbin/ldconfig

%postun -n libi2c0 -p /sbin/ldconfig


%files -n libi2c0

%files -n libi2c0-devel
%dir %{_includedir}/i2c

* Tue Dec  4 2018
- Replace old $RPM_* shell vars; use macros where they are
  normally used in other packages.
* Mon Dec  3 2018
- Update to version 4.1:
  * New option -a to allow using reserved address
  * Several build races fixed
  * Fix for potential buffer overflows
  * Support for DDR4 SDRAM memory
  * Updated list of memory vendors
  * Clarify library license
  * Fix error propagation in py-smbus
- Removed obsolete build-lib-add-missing-dependencies.patch,
  i2cbusses-path-overflows.patch (upstream)
* Tue Dec 12 2017
- build-tools-add-missing-dependencies.patch: Fix another random
  failure of parallel builds.
* Wed Dec  6 2017
- build-lib-add-missing-dependencies.patch: Fix random failure
  of parallel builds.
- decode-dimms-hackweek-DDR4.patch: Add DDR4 SDRAM memory support
  to decode-dimms (Hackweek 0x10 project.)
* Mon Oct 30 2017
- i2cbusses-path-overflows.patch: Prevent buffer overflow of
  sysfs paths.
* Mon Oct 30 2017
- Update to version 4.0:
  * New library libi2c
  * Many fixes and improvements to decode-dimms
  * New manual pages and examples added to existing manual pages
  * New tool i2ctransfer
- Removed obsolete decode-dimms-correctly-check-for-out-of-bounds-vendor-id.patch,
  i2c-tools-r6053-Add-smbus-header.patch (upstream)
* Mon Jul 17 2017
- Add missing bug number in changes file (bsc#1041644).
* Thu Jul  6 2017
- decode-dimms-correctly-check-for-out-of-bounds-vendor-id.patch:
  Fix recommended by upstream.
* Thu Jul  6 2017
- Update the URL.
- Remove authors list from package description, it does not belong
* Thu Jul  6 2017
- Point to the new download location.
* Tue Sep 27 2016
- Fix file conflict (i2c-dev.h) with linux-glibc-devel. (bsc#995536)
* Fri Nov 27 2015
- Update to version 3.1.2:
  * Includes 1 backport we already had
- Removed obsolete i2c-tools-r6250-ddr3-fix-ext-temp-refresh.diff
* Wed Oct 14 2015
- Backport  r6048 and r6053 in order to not conflict with
* Thu Jun 19 2014
- i2c-tools-r6250-ddr3-fix-ext-temp-refresh.diff: Fix DDR3 extended
  temp range refresh rate decoding.
* Sat Feb 22 2014
- Update to version 3.1.1:
  * Includes 13 packports we already had
  * Some additional fixes to decode-dimms
  * New manual pages for decode-dimms, decode-vaio
  * i2c-stub-from-dump tolerance on input dump format was improved
- Removed obsolete i2c-tools-r6063-dont-choke-when-no-eeprom.diff,
  i2c-tools-r6154-round-down-PC3-numbers.diff and
  i2c-tools-r6157-vendors-JEP106AK.diff (upstream)
* Thu Apr 18 2013
- i2c-tools-hackweek-9-dependencies.diff: Backport 2 helper
  functions needed by the following patch.
- i2c-tools-hackweek-9-improve-DDR3-support.diff: Improve DDR3
  support. This was my hackweek 9 project.
* Wed Apr 17 2013
  Backport fixes from upstream 3.1 branch:
- i2c-tools-r6151-space-before-MHz.diff: Print a space before "MHz"
  to improve readability.
- i2c-tools-r6152-fix-DDR3-tRAS-decoding.diff: Fix DDR3 tRAS
- i2c-tools-r6153-fix-DDR3-timings-rounding.diff: Fix DDR3 core
  timings rounding.
- i2c-tools-r6154-round-down-PC3-numbers.diff: Round down PC3
  numbers to comply with Jedec.
- i2c-tools-r6157-vendors-JEP106AK.diff: Update vendor list based
  on Jedec document JEP106AK.
* Thu Mar 28 2013
- Added url as source.
  Please see
* Wed Feb 13 2013
  Backport fixes from upstream 3.1 branch:
- i2c-tools-r6063-dont-choke-when-no-eeprom.diff: Don't choke when
  no EEPROM is found.
- i2c-tools-r6106-vendors-JEP106AG.diff,
- i2c-tools-r6107-vendors-JEP106AJ.diff: Update vendor list based
  on Jedec documents JEP106AG and JEP106AJ.
- i2c-tools-r6108-remove-duplicate-ns.diff: Remove duplicate "ns"
  in SDR timings.
- i2c-tools-r6109-fix-decoding-revision.diff: Fix decoding of SDR
  SPD revision.
- i2c-tools-r6110-i2cdetect-clarify-probing.diff: Clarify the SMBus
  commands used for probing by default.
- i2c-tools-r6121-typo-sprint.diff: Prevent hang on reserved DDR3
  module type, caused by a typo in function name.
- i2c-tools-r6122-more-DDR3-module-types.diff: Decode more DDR3
  module types.
* Wed Feb 13 2013
- Don't build and ship programs to access I2C memory. We don't want
  to ship 3 tools doing the same thing, and none of these is good
  enough. There is a reason why upstream doesn't include them by
  default. Oh, and they don't even build.
* Mon Feb 13 2012
- patch license to follow standard
* Tue Dec 20 2011
- Build and ship programs to access I2C memory.
* Mon Dec  5 2011
- Update to version 3.1.0:
  * Support for block writes (i2cset)
  * at24 driver support (decode-dimms)
  * Slightly improved DDR SDRAM support (decode-dimms)
* Fri Sep 30 2011
- cross-build fix: use %%__cc macro
* Mon Dec 13 2010
- Update to version 3.0.3:
  * Support for DDR3 SDRAM (decode-dimms)
  * Support for alternative output formats (decode-dimms)
  * Support for multiple dumps (i2c-stub-from-dump)
* Sun Oct 31 2010
- Use %%_smp_mflags
* Fri Dec 18 2009
- Enable parallel building
* Fri Jul 31 2009
- List the signature as a source file.
* Mon Jul 27 2009
- Update to version 3.0.2:
  * Improved error handling
  * Buses can now be passed by name
  * Obsolete i2c-tools-r5388-prevent-perl-warning.patch
* Tue Nov 18 2008
- i2c-tools-r5388-prevent-perl-warning.patch: Prevent a perl 5.10.0
  warning about SEEK_SET and friends being redefined (#446098).
- Add Recommends: modules.
* Tue Nov 11 2008
- drop requires for "modules", not really needed here
  and launches a long rebuild chain
* Mon May  5 2008
- Drop static /dev/i2c-0 device node, it's no longer needed (if it
  ever really was.)
* Tue Apr  8 2008
- Update to version 3.0.1:
  * New helper script i2c-stub-from-dump
  * Improvements to i2cdump and decode-dimms
* Mon Oct 15 2007
- Initial release.
openSUSE Build Service is sponsored by