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