From 046a76e0c5abd3720e04027121284dc53f26da00 Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Nov 20 2007 20:44:19 +0000 Subject: initial i2c-tools import --- diff --git a/.cvsignore b/.cvsignore index e69de29..2023eaf 100644 --- a/.cvsignore +++ b/.cvsignore @@ -0,0 +1 @@ +i2c-tools-3.0.0.tar.bz2 diff --git a/i2c-tools.spec b/i2c-tools.spec new file mode 100644 index 0000000..7a3dbf4 --- /dev/null +++ b/i2c-tools.spec @@ -0,0 +1,90 @@ +# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2007 Hans de Goede , 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.0 +Release: 1%{?dist} +Summary: A heterogeneous set of I2C tools for Linux +Group: Applications/System +License: GPLv2+ +URL: http://www.lm-sensors.org/wiki/I2CTools +Source0: http://dl.lm-sensors.org/i2c-tools/releases/%{name}-%{version}.tar.bz2 +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +# for /lib/udev/devices ownership +Requires: udev +ExcludeArch: s390 s390x + +%description +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. + + +%prep +%setup -q + + +%build +make CFLAGS="$RPM_OPT_FLAGS" +pushd eepromer +make CFLAGS="$RPM_OPT_FLAGS -I../include" +popd + + +%install +rm -rf $RPM_BUILD_ROOT +make install DESTDIR=$RPM_BUILD_ROOT prefix=%{_prefix} +install -m 755 eepromer/{eepromer,eeprom,eeprog} \ + $RPM_BUILD_ROOT%{_sbindir} +# cleanup +rm $RPM_BUILD_ROOT%{_bindir}/decode-edid.pl +# Remove userland kernel headers, belong in glibc-kernheaders. +rm -rf $RPM_BUILD_ROOT%{_includedir}/linux + + +%clean +rm -rf $RPM_BUILD_ROOT + + +%files +%defattr(-,root,root,-) +%doc CHANGES COPYING README +# Not created automatically as i2c-dev does not get autoloaded, once created +# manually, i2c-dev will get loaded by kmod as needed once bz 380971 is fixed +%attr(660, root, root) %dev(c, 89, 0) /lib/udev/devices/i2c-0 +%attr(660, root, root) %dev(c, 89, 0) /lib/udev/devices/i2c-1 +%attr(660, root, root) %dev(c, 89, 0) /lib/udev/devices/i2c-2 +%attr(660, root, root) %dev(c, 89, 0) /lib/udev/devices/i2c-3 +%{_bindir}/* +%{_sbindir}/* +%exclude %{_sbindir}/eepro* +%{_mandir}/man8/*.8.gz + +%files eepromer +%defattr(-,root,root,-) +%doc eepromer/README* +%{_sbindir}/eepro* + + +%changelog +* Tue Nov 13 2007 Hans de Goede 3.0.0-1 +- Initial Fedora package, based on Suse specfile + +* Mon Oct 15 2007 - jdelvare@suse.de +- Initial release. diff --git a/sources b/sources index e69de29..18c7788 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +aeaa1d5d7b35faf096e5663c5fd823dc i2c-tools-3.0.0.tar.bz2