]> git.pld-linux.org Git - packages/i2c-tools.git/blame - i2c-tools.spec
- updated to 4.2
[packages/i2c-tools.git] / i2c-tools.spec
CommitLineData
87778d89
JB
1#
2# Conditional build:
a7b26859
JB
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
87778d89 6#
2634c43b
JB
7Summary: I2C tools for Linux
8Summary(en.UTF-8): I²C tools for Linux
9Summary(pl.UTF-8): Narzędzia I²C dla Linuksa
10Name: i2c-tools
7c0cf1e1
JB
11Version: 4.2
12Release: 1
2634c43b
JB
13License: GPL v2+
14Group: Applications/System
a7b26859 15Source0: https://www.kernel.org/pub/software/utils/i2c-tools/%{name}-%{version}.tar.xz
7c0cf1e1 16# Source0-md5: 766bd07923b30fde661c3515f1d0004a
87778d89 17Patch0: %{name}-python.patch
a7b26859 18URL: https://i2c.wiki.kernel.org/index.php/I2C_Tools
2634c43b 19BuildRequires: perl-modules >= 1:5.6
a7b26859
JB
20%if %{with python}
21%{?with_python2:BuildRequires: python-devel >= 2}
22%{?with_python3:BuildRequires: python3-devel >= 1:3.2}
23%endif
2634c43b 24BuildRequires: rpm-perlprov >= 3.0.3-16
a7b26859 25BuildRequires: rpm-pythonprov >= 1.714
2634c43b 26Requires: dev >= 2.9.0-13
a7b26859 27Requires: libi2c = %{version}-%{release}
2634c43b
JB
28Requires: uname(release) >= 2.6.5
29BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
30
31%description
32I2C tools for Linux.
33
34%description -l en.UTF-8
35I²C tools for Linux.
36
37%description -l pl.UTF-8
38Narzędzia I²C dla Linuksa.
39
a7b26859
JB
40%package -n libi2c
41Summary: I2C/SMBus bus access library
42Summary(pl.UTF-8): Biblioteka dostępu do szyny I2C/SMBus
43Group: Libraries
44
45%description -n libi2c
46I2C/SMBus bus access library.
47
48%description -n libi2c -l pl.UTF-8
49Biblioteka dostępu do szyny I2C/SMBus.
50
51%package -n libi2c-devel
52Summary: Header file for libi2c library
53Summary(pl.UTF-8): Plik nagłówkowy biblioteki libi2c
54Group: Development/Libraries
55Requires: libi2c = %{version}-%{release}
56
57%description -n libi2c-devel
58Header file for libi2c library.
59
60%description -n libi2c-devel -l pl.UTF-8
61Plik nagłówkowy biblioteki libi2c.
62
63%package -n libi2c-static
64Summary: Static libi2c library
65Summary(pl.UTF-8): Statyczna biblioteka libi2c
66Group: Development/Libraries
67Requires: libi2c-devel = %{version}-%{release}
68
69%description -n libi2c-static
70Static libi2c library.
71
72%description -n libi2c-static -l pl.UTF-8
73Statyczna biblioteka libi2c.
74
87778d89 75%package -n python-smbus
a7b26859
JB
76Summary: Python 2 SMBus module
77Summary(pl.UTF-8): Moduł Pythona 2 SMBus
87778d89 78Group: Libraries/Python
a7b26859 79Requires: libi2c = %{version}-%{release}
87778d89
JB
80
81%description -n python-smbus
a7b26859 82Python 2 bindings for Linux SMBus access through i2c-dev.
87778d89
JB
83
84%description -n python-smbus -l pl.UTF-8
a7b26859
JB
85Wiązania Pythona 2 służące do dostępu do szyny SMBus spod Linuksa
86poprzez i2c-dev.
87
88%package -n python3-smbus
89Summary: Python 3 SMBus module
90Summary(pl.UTF-8): Moduł Pythona 3 SMBus
91Group: Libraries/Python
92Requires: libi2c = %{version}-%{release}
93
94%description -n python3-smbus
95Python 3 bindings for Linux SMBus access through i2c-dev.
96
97%description -n python3-smbus -l pl.UTF-8
98Wiązania Pythona 3 służące do dostępu do szyny SMBus spod Linuksa
87778d89
JB
99poprzez i2c-dev.
100
2634c43b
JB
101%prep
102%setup -q
87778d89
JB
103%patch0 -p1
104
105%{__mv} eepromer/{README,README.eeproms}
2634c43b
JB
106
107%build
dfda6803 108%{__make} -j1 \
2634c43b 109 CC="%{__cc}" \
87778d89 110 CFLAGS="%{rpmcflags}" \
a7b26859 111 EXTRA="eeprog"
87778d89
JB
112
113%{__make} -C eepromer \
114 CC="%{__cc}" \
115 CFLAGS="%{rpmcflags} -I../include -Wall"
2634c43b 116
a7b26859
JB
117%if %{with python}
118cd py-smbus
119%if %{with python2}
120%py_build
121%endif
122%if %{with python3}
123%py3_build
124%endif
125%endif
126
2634c43b
JB
127%install
128rm -rf $RPM_BUILD_ROOT
129
130%{__make} install \
131 DESTDIR=$RPM_BUILD_ROOT \
a7b26859 132 EXTRA="eeprog" \
7940eb7d
JB
133 PREFIX=%{_prefix} \
134 libdir=%{_libdir}
2634c43b 135
a7b26859
JB
136install eepromer/{eeprom,eepromer} $RPM_BUILD_ROOT%{_sbindir}
137cp -p eepromer/{eeprom,eepromer}.8 $RPM_BUILD_ROOT%{_mandir}/man8
87778d89 138
a7b26859
JB
139%if %{with python}
140cd py-smbus
141%if %{with python2}
142%py_install
143%endif
144%if %{with python3}
145%py3_install
146%endif
147%endif
2634c43b
JB
148
149%clean
150rm -rf $RPM_BUILD_ROOT
151
a7b26859
JB
152%post -n libi2c -p /sbin/ldconfig
153%postun -n libi2c -p /sbin/ldconfig
154
2634c43b
JB
155%files
156%defattr(644,root,root,755)
a7b26859 157%doc CHANGES README eeprog/README.eeprog eepromer/README.ee*
2634c43b
JB
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
87778d89
JB
162%attr(755,root,root) %{_sbindir}/eeprog
163%attr(755,root,root) %{_sbindir}/eeprom
164%attr(755,root,root) %{_sbindir}/eepromer
2634c43b
JB
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
a7b26859 169%attr(755,root,root) %{_sbindir}/i2ctransfer
2634c43b 170%attr(755,root,root) %{_sbindir}/i2c-stub-from-dump
87778d89
JB
171%{_mandir}/man1/decode-dimms.1*
172%{_mandir}/man1/decode-vaio.1*
2634c43b 173%{_mandir}/man8/i2cdetect.8*
87778d89
JB
174%{_mandir}/man8/eeprog.8*
175%{_mandir}/man8/eeprom.8*
176%{_mandir}/man8/eepromer.8*
2634c43b
JB
177%{_mandir}/man8/i2cdump.8*
178%{_mandir}/man8/i2cget.8*
179%{_mandir}/man8/i2cset.8*
a7b26859 180%{_mandir}/man8/i2ctransfer.8*
2634c43b 181%{_mandir}/man8/i2c-stub-from-dump.8*
87778d89 182
a7b26859
JB
183%files -n libi2c
184%defattr(644,root,root,755)
185%attr(755,root,root) %{_libdir}/libi2c.so.*.*.*
186%attr(755,root,root) %ghost %{_libdir}/libi2c.so.0
187
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
7c0cf1e1 193%{_mandir}/man3/libi2c.3*
a7b26859
JB
194
195%files -n libi2c-static
196%defattr(644,root,root,755)
197%{_libdir}/libi2c.a
198
199%if %{with python2}
87778d89
JB
200%files -n python-smbus
201%defattr(644,root,root,755)
202%doc py-smbus/README
203%attr(755,root,root) %{py_sitedir}/smbus.so
204%{py_sitedir}/smbus-1.1-py*.egg-info
205%endif
a7b26859
JB
206
207%if %{with python3}
208%files -n python3-smbus
209%defattr(644,root,root,755)
210%doc py-smbus/README
211%attr(755,root,root) %{py3_sitedir}/smbus.cpython-*.so
212%{py3_sitedir}/smbus-1.1-py*.egg-info
213%endif
This page took 0.173611 seconds and 4 git commands to generate.