Blame SPECS/i2c-tools.spec

6b1808
# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany.
6b1808
# Copyright (c) 2007 Hans de Goede <j.w.r.degoede@hhs>, the Fedora project.
6b1808
#
6b1808
# This file and all modifications and additions to the pristine
6b1808
# package are under the same license as the package itself.
6b1808
6b1808
Name:           i2c-tools
6b1808
Version:        3.1.0
e614ca
Release:        10%{?dist}
6b1808
Summary:        A heterogeneous set of I2C tools for Linux
6b1808
Group:          Applications/System
6b1808
License:        GPLv2+
6b1808
URL:            http://www.lm-sensors.org/wiki/I2CTools
6b1808
Source0:        http://dl.lm-sensors.org/i2c-tools/releases/%{name}-%{version}.tar.bz2
6b1808
6b1808
# Introducing man pages for binaries in the eepromer subpackage
6b1808
# Introducing -r switch in the i2cset help
6b1808
Patch0:         i2c-tools-3.1-man-eeproX.patch
6b1808
# Introducing man pages for decode-* binaries
6b1808
Patch1:         i2c-tools-3.1-man-decodeX.patch
6b1808
6b1808
# for /etc/udev/makedev.d resp /etc/modprobe.d ownership
6b1808
Requires:       udev module-init-tools
6b1808
BuildRequires:  python-devel
6b1808
ExcludeArch:    s390 s390x
6b1808
6b1808
%description
6b1808
This package contains a heterogeneous set of I2C tools for Linux: a bus
6b1808
probing tool, a chip dumper, register-level access helpers, EEPROM
6b1808
decoding scripts, and more.
6b1808
6b1808
6b1808
%package eepromer
6b1808
Summary:        Programs for reading / writing i2c / smbus eeproms
6b1808
Group:          Applications/System
6b1808
# For the device nodes
6b1808
Requires:       %{name} = %{version}-%{release}
6b1808
6b1808
%description eepromer
6b1808
Programs for reading / writing i2c / smbus eeproms. Notice that writing the
6b1808
eeproms in your system is very dangerous and is likely to render your system
6b1808
unusable. Do not install, let alone use this, unless you really, _really_ know
6b1808
what you are doing.
6b1808
6b1808
%package python
6b1808
Summary:        Python bindings for Linux SMBus access through i2c-dev
6b1808
Group:          Applications/System
6b1808
6b1808
%description python
6b1808
6b1808
%prep
6b1808
%setup -q
6b1808
6b1808
%patch0 -p1
6b1808
%patch1 -p1
6b1808
6b1808
%build
6b1808
make CFLAGS="$RPM_OPT_FLAGS"
6b1808
pushd eepromer
6b1808
make CFLAGS="$RPM_OPT_FLAGS -I../include"
6b1808
popd
6b1808
pushd py-smbus
6b1808
CFLAGS="$RPM_OPT_FLAGS -I../include" %{__python} setup.py build
6b1808
popd
6b1808
6b1808
6b1808
%install
6b1808
make install DESTDIR=$RPM_BUILD_ROOT prefix=%{_prefix}
6b1808
install -m 755 eepromer/{eepromer,eeprom,eeprog} \
6b1808
  $RPM_BUILD_ROOT%{_sbindir}
6b1808
install -m 644 eepromer/{eepromer,eeprom,eeprog}.8 \
6b1808
  $RPM_BUILD_ROOT%{_mandir}/man8
6b1808
install -d 755 $RPM_BUILD_ROOT%{_mandir}/man1
6b1808
install -m 644 eeprom/{decode-dimms,decode-vaio}.1 \
6b1808
  $RPM_BUILD_ROOT%{_mandir}/man1
6b1808
pushd py-smbus
6b1808
%{__python} setup.py install --skip-build --root=$RPM_BUILD_ROOT
6b1808
popd
6b1808
# cleanup
6b1808
rm -f $RPM_BUILD_ROOT%{_bindir}/decode-edid.pl
6b1808
# Remove userland kernel headers, belong in glibc-kernheaders.
6b1808
rm -rf $RPM_BUILD_ROOT%{_includedir}/linux
6b1808
# Remove unpleasant DDC tools.  KMS already exposes the EDID block in sysfs,
6b1808
# and edid-decode is a more complete tool than decode-edid.
6b1808
rm -f $RPM_BUILD_ROOT%{_bindir}/{ddcmon,decode-edid}
6b1808
# for i2c-dev ondemand loading through kmod
6b1808
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/modprobe.d 
6b1808
echo "alias char-major-89-* i2c-dev" > \
6b1808
  $RPM_BUILD_ROOT%{_sysconfdir}/modprobe.d/i2c-dev.conf
