source: projects/specs/trunk/i/i2c-tools/i2c-tools-vl.spec @ 2652

Revision 2652, 4.5 KB checked in by munepi, 13 years ago (diff)

updated i2c-tools-vl.spec

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