Browse Source

updated i2c-tools-vl.spec

git-svn-id: http://trac.vinelinux.org/repos/projects/specs@2652 ec354946-7b23-47d6-9f5a-488ba84defc7
munepi 13 years ago
parent
commit
9680546787
1 changed files with 29 additions and 1 deletions
  1. 29 1
      i/i2c-tools/i2c-tools-vl.spec

+ 29 - 1
i/i2c-tools/i2c-tools-vl.spec

@@ -6,7 +6,7 @@
 
 Name:           i2c-tools
 Version:        3.0.2
-Release:        1%{?_dist_release}
+Release:        2%{?_dist_release}
 Summary:        A heterogeneous set of I2C tools for Linux
 Group:          Applications/System
 License:        GPLv2+
@@ -35,6 +35,18 @@ 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.
 
+%package -n smbus-python
+Summary:	Python module for SMBus access via I2C
+Group:          Development/Languages
+BuildRequires:	python-devel
+BuildRequires:	python-setuptools
+Requires:	python
+
+%description -n smbus-python
+This Python module allows SMBus access through the I2C /dev interface
+on Linux hosts. The host kernel must have I2C support, I2C device
+interface support, and a bus adapter driver.
+
 
 %prep
 %setup -q 
@@ -46,12 +58,20 @@ pushd eepromer
 make CFLAGS="$RPM_OPT_FLAGS -I../include"
 popd
 
+pushd py-smbus
+CFLAGS="%{optflags} -I../include" python setup.py build
+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}
+
+pushd py-smbus
+python setup.py install --root=%{buildroot} --compile --optimize=2
+popd
+
 # cleanup
 rm -f $RPM_BUILD_ROOT%{_bindir}/decode-edid.pl
 # Remove userland kernel headers, belong in glibc-kernheaders.
@@ -86,8 +106,16 @@ rm -rf $RPM_BUILD_ROOT
 %doc eepromer/README*
 %{_sbindir}/eepro*
 
+%files -n smbus-python
+%defattr(0644,root,root,0755)
+%doc py-smbus/README
+%{python_sitearch}/smbus*
+
 
 %changelog
+* Sun Feb 06 2011 Munehiro Yamamoto <munepi@vinelinux.org> 3.0.2-2
+- added smbus-python package
+
 * Tue Mar 16 2010 Daisuke SUZUKI <daisuke@linux.or.jp> 3.0.2-1
 - initial build for Vine Linux