|
|
046a76e |
# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
|
|
046a76e |
# Copyright (c) 2007 Hans de Goede <j.w.r.degoede@hhs>, the Fedora project.
|
|
|
046a76e |
#
|
|
|
046a76e |
# This file and all modifications and additions to the pristine
|
|
|
046a76e |
# package are under the same license as the package itself.
|
|
|
046a76e |
|
|
|
046a76e |
Name: i2c-tools
|
|
|
c3d5883 |
Version: 3.0.2
|
|
|
858d379 |
Release: 3%{?dist}
|
|
|
046a76e |
Summary: A heterogeneous set of I2C tools for Linux
|
|
|
046a76e |
Group: Applications/System
|
|
|
046a76e |
License: GPLv2+
|
|
|
046a76e |
URL: http://www.lm-sensors.org/wiki/I2CTools
|
|
|
046a76e |
Source0: http://dl.lm-sensors.org/i2c-tools/releases/%{name}-%{version}.tar.bz2
|
|
|
046a76e |
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
|
|
5663fe1 |
# for /etc/udev/makedev.d resp /etc/modprobe.d ownership
|
|
|
5663fe1 |
Requires: udev module-init-tools
|
|
|
046a76e |
ExcludeArch: s390 s390x
|
|
|
046a76e |
|
|
|
046a76e |
%description
|
|
|
046a76e |
This package contains a heterogeneous set of I2C tools for Linux: a bus
|
|
|
046a76e |
probing tool, a chip dumper, register-level access helpers, EEPROM
|
|
|
046a76e |
decoding scripts, and more.
|
|
|
046a76e |
|
|
|
046a76e |
|
|
|
046a76e |
%package eepromer
|
|
|
046a76e |
Summary: Programs for reading / writing i2c / smbus eeproms
|
|
|
046a76e |
Group: Applications/System
|
|
|
046a76e |
# For the device nodes
|
|
|
046a76e |
Requires: %{name} = %{version}-%{release}
|
|
|
046a76e |
|
|
|
046a76e |
%description eepromer
|
|
|
046a76e |
Programs for reading / writing i2c / smbus eeproms. Notice that writing the
|
|
|
046a76e |
eeproms in your system is very dangerous and is likely to render your system
|
|
|
046a76e |
unusable. Do not install, let alone use this, unless you really, _really_ know
|
|
|
046a76e |
what you are doing.
|
|
|
046a76e |
|
|
|
046a76e |
|
|
|
046a76e |
%prep
|
|
|
046a76e |
%setup -q
|
|
|
046a76e |
|
|
|
046a76e |
|
|
|
046a76e |
%build
|
|
|
046a76e |
make CFLAGS="$RPM_OPT_FLAGS"
|
|
|
046a76e |
pushd eepromer
|
|
|
046a76e |
make CFLAGS="$RPM_OPT_FLAGS -I../include"
|
|
|
046a76e |
popd
|
|
|
046a76e |
|
|
|
046a76e |
|
|
|
046a76e |
%install
|
|
|
046a76e |
rm -rf $RPM_BUILD_ROOT
|
|
|
046a76e |
make install DESTDIR=$RPM_BUILD_ROOT prefix=%{_prefix}
|
|
|
046a76e |
install -m 755 eepromer/{eepromer,eeprom,eeprog} \
|
|
|
046a76e |
$RPM_BUILD_ROOT%{_sbindir}
|
|
|
046a76e |
# cleanup
|
|
|
c3d5883 |
rm -f $RPM_BUILD_ROOT%{_bindir}/decode-edid.pl
|
|
|
046a76e |
# Remove userland kernel headers, belong in glibc-kernheaders.
|
|
|
046a76e |
rm -rf $RPM_BUILD_ROOT%{_includedir}/linux
|
|
|
5663fe1 |
# for i2c-dev ondemand loading through kmod
|
|
|
5663fe1 |
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/modprobe.d
|
|
|
5663fe1 |
echo "alias char-major-89-* i2c-dev" > \
|
|
|
858d379 |
$RPM_BUILD_ROOT%{_sysconfdir}/modprobe.d/i2c-dev.conf
|
|
|
5663fe1 |
# for /dev/i2c-# creation (which are needed for kmod i2c-dev autoloading)
|
|
|
5663fe1 |
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/udev/makedev.d
|
|
|
5663fe1 |
for (( i = 0 ; i < 8 ; i++ )) do
|
|
|
5663fe1 |
echo "i2c-$i" >> $RPM_BUILD_ROOT%{_sysconfdir}/udev/makedev.d/99-i2c-dev.nodes
|
|
|
5663fe1 |
done
|
|
|
046a76e |
|
|
|
046a76e |
|
|
|
046a76e |
%clean
|
|
|
046a76e |
rm -rf $RPM_BUILD_ROOT
|
|
|
046a76e |
|
|
|
046a76e |
|
|
|
046a76e |
%files
|
|
|
046a76e |
%defattr(-,root,root,-)
|
|
|
046a76e |
%doc CHANGES COPYING README
|
|
|
858d379 |
%config(noreplace) %{_sysconfdir}/modprobe.d/i2c-dev.conf
|
|
|
5663fe1 |
%config(noreplace) %{_sysconfdir}/udev/makedev.d/99-i2c-dev.nodes
|
|
|
046a76e |
%{_bindir}/*
|
|
|
046a76e |
%{_sbindir}/*
|
|
|
046a76e |
%exclude %{_sbindir}/eepro*
|
|
|
046a76e |
%{_mandir}/man8/*.8.gz
|
|
|
046a76e |
|
|
|
046a76e |
%files eepromer
|
|
|
046a76e |
%defattr(-,root,root,-)
|
|
|
046a76e |
%doc eepromer/README*
|
|
|
046a76e |
%{_sbindir}/eepro*
|
|
|
046a76e |
|
|
|
046a76e |
|
|
|
046a76e |
%changelog
|
|
|
858d379 |
* Mon Apr 13 2009 Adam Jackson <ajax@redhat.com> 3.0.2-3
|
|
|
858d379 |
- mv /etc/modprobe.d/i2c-dev /etc/modprobe.d/i2c-dev.conf (#495455)
|
|
|
858d379 |
|
|
|
67019d4 |
* Tue Feb 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.0.2-2
|
|
|
67019d4 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
|
|
|
67019d4 |
|
|
|
c3d5883 |
* Thu Dec 11 2008 Adam Jackson <ajax@redhat.com> 3.0.2-1
|
|
|
c3d5883 |
- i2c-tools 3.0.2
|
|
|
c3d5883 |
|
|
|
5663fe1 |
* Wed Mar 5 2008 Hans de Goede <j.w.r.degoede@hhs.nl> 3.0.0-3
|
|
|
5663fe1 |
- Change /dev/i2c-# creation from /lib/udev/devices to /etc/udev/makedev.d
|
|
|
5663fe1 |
usage
|
|
|
5663fe1 |
- Add an /etc/modprobe.d/i2c-dev file to work around bug 380971
|
|
|
5663fe1 |
|
|
|
838716d |
* Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 3.0.0-2
|
|
|
838716d |
- Autorebuild for GCC 4.3
|
|
|
838716d |
|
|
|
046a76e |
* Tue Nov 13 2007 Hans de Goede <j.w.r.degoede@hhs.nl> 3.0.0-1
|
|
|
046a76e |
- Initial Fedora package, based on Suse specfile
|
|
|
046a76e |
|
|
|
046a76e |
* Mon Oct 15 2007 - jdelvare@suse.de
|
|
|
046a76e |
- Initial release.
|