[583] | 1 | # Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany. |
---|
| 2 | # Copyright (c) 2007 Hans de Goede <j.w.r.degoede@hhs>, the Fedora project. |
---|
| 3 | # |
---|
| 4 | # This file and all modifications and additions to the pristine |
---|
| 5 | # package are under the same license as the package itself. |
---|
| 6 | |
---|
| 7 | Name: i2c-tools |
---|
| 8 | Version: 3.0.2 |
---|
| 9 | Release: 1%{?_dist_release} |
---|
| 10 | Summary: A heterogeneous set of I2C tools for Linux |
---|
| 11 | Group: Applications/System |
---|
| 12 | License: GPLv2+ |
---|
| 13 | URL: http://www.lm-sensors.org/wiki/I2CTools |
---|
| 14 | Source0: http://dl.lm-sensors.org/i2c-tools/releases/%{name}-%{version}.tar.bz2 |
---|
| 15 | BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root |
---|
| 16 | # for /etc/udev/makedev.d resp /etc/modprobe.d ownership |
---|
| 17 | Requires: udev module-init-tools |
---|
| 18 | ExcludeArch: s390 s390x |
---|
| 19 | |
---|
| 20 | %description |
---|
| 21 | This package contains a heterogeneous set of I2C tools for Linux: a bus |
---|
| 22 | probing tool, a chip dumper, register-level access helpers, EEPROM |
---|
| 23 | decoding scripts, and more. |
---|
| 24 | |
---|
| 25 | |
---|
| 26 | %package eepromer |
---|
| 27 | Summary: Programs for reading / writing i2c / smbus eeproms |
---|
| 28 | Group: Applications/System |
---|
| 29 | # For the device nodes |
---|
| 30 | Requires: %{name} = %{version}-%{release} |
---|
| 31 | |
---|
| 32 | %description eepromer |
---|
| 33 | Programs for reading / writing i2c / smbus eeproms. Notice that writing the |
---|
| 34 | eeproms in your system is very dangerous and is likely to render your system |
---|
| 35 | unusable. Do not install, let alone use this, unless you really, _really_ know |
---|
| 36 | what you are doing. |
---|
| 37 | |
---|
| 38 | |
---|
| 39 | %prep |
---|
| 40 | %setup -q |
---|
| 41 | |
---|
| 42 | |
---|
| 43 | %build |
---|
| 44 | make CFLAGS="$RPM_OPT_FLAGS" |
---|
| 45 | pushd eepromer |
---|
| 46 | make CFLAGS="$RPM_OPT_FLAGS -I../include" |
---|
| 47 | popd |
---|
| 48 | |
---|
| 49 | |
---|
| 50 | %install |
---|
| 51 | rm -rf $RPM_BUILD_ROOT |
---|
| 52 | make install DESTDIR=$RPM_BUILD_ROOT prefix=%{_prefix} |
---|
| 53 | install -m 755 eepromer/{eepromer,eeprom,eeprog} \ |
---|
| 54 | $RPM_BUILD_ROOT%{_sbindir} |
---|
| 55 | # cleanup |
---|
| 56 | rm -f $RPM_BUILD_ROOT%{_bindir}/decode-edid.pl |
---|
| 57 | # Remove userland kernel headers, belong in glibc-kernheaders. |
---|
| 58 | rm -rf $RPM_BUILD_ROOT%{_includedir}/linux |
---|
| 59 | # for i2c-dev ondemand loading through kmod |
---|
| 60 | mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/modprobe.d |
---|
| 61 | echo "alias char-major-89-* i2c-dev" > \ |
---|
| 62 | $RPM_BUILD_ROOT%{_sysconfdir}/modprobe.d/i2c-dev.conf |
---|
| 63 | # for /dev/i2c-# creation (which are needed for kmod i2c-dev autoloading) |
---|
| 64 | mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/udev/makedev.d |
---|
| 65 | for (( i = 0 ; i < 8 ; i++ )) do |
---|
| 66 | echo "i2c-$i" >> $RPM_BUILD_ROOT%{_sysconfdir}/udev/makedev.d/99-i2c-dev.nodes |
---|
| 67 | done |
---|
| 68 | |
---|
| 69 | |
---|
| 70 | %clean |
---|
| 71 | rm -rf $RPM_BUILD_ROOT |
---|
| 72 | |
---|
| 73 | |
---|
| 74 | %files |
---|
| 75 | %defattr(-,root,root,-) |
---|
| 76 | %doc CHANGES COPYING README |
---|
| 77 | %config(noreplace) %{_sysconfdir}/modprobe.d/i2c-dev.conf |
---|
| 78 | %config(noreplace) %{_sysconfdir}/udev/makedev.d/99-i2c-dev.nodes |
---|
| 79 | %{_bindir}/* |
---|
| 80 | %{_sbindir}/* |
---|
| 81 | %exclude %{_sbindir}/eepro* |
---|
| 82 | %{_mandir}/man8/*.8.gz |
---|
| 83 | |
---|
| 84 | %files eepromer |
---|
| 85 | %defattr(-,root,root,-) |
---|
| 86 | %doc eepromer/README* |
---|
| 87 | %{_sbindir}/eepro* |
---|
| 88 | |
---|
| 89 | |
---|
| 90 | %changelog |
---|
| 91 | * Tue Mar 16 2010 Daisuke SUZUKI <daisuke@linux.or.jp> 3.0.2-1 |
---|
| 92 | - initial build for Vine Linux |
---|
| 93 | |
---|
| 94 | * Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.0.2-4 |
---|
| 95 | - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild |
---|
| 96 | |
---|
| 97 | * Mon Apr 13 2009 Adam Jackson <ajax@redhat.com> 3.0.2-3 |
---|
| 98 | - mv /etc/modprobe.d/i2c-dev /etc/modprobe.d/i2c-dev.conf (#495455) |
---|
| 99 | |
---|
| 100 | * Tue Feb 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.0.2-2 |
---|
| 101 | - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild |
---|
| 102 | |
---|
| 103 | * Thu Dec 11 2008 Adam Jackson <ajax@redhat.com> 3.0.2-1 |
---|
| 104 | - i2c-tools 3.0.2 |
---|
| 105 | |
---|
| 106 | * Wed Mar 5 2008 Hans de Goede <j.w.r.degoede@hhs.nl> 3.0.0-3 |
---|
| 107 | - Change /dev/i2c-# creation from /lib/udev/devices to /etc/udev/makedev.d |
---|
| 108 | usage |
---|
| 109 | - Add an /etc/modprobe.d/i2c-dev file to work around bug 380971 |
---|
| 110 | |
---|
| 111 | * Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 3.0.0-2 |
---|
| 112 | - Autorebuild for GCC 4.3 |
---|
| 113 | |
---|
| 114 | * Tue Nov 13 2007 Hans de Goede <j.w.r.degoede@hhs.nl> 3.0.0-1 |
---|
| 115 | - Initial Fedora package, based on Suse specfile |
---|
| 116 | |
---|
| 117 | * Mon Oct 15 2007 - jdelvare@suse.de |
---|
| 118 | - Initial release. |
---|