3 %bcond_without python # (any) Python smbus module
4 %bcond_without python2 # CPython 2.x smbus module
5 %bcond_without python3 # CPython 3.x smbus module
7 Summary: I2C tools for Linux
8 Summary(en.UTF-8): I²C tools for Linux
9 Summary(pl.UTF-8): Narzędzia I²C dla Linuksa
14 Group: Applications/System
15 Source0: https://www.kernel.org/pub/software/utils/i2c-tools/%{name}-%{version}.tar.xz
16 # Source0-md5: e2981debb4a822a279be7e45a0ede988
17 Patch0: %{name}-python.patch
18 URL: https://i2c.wiki.kernel.org/index.php/I2C_Tools
19 BuildRequires: perl-modules >= 1:5.6
21 %{?with_python2:BuildRequires: python-devel >= 2}
22 %{?with_python3:BuildRequires: python3-devel >= 1:3.2}
24 BuildRequires: rpm-perlprov >= 3.0.3-16
25 BuildRequires: rpm-pythonprov >= 1.714
26 Requires: dev >= 2.9.0-13
27 Requires: libi2c = %{version}-%{release}
28 Requires: uname(release) >= 2.6.5
29 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
34 %description -l en.UTF-8
37 %description -l pl.UTF-8
38 Narzędzia I²C dla Linuksa.
41 Summary: I2C/SMBus bus access library
42 Summary(pl.UTF-8): Biblioteka dostępu do szyny I2C/SMBus
45 %description -n libi2c
46 I2C/SMBus bus access library.
48 %description -n libi2c -l pl.UTF-8
49 Biblioteka dostępu do szyny I2C/SMBus.
51 %package -n libi2c-devel
52 Summary: Header file for libi2c library
53 Summary(pl.UTF-8): Plik nagłówkowy biblioteki libi2c
54 Group: Development/Libraries
55 Requires: libi2c = %{version}-%{release}
57 %description -n libi2c-devel
58 Header file for libi2c library.
60 %description -n libi2c-devel -l pl.UTF-8
61 Plik nagłówkowy biblioteki libi2c.
63 %package -n libi2c-static
64 Summary: Static libi2c library
65 Summary(pl.UTF-8): Statyczna biblioteka libi2c
66 Group: Development/Libraries
67 Requires: libi2c-devel = %{version}-%{release}
69 %description -n libi2c-static
70 Static libi2c library.
72 %description -n libi2c-static -l pl.UTF-8
73 Statyczna biblioteka libi2c.
75 %package -n python-smbus
76 Summary: Python 2 SMBus module
77 Summary(pl.UTF-8): Moduł Pythona 2 SMBus
78 Group: Libraries/Python
79 Requires: libi2c = %{version}-%{release}
81 %description -n python-smbus
82 Python 2 bindings for Linux SMBus access through i2c-dev.
84 %description -n python-smbus -l pl.UTF-8
85 Wiązania Pythona 2 służące do dostępu do szyny SMBus spod Linuksa
88 %package -n python3-smbus
89 Summary: Python 3 SMBus module
90 Summary(pl.UTF-8): Moduł Pythona 3 SMBus
91 Group: Libraries/Python
92 Requires: libi2c = %{version}-%{release}
94 %description -n python3-smbus
95 Python 3 bindings for Linux SMBus access through i2c-dev.
97 %description -n python3-smbus -l pl.UTF-8
98 Wiązania Pythona 3 służące do dostępu do szyny SMBus spod Linuksa
105 %{__mv} eepromer/{README,README.eeproms}
110 CFLAGS="%{rpmcflags}" \
113 %{__make} -C eepromer \
115 CFLAGS="%{rpmcflags} -I../include -Wall"
128 rm -rf $RPM_BUILD_ROOT
131 DESTDIR=$RPM_BUILD_ROOT \
136 install eepromer/{eeprom,eepromer} $RPM_BUILD_ROOT%{_sbindir}
137 cp -p eepromer/{eeprom,eepromer}.8 $RPM_BUILD_ROOT%{_mandir}/man8
150 rm -rf $RPM_BUILD_ROOT
152 %post -n libi2c -p /sbin/ldconfig
153 %postun -n libi2c -p /sbin/ldconfig
156 %defattr(644,root,root,755)
157 %doc CHANGES README eeprog/README.eeprog eepromer/README.ee*
158 %attr(755,root,root) %{_bindir}/ddcmon
159 %attr(755,root,root) %{_bindir}/decode-dimms
160 %attr(755,root,root) %{_bindir}/decode-edid
161 %attr(755,root,root) %{_bindir}/decode-vaio
162 %attr(755,root,root) %{_sbindir}/eeprog
163 %attr(755,root,root) %{_sbindir}/eeprom
164 %attr(755,root,root) %{_sbindir}/eepromer
165 %attr(755,root,root) %{_sbindir}/i2cdetect
166 %attr(755,root,root) %{_sbindir}/i2cdump
167 %attr(755,root,root) %{_sbindir}/i2cget
168 %attr(755,root,root) %{_sbindir}/i2cset
169 %attr(755,root,root) %{_sbindir}/i2ctransfer
170 %attr(755,root,root) %{_sbindir}/i2c-stub-from-dump
171 %{_mandir}/man1/decode-dimms.1*
172 %{_mandir}/man1/decode-vaio.1*
173 %{_mandir}/man8/i2cdetect.8*
174 %{_mandir}/man8/eeprog.8*
175 %{_mandir}/man8/eeprom.8*
176 %{_mandir}/man8/eepromer.8*
177 %{_mandir}/man8/i2cdump.8*
178 %{_mandir}/man8/i2cget.8*
179 %{_mandir}/man8/i2cset.8*
180 %{_mandir}/man8/i2ctransfer.8*
181 %{_mandir}/man8/i2c-stub-from-dump.8*
184 %defattr(644,root,root,755)
185 %attr(755,root,root) %{_libdir}/libi2c.so.*.*.*
186 %attr(755,root,root) %ghost %{_libdir}/libi2c.so.0
188 %files -n libi2c-devel
189 %defattr(644,root,root,755)
190 %attr(755,root,root) %{_libdir}/libi2c.so
191 %dir %{_includedir}/i2c
192 %{_includedir}/i2c/smbus.h
194 %files -n libi2c-static
195 %defattr(644,root,root,755)
199 %files -n python-smbus
200 %defattr(644,root,root,755)
202 %attr(755,root,root) %{py_sitedir}/smbus.so
203 %{py_sitedir}/smbus-1.1-py*.egg-info
207 %files -n python3-smbus
208 %defattr(644,root,root,755)
210 %attr(755,root,root) %{py3_sitedir}/smbus.cpython-*.so
211 %{py3_sitedir}/smbus-1.1-py*.egg-info