6b1808
# for /dev/i2c-# creation (which are needed for kmod i2c-dev autoloading)
6b1808
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/udev/makedev.d
6b1808
for (( i = 0 ; i < 8 ; i++ )) do
6b1808
  echo "i2c-$i" >> $RPM_BUILD_ROOT%{_sysconfdir}/udev/makedev.d/99-i2c-dev.nodes
6b1808
done
6b1808
6b1808
6b1808
%files
6b1808
%doc CHANGES COPYING README
6b1808
%config(noreplace) %{_sysconfdir}/modprobe.d/i2c-dev.conf
6b1808
%config(noreplace) %{_sysconfdir}/udev/makedev.d/99-i2c-dev.nodes
6b1808
%{_bindir}/*
6b1808
%{_sbindir}/*
6b1808
%{_mandir}/man1/decode-*.1.gz
6b1808
%exclude %{_sbindir}/eepro*
6b1808
%{_mandir}/man8/*.8.gz
6b1808
%exclude %{_mandir}/man8/eepro*
6b1808
6b1808
%files eepromer
6b1808
%doc eepromer/README*
6b1808
%{_sbindir}/eepro*
6b1808
%{_mandir}/man8/eepro*.8.gz
6b1808
6b1808
%files python
6b1808
%doc py-smbus/README
6b1808
#/usr/lib64/python2.7/site-packages/smbus-1.1-py2.7.egg-info
6b1808
#/usr/lib64/python2.7/site-packages/smbus.so
6b1808
%{python_sitearch}/*
6b1808
6b1808
6b1808
6b1808
%changelog
e614ca
* Fri Dec 27 2013 Daniel Mach <dmach@redhat.com> - 3.1.0-10
e614ca
- Mass rebuild 2013-12-27
e614ca
6b1808
* Thu Oct 03 2013 Jaromir Capik <jcapik@redhat.com> - 3.1.0-9
6b1808
- Introducing man pages for decode-* binaries
6b1808
- Cleaning the spec
6b1808
- Resolves: rhbz#948819
6b1808
6b1808
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.1.0-8
6b1808
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
6b1808
6b1808
* Wed Jul 17 2013 Petr Pisar <ppisar@redhat.com> - 3.1.0-7
6b1808
- Perl 5.18 rebuild
6b1808
6b1808
* Wed Jul 03 2013 Jaromir Capik <jcapik@redhat.com> - 3.1.0-6
6b1808
- Installing the man pages and putting them in the files section
6b1808
6b1808
* Wed Jul 03 2013 Jaromir Capik <jcapik@redhat.com> - 3.1.0-5
6b1808
- Introducing man pages for binaries in the eepromer subpackage
6b1808
- Introducing -r switch in the i2cset help
6b1808
6b1808
* Sat Jun  1 2013 Henrik Nordstrom <henrik@henriknordstrom.net> - 3.1.0-4
6b1808
- Package python interface
6b1808
6b1808
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.1.0-3
6b1808
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
6b1808
6b1808
* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.1.0-2
6b1808
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
6b1808
6b1808
* Mon Feb 20 2012 Adam Jackson <ajax@redhat.com> 3.1.0-1
6b1808
- i2c-tools 3.1.0
6b1808
6b1808
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.0.3-2
6b1808
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
6b1808
6b1808
* Tue Jul 05 2011 Adam Jackson <ajax@redhat.com> 3.0.3-1
6b1808
- i2c-tools 3.0.3
6b1808
6b1808
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.0.2-5
6b1808
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
6b1808
6b1808
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.0.2-4
6b1808
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
6b1808
6b1808
* Mon Apr 13 2009 Adam Jackson <ajax@redhat.com> 3.0.2-3
6b1808
- mv /etc/modprobe.d/i2c-dev /etc/modprobe.d/i2c-dev.conf (#495455)
6b1808
6b1808
* Tue Feb 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.0.2-2
6b1808
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
6b1808
6b1808
* Thu Dec 11 2008 Adam Jackson <ajax@redhat.com> 3.0.2-1
6b1808
- i2c-tools 3.0.2
6b1808
6b1808
* Wed Mar  5 2008 Hans de Goede <j.w.r.degoede@hhs.nl> 3.0.0-3
6b1808
- Change /dev/i2c-# creation from /lib/udev/devices to /etc/udev/makedev.d
6b1808
  usage
6b1808
- Add an /etc/modprobe.d/i2c-dev file to work around bug 380971
6b1808
6b1808
* Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 3.0.0-2
6b1808
- Autorebuild for GCC 4.3
6b1808
6b1808
* Tue Nov 13 2007 Hans de Goede <j.w.r.degoede@hhs.nl> 3.0.0-1
6b1808
- Initial Fedora package, based on Suse specfile
6b1808
6b1808
* Mon Oct 15 2007 - jdelvare@suse.de
6b1808
- Initial release.