i2c-tools-vl.spec 3.7 KB

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