Package Python interface

This commit is contained in:
Henrik Nordstrom 2013-06-01 16:47:46 +02:00 committed by Jaromir Capik
parent c970191c60
commit fab570848f

View File

@ -14,6 +14,7 @@ URL: http://www.lm-sensors.org/wiki/I2CTools
Source0: http://dl.lm-sensors.org/i2c-tools/releases/%{name}-%{version}.tar.bz2
# for /etc/udev/makedev.d resp /etc/modprobe.d ownership
Requires: udev module-init-tools
BuildRequires: python-devel
ExcludeArch: s390 s390x
%description
@ -34,9 +35,14 @@ 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 python
Summary: Python bindings for Linux SMBus access through i2c-dev
Group: Applications/System
%description python
%prep
%setup -q
%setup -q
%build
@ -44,6 +50,9 @@ make CFLAGS="$RPM_OPT_FLAGS"
pushd eepromer
make CFLAGS="$RPM_OPT_FLAGS -I../include"
popd
pushd py-smbus
CFLAGS="$RPM_OPT_FLAGS -I../include" %{__python} setup.py build
popd
%install
@ -51,6 +60,9 @@ 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 --skip-build --root=$RPM_BUILD_ROOT
popd
# cleanup
rm -f $RPM_BUILD_ROOT%{_bindir}/decode-edid.pl
# Remove userland kernel headers, belong in glibc-kernheaders.
@ -88,8 +100,19 @@ rm -rf $RPM_BUILD_ROOT
%doc eepromer/README*
%{_sbindir}/eepro*
%files python
%defattr(-,root,root,-)
%doc py-smbus/README
#/usr/lib64/python2.7/site-packages/smbus-1.1-py2.7.egg-info
#/usr/lib64/python2.7/site-packages/smbus.so
%{python_sitearch}/*
%changelog
* Sat Jun 1 2013 Henrik Nordstrom <henrik@henriknordstrom.net> - 3.1.0-4
- Package python interface
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.1.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild