Blob Blame History Raw
# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2007 Hans de Goede <j.w.r.degoede@hhs>, the Fedora project.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.

Name:           i2c-tools
Version:        3.0.2
Release:        2%{?dist}
Summary:        A heterogeneous set of I2C tools for Linux
Group:          Applications/System
License:        GPLv2+
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
# for /etc/udev/makedev.d resp /etc/modprobe.d ownership
Requires:       udev module-init-tools
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 eepromer
Summary:        Programs for reading / writing i2c / smbus eeproms
Group:          Applications/System
# For the device nodes
Requires:       %{name} = %{version}-%{release}

%description eepromer
Programs for reading / writing i2c / smbus eeproms. Notice that writing the
eeproms in your system is very dangerous and is likely to render your system
unusable. Do not install, let alone use this, unless you really, _really_ know
what you are doing.

%setup -q 

pushd eepromer
make CFLAGS="$RPM_OPT_FLAGS -I../include"

make install DESTDIR=$RPM_BUILD_ROOT prefix=%{_prefix}
install -m 755 eepromer/{eepromer,eeprom,eeprog} \
# cleanup
rm -f $RPM_BUILD_ROOT%{_bindir}/
# Remove userland kernel headers, belong in glibc-kernheaders.
rm -rf $RPM_BUILD_ROOT%{_includedir}/linux
# for i2c-dev ondemand loading through kmod
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/modprobe.d 
echo "alias char-major-89-* i2c-dev" > \
# for /dev/i2c-# creation (which are needed for kmod i2c-dev autoloading)
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/udev/makedev.d
for (( i = 0 ; i < 8 ; i++ )) do
  echo "i2c-$i" >> $RPM_BUILD_ROOT%{_sysconfdir}/udev/makedev.d/99-i2c-dev.nodes


%config(noreplace) %{_sysconfdir}/modprobe.d/i2c-dev
%config(noreplace) %{_sysconfdir}/udev/makedev.d/99-i2c-dev.nodes
%exclude %{_sbindir}/eepro*

%files eepromer
%doc eepromer/README*

* Tue Feb 24 2009 Fedora Release Engineering <> - 3.0.2-2
- Rebuilt for

* Thu Dec 11 2008 Adam Jackson <> 3.0.2-1
- i2c-tools 3.0.2

* Wed Mar  5 2008 Hans de Goede <> 3.0.0-3
- Change /dev/i2c-# creation from /lib/udev/devices to /etc/udev/makedev.d
- Add an /etc/modprobe.d/i2c-dev file to work around bug 380971

* Tue Feb 19 2008 Fedora Release Engineering <> - 3.0.0-2
- Autorebuild for GCC 4.3

* Tue Nov 13 2007 Hans de Goede <> 3.0.0-1
- Initial Fedora package, based on Suse specfile

* Mon Oct 15 2007 -
- Initial release.