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