[packages/i2c-tools] - updated to 3.1.1 - added python patch to allow DESTDIR in py-smbus module - package eepromer progr

qboosh qboosh at pld-linux.org
Thu Feb 27 22:03:19 CET 2014


commit 87778d89c374fef2ec77fa24ad70a4f2b833f06b
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Thu Feb 27 22:05:52 2014 +0100

    - updated to 3.1.1
    - added python patch to allow DESTDIR in py-smbus module
    - package eepromer programs (in base) and python-smbus module

 i2c-tools-python.patch | 11 ++++++++++
 i2c-tools.spec         | 54 ++++++++++++++++++++++++++++++++++++++++++++++----
 2 files changed, 61 insertions(+), 4 deletions(-)
---
diff --git a/i2c-tools.spec b/i2c-tools.spec
index cdeded0..4763759 100644
--- a/i2c-tools.spec
+++ b/i2c-tools.spec
@@ -1,16 +1,22 @@
+#
+# Conditional build:
+%bcond_without	python	# Python smbus module
+#
 %include	/usr/lib/rpm/macros.perl
 Summary:	I2C tools for Linux
 Summary(en.UTF-8):	I²C tools for Linux
 Summary(pl.UTF-8):	Narzędzia I²C dla Linuksa
 Name:		i2c-tools
-Version:	3.1.0
+Version:	3.1.1
 Release:	1
 License:	GPL v2+
 Group:		Applications/System
 Source0:	http://dl.lm-sensors.org/i2c-tools/releases/%{name}-%{version}.tar.bz2
-# Source0-md5:	f15019e559e378c6e9d5d6299a00df21
+# Source0-md5:	0fdbff53ebd0b8d9249256d6c56480b1
+Patch0:		%{name}-python.patch
 URL:		http://www.lm-sensors.org/wiki/I2CTools
 BuildRequires:	perl-modules >= 1:5.6
+%{?with_python:BuildRequires:	python-devel >= 2}
 BuildRequires:	rpm-perlprov >= 3.0.3-16
 Requires:	dev >= 2.9.0-13
 Requires:	uname(release) >= 2.6.5
@@ -25,22 +31,46 @@ I²C tools for Linux.
 %description -l pl.UTF-8
 Narzędzia I²C dla Linuksa.
 
+%package -n python-smbus
+Summary:	Python SMBus module
+Summary(pl.UTF-8):	Moduł Pythona SMBus
+Group:		Libraries/Python
+
+%description -n python-smbus
+Python bindings for Linux SMBus access through i2c-dev.
+
+%description -n python-smbus -l pl.UTF-8
+Wiązania Pythona służące do dostępu do szyny SMBus spod Linuksa
+poprzez i2c-dev.
+
 %prep
 %setup -q
+%patch0 -p1
+
+%{__mv} eepromer/{README,README.eeproms}
 
 %build
 %{__make} \
 	CC="%{__cc}" \
-	CFLAGS="%{rpmcflags}"
+	CFLAGS="%{rpmcflags}" \
+	%{?with_python:EXTRA=py-smbus}
+
+%{__make} -C eepromer \
+	CC="%{__cc}" \
+	CFLAGS="%{rpmcflags} -I../include -Wall"
 
 %install
 rm -rf $RPM_BUILD_ROOT
 
 %{__make} install \
 	DESTDIR=$RPM_BUILD_ROOT \
+	%{?with_python:EXTRA=py-smbus} \
 	prefix=%{_prefix} \
 	mandir=%{_mandir}
 
+install eepromer/{eeprog,eeprom,eepromer} $RPM_BUILD_ROOT%{_sbindir}
+cp -p eepromer/{eeprog,eeprom,eepromer}.8 $RPM_BUILD_ROOT%{_mandir}/man8
+
 # enhanced (more 2.4-compatible) private copy; public header already in llh
 %{__rm} $RPM_BUILD_ROOT%{_includedir}/linux/i2c-dev.h
 
@@ -49,18 +79,34 @@ rm -rf $RPM_BUILD_ROOT
 
 %files
 %defattr(644,root,root,755)
-%doc CHANGES README
+%doc CHANGES README eepromer/README.ee*
 %attr(755,root,root) %{_bindir}/ddcmon
 %attr(755,root,root) %{_bindir}/decode-dimms
 %attr(755,root,root) %{_bindir}/decode-edid
 %attr(755,root,root) %{_bindir}/decode-vaio
+%attr(755,root,root) %{_sbindir}/eeprog
+%attr(755,root,root) %{_sbindir}/eeprom
+%attr(755,root,root) %{_sbindir}/eepromer
 %attr(755,root,root) %{_sbindir}/i2cdetect
 %attr(755,root,root) %{_sbindir}/i2cdump
 %attr(755,root,root) %{_sbindir}/i2cget
 %attr(755,root,root) %{_sbindir}/i2cset
 %attr(755,root,root) %{_sbindir}/i2c-stub-from-dump
+%{_mandir}/man1/decode-dimms.1*
+%{_mandir}/man1/decode-vaio.1*
 %{_mandir}/man8/i2cdetect.8*
+%{_mandir}/man8/eeprog.8*
+%{_mandir}/man8/eeprom.8*
+%{_mandir}/man8/eepromer.8*
 %{_mandir}/man8/i2cdump.8*
 %{_mandir}/man8/i2cget.8*
 %{_mandir}/man8/i2cset.8*
 %{_mandir}/man8/i2c-stub-from-dump.8*
+
+%if %{with python}
+%files -n python-smbus
+%defattr(644,root,root,755)
+%doc py-smbus/README
+%attr(755,root,root) %{py_sitedir}/smbus.so
+%{py_sitedir}/smbus-1.1-py*.egg-info
+%endif
diff --git a/i2c-tools-python.patch b/i2c-tools-python.patch
new file mode 100644
index 0000000..5d920d8
--- /dev/null
+++ b/i2c-tools-python.patch
@@ -0,0 +1,11 @@
+--- i2c-tools-3.1.1/py-smbus/Module.mk.orig	2014-02-20 09:37:15.711233000 +0100
++++ i2c-tools-3.1.1/py-smbus/Module.mk	2014-02-27 21:50:56.450488260 +0100
+@@ -22,7 +22,7 @@
+ 	rm -rf py-smbus/build
+ 
+ install-python:
+-	$(DISTUTILS) install
++	$(DISTUTILS) install --optimize=2 --root=$(DESTDIR)
+ 
+ all: all-python
+ 
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/i2c-tools.git/commitdiff/87778d89c374fef2ec77fa24ad70a4f2b833f06b



More information about the pld-cvs-commit mailing list