]> git.pld-linux.org Git - packages/i2c-tools.git/blame - i2c-tools.spec
- noted working source URL
[packages/i2c-tools.git] / i2c-tools.spec
CommitLineData
87778d89
JB
1#
2# Conditional build:
3%bcond_without python # Python smbus module
4#
2634c43b
JB
5%include /usr/lib/rpm/macros.perl
6Summary: I2C tools for Linux
7Summary(en.UTF-8): I²C tools for Linux
8Summary(pl.UTF-8): Narzędzia I²C dla Linuksa
9Name: i2c-tools
0326d84a 10Version: 3.1.2
7e4d1f4a 11Release: 3
2634c43b
JB
12License: GPL v2+
13Group: Applications/System
ea428960
JB
14# lm-sensors.org is dead (Jul 2017, since a few months);
15# now releases are available at https://www.kernel.org/pub/software/utils/i2c-tools/
2634c43b 16Source0: http://dl.lm-sensors.org/i2c-tools/releases/%{name}-%{version}.tar.bz2
0326d84a 17# Source0-md5: 7104a1043d11a5e2c7b131614eb1b962
87778d89 18Patch0: %{name}-python.patch
2634c43b
JB
19URL: http://www.lm-sensors.org/wiki/I2CTools
20BuildRequires: perl-modules >= 1:5.6
87778d89 21%{?with_python:BuildRequires: python-devel >= 2}
2634c43b
JB
22BuildRequires: rpm-perlprov >= 3.0.3-16
23Requires: dev >= 2.9.0-13
24Requires: uname(release) >= 2.6.5
25BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
26
27%description
28I2C tools for Linux.
29
30%description -l en.UTF-8
31I²C tools for Linux.
32
33%description -l pl.UTF-8
34Narzędzia I²C dla Linuksa.
35
87778d89
JB
36%package -n python-smbus
37Summary: Python SMBus module
38Summary(pl.UTF-8): Moduł Pythona SMBus
39Group: Libraries/Python
40
41%description -n python-smbus
42Python bindings for Linux SMBus access through i2c-dev.
43
44%description -n python-smbus -l pl.UTF-8
45Wiązania Pythona służące do dostępu do szyny SMBus spod Linuksa
46poprzez i2c-dev.
47
2634c43b
JB
48%prep
49%setup -q
87778d89
JB
50%patch0 -p1
51
52%{__mv} eepromer/{README,README.eeproms}
2634c43b
JB
53
54%build
55%{__make} \
56 CC="%{__cc}" \
87778d89
JB
57 CFLAGS="%{rpmcflags}" \
58 %{?with_python:EXTRA=py-smbus}
59
60%{__make} -C eepromer \
61 CC="%{__cc}" \
62 CFLAGS="%{rpmcflags} -I../include -Wall"
2634c43b
JB
63
64%install
65rm -rf $RPM_BUILD_ROOT
66
67%{__make} install \
68 DESTDIR=$RPM_BUILD_ROOT \
87778d89 69 %{?with_python:EXTRA=py-smbus} \
2634c43b
JB
70 prefix=%{_prefix} \
71 mandir=%{_mandir}
72
87778d89
JB
73install eepromer/{eeprog,eeprom,eepromer} $RPM_BUILD_ROOT%{_sbindir}
74cp -p eepromer/{eeprog,eeprom,eepromer}.8 $RPM_BUILD_ROOT%{_mandir}/man8
75
2634c43b 76# enhanced (more 2.4-compatible) private copy; public header already in llh
894b83ec 77%{__rm} $RPM_BUILD_ROOT%{_includedir}/linux/i2c-dev.h
2634c43b
JB
78
79%clean
80rm -rf $RPM_BUILD_ROOT
81
82%files
83%defattr(644,root,root,755)
87778d89 84%doc CHANGES README eepromer/README.ee*
2634c43b
JB
85%attr(755,root,root) %{_bindir}/ddcmon
86%attr(755,root,root) %{_bindir}/decode-dimms
87%attr(755,root,root) %{_bindir}/decode-edid
88%attr(755,root,root) %{_bindir}/decode-vaio
87778d89
JB
89%attr(755,root,root) %{_sbindir}/eeprog
90%attr(755,root,root) %{_sbindir}/eeprom
91%attr(755,root,root) %{_sbindir}/eepromer
2634c43b
JB
92%attr(755,root,root) %{_sbindir}/i2cdetect
93%attr(755,root,root) %{_sbindir}/i2cdump
94%attr(755,root,root) %{_sbindir}/i2cget
95%attr(755,root,root) %{_sbindir}/i2cset
96%attr(755,root,root) %{_sbindir}/i2c-stub-from-dump
87778d89
JB
97%{_mandir}/man1/decode-dimms.1*
98%{_mandir}/man1/decode-vaio.1*
2634c43b 99%{_mandir}/man8/i2cdetect.8*
87778d89
JB
100%{_mandir}/man8/eeprog.8*
101%{_mandir}/man8/eeprom.8*
102%{_mandir}/man8/eepromer.8*
2634c43b
JB
103%{_mandir}/man8/i2cdump.8*
104%{_mandir}/man8/i2cget.8*
105%{_mandir}/man8/i2cset.8*
106%{_mandir}/man8/i2c-stub-from-dump.8*
87778d89
JB
107
108%if %{with python}
109%files -n python-smbus
110%defattr(644,root,root,755)
111%doc py-smbus/README
112%attr(755,root,root) %{py_sitedir}/smbus.so
113%{py_sitedir}/smbus-1.1-py*.egg-info
114%endif
This page took 0.07421 seconds and 4 git commands to generate.