]> git.pld-linux.org Git - packages/kmod.git/blame - kmod.spec
- up to 27
[packages/kmod.git] / kmod.spec
CommitLineData
2bf65fe5
ER
1# TODO
2# - alias from /etc/modprobe.d/3.4.32.longterm-1/geninitrd.conf does not work for geninitrd
5c0bad5f
ER
3# - kmod no longer links with library dynamically since kmod-15:
4# kmod binary statically links to libkmod - if distro is only interested in
5# the kmod tool (for example in an initrd) it can refrain from installing the library
2bf65fe5 6#
60e11f6d 7# Conditional build:
016fc6ef 8%bcond_without openssl # OpenSSL support for PKCS7 signatures in modinfo
983e9111 9%bcond_without python3 # CPython 3.x module
335eb04a 10%bcond_without tests # perform "make check" (init_module seems to require root for mkdir)
5c0bad5f 11
0cbdbf08
AG
12Summary: Linux kernel module handling
13Summary(pl.UTF-8): Obsługa modułów jądra Linuksa
14Name: kmod
0a22daa7
AM
15Version: 27
16Release: 1
34910362 17License: GPL v2+
223cf71b 18Group: Applications/System
34e8b922 19Source0: https://www.kernel.org/pub/linux/utils/kernel/kmod/%{name}-%{version}.tar.xz
0a22daa7 20# Source0-md5: 3973a74786670d3062d89a827e266581
ea202d12
AG
21Source1: %{name}-blacklist
22Source2: %{name}-usb
185589bc 23Patch0: %{name}-modprobe.d-kver.patch
601b1eec 24Patch1: %{name}-depmod.d-kver.patch
142b5af7 25Patch2: python-3.8.patch
983e9111
JB
26URL: https://git.kernel.org/pub/scm/utils/kernel/kmod/kmod.git
27BuildRequires: autoconf >= 2.64
223cf71b 28BuildRequires: automake >= 1:1.11
34910362 29BuildRequires: gtk-doc >= 1.14
5e93fa11 30BuildRequires: kernel-module-build
223cf71b 31BuildRequires: libtool >= 2:2.0
016fc6ef 32%{?with_openssl:BuildRequires: openssl-devel >= 1.1.0}
a01f33dc 33BuildRequires: pkgconfig
983e9111
JB
34BuildRequires: python-devel >= 1:2.6
35%{?with_python3:BuildRequires: python3-devel >= 1:3.3}
87d6eac2 36BuildRequires: rpm-pythonprov
064bf341 37BuildRequires: rpmbuild(macros) >= 1.219
d7e51de2
JB
38BuildRequires: tar >= 1:1.22
39BuildRequires: xz
0cbdbf08
AG
40BuildRequires: xz-devel >= 1:4.99
41BuildRequires: zlib-devel
983e9111 42Requires: filesystem >= 4.0-24
512a3cb5
AM
43# won't work on older kernels as these do not provide require information in /sys
44Requires: uname(release) >= 2.6.21
198a4cc1 45Provides: module-init-tools = 4.0
1904028e 46Provides: virtual(module-tools)
198a4cc1 47Obsoletes: module-init-tools < 4.0
0cbdbf08
AG
48BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
49
7ff317f4 50%define _bindir /sbin
0cbdbf08
AG
51
52%description
53kmod is a set of tools to handle common tasks with Linux kernel
54modules like insert, remove, list, check properties, resolve
55dependencies and aliases.
56
57These tools are designed on top of libkmod, a library that is shipped
58with kmod. See libkmod/README for more details on this library and how
59to use it. The aim is to be compatible with tools, configurations and
60indexes from module-init-tools project.
61
62%description -l pl.UTF-8
63kmod to zestaw narzędzi do wykonywania typowych czynności związanych z
64modułami jądra - ładowanie, usuwanie, listowanie, sprawdzanie
65parametrów, rozwiązywanie zależności czy obsługa aliasów.
66
67Narzędzia te zostały stworzone przy użyciu libkmod, biblioteki
68dostarczanej wraz z kmod. Celem jest stworzenie narzędzi
69kompatybilnych z programami, konfiguracją oraz indeksami z projektu
70module-init-tools.
71
34910362
JB
72%package libs
73Summary: Linux kernel module handling library
74Summary(pl.UTF-8): Biblioteka do obsługi modułów jądra Linuksa
75License: LGPL v2.1+
76Group: Libraries
77Conflicts: kmod < 4-1
78
79%description libs
80libkmod was created to allow programs to easily insert, remove and
81list modules, also checking its properties, dependencies and aliases.
82
83%description libs -l pl.UTF-8
ea202d12
AG
84Biblioteka libkmod została zaprojektowana, aby pozwolić programom w
85łatwy sposób ładować, usuwać i listować moduły, także sprawdzając ich
86właściwości, zależności i aliasy.
34910362 87
0cbdbf08
AG
88%package devel
89Summary: Header files for %{name} library
90Summary(pl.UTF-8): Pliki nagłówkowe biblioteki %{name}
34910362 91License: LGPL v2.1+
0cbdbf08 92Group: Development/Libraries
34910362 93Requires: %{name}-libs = %{version}-%{release}
d9def0be 94Obsoletes: kmod-libs-static
0cbdbf08
AG
95
96%description devel
97Header files for %{name} library.
98
99%description devel -l pl.UTF-8
100Pliki nagłówkowe biblioteki %{name}.
101
34e8b922
JB
102%package -n bash-completion-kmod
103Summary: bash-completion for kmod utilities
104Summary(pl.UTF-8): Bashowe uzupełnianie nazw dla narzędzi kmod
105Group: Applications/Shells
106Requires: bash-completion >= 2.0
907cd13b
ER
107%if "%{_rpmversion}" >= "5"
108BuildArch: noarch
109%endif
34e8b922
JB
110
111%description -n bash-completion-kmod
112bash-completion for kmod utilities.
113
114%description -n bash-completion-kmod -l pl.UTF-8
115Bashowe uzupełnianie nazw dla narzędzi kmod.
116
87d6eac2 117%package -n python-kmod
983e9111
JB
118Summary: Python 2 binding for kmod API
119Summary(pl.UTF-8): Wiązania Pythona 2 do API kmod
ff466d50 120License: LGPL v2.1+
87d6eac2 121Group: Development/Languages/Python
064bf341 122Requires: %{name}-libs = %{version}-%{release}
87d6eac2
AM
123
124%description -n python-kmod
983e9111 125Python 2 binding for kmod API.
87d6eac2
AM
126
127%description -n python-kmod -l pl.UTF-8
983e9111
JB
128Wiązania Pythona 2 do API kmod.
129
130%package -n python3-kmod
131Summary: Python 3 binding for kmod API
132Summary(pl.UTF-8): Wiązania Pythona 3 do API kmod
133License: LGPL v2.1+
134Group: Development/Languages/Python
135Requires: %{name}-libs = %{version}-%{release}
136
137%description -n python3-kmod
138Python 3 binding for kmod API.
139
140%description -n python3-kmod -l pl.UTF-8
141Wiązania Pythona 3 do API kmod.
87d6eac2 142
0cbdbf08
AG
143%prep
144%setup -q
185589bc 145%patch0 -p1
601b1eec 146%patch1 -p1
142b5af7 147%patch2 -p1
0cbdbf08
AG
148
149%build
150%{__libtoolize}
151%{__aclocal} -I m4
152%{__autoconf}
153%{__autoheader}
154%{__automake}
983e9111
JB
155
156install -d build
157cd build
158../%configure \
159 --disable-silent-rules \
160 --disable-test-modules \
161 --enable-python \
016fc6ef 162 %{?with_openssl:--with-openssl} \
983e9111
JB
163 --with-rootlibdir=/%{_lib} \
164 --with-xz \
165 --with-zlib
166%{__make}
167cd ..
168
169%if %{with python3}
170install -d build-py3
171cd build-py3
172../%configure \
173 PYTHON=%{__python3} \
223cf71b 174 --disable-silent-rules \
e9ab11f9 175 --disable-test-modules \
87d6eac2 176 --enable-python \
7ff317f4 177 --with-rootlibdir=/%{_lib} \
0cbdbf08
AG
178 --with-xz \
179 --with-zlib
180%{__make}
983e9111
JB
181cd ..
182%endif
0cbdbf08 183
983e9111
JB
184%if %{with tests}
185%{__make} -C build check \
186 KDIR=%{_kernelsrcdir} \
187 KVER=%{_kernel_ver}
188%endif
bdac6c65 189
0cbdbf08
AG
190%install
191rm -rf $RPM_BUILD_ROOT
c9f1eb7c 192install -d $RPM_BUILD_ROOT{/etc,/lib}/{depmod.d,modprobe.d}
983e9111
JB
193
194%if %{with python3}
195%{__make} -C build-py3 install \
196 DESTDIR=$RPM_BUILD_ROOT
197%endif
198
199%{__make} -C build install \
0cbdbf08
AG
200 DESTDIR=$RPM_BUILD_ROOT
201
202# install symlinks
203for prog in lsmod rmmod insmod modinfo modprobe depmod; do
7ff317f4 204 ln -s kmod $RPM_BUILD_ROOT%{_bindir}/$prog
0cbdbf08
AG
205done
206
7ff317f4 207# obsoleted by pkg-config
223cf71b 208%{__rm} $RPM_BUILD_ROOT%{_libdir}/libkmod.la
354c802b 209
064bf341
ER
210# not needed in python module
211%{__rm} $RPM_BUILD_ROOT%{py_sitedir}/kmod/*.la
212%py_postclean
983e9111
JB
213%if %{with python3}
214%{__rm} $RPM_BUILD_ROOT%{py3_sitedir}/kmod/*.la
215%endif
064bf341 216
5f253112
AM
217:> $RPM_BUILD_ROOT/etc/modprobe.d/modprobe.conf
218
1904028e
ER
219cp -p %{SOURCE1} $RPM_BUILD_ROOT/etc/modprobe.d/blacklist.conf
220cp -p %{SOURCE2} $RPM_BUILD_ROOT/etc/modprobe.d/usb.conf
5f253112 221
0cbdbf08
AG
222%clean
223rm -rf $RPM_BUILD_ROOT
224
34910362
JB
225%post libs -p /sbin/ldconfig
226%postun libs -p /sbin/ldconfig
0cbdbf08
AG
227
228%files
229%defattr(644,root,root,755)
230%doc NEWS README TODO
ea202d12
AG
231%config(noreplace) %verify(not md5 mtime size) /etc/modprobe.d/blacklist.conf
232%config(noreplace) %verify(not md5 mtime size) /etc/modprobe.d/modprobe.conf
233%config(noreplace) %verify(not md5 mtime size) /etc/modprobe.d/usb.conf
5f253112 234
c9f1eb7c
JP
235%dir /etc/depmod.d
236%dir /lib/depmod.d
983e9111
JB
237%dir /lib/modprobe.d
238
7ff317f4
JB
239%attr(755,root,root) %{_bindir}/kmod
240%attr(755,root,root) %{_bindir}/lsmod
241%attr(755,root,root) %{_bindir}/rmmod
242%attr(755,root,root) %{_bindir}/insmod
243%attr(755,root,root) %{_bindir}/modinfo
244%attr(755,root,root) %{_bindir}/modprobe
245%attr(755,root,root) %{_bindir}/depmod
0cbdbf08 246
9d251755
AM
247%{_mandir}/man5/depmod.d.5*
248%{_mandir}/man5/modprobe.d.5*
249%{_mandir}/man5/modules.dep.5*
ea202d12 250%{_mandir}/man5/modules.dep.bin.5*
9d251755
AM
251%{_mandir}/man8/depmod.8*
252%{_mandir}/man8/insmod.8*
c89b69e1 253%{_mandir}/man8/kmod.8*
9d251755
AM
254%{_mandir}/man8/lsmod.8*
255%{_mandir}/man8/modinfo.8*
256%{_mandir}/man8/modprobe.8*
257%{_mandir}/man8/rmmod.8*
258
34910362
JB
259%files libs
260%defattr(644,root,root,755)
7ff317f4
JB
261%attr(755,root,root) /%{_lib}/libkmod.so.*.*.*
262%attr(755,root,root) %ghost /%{_lib}/libkmod.so.2
34910362 263
0cbdbf08
AG
264%files devel
265%defattr(644,root,root,755)
0af940e5 266%doc libkmod/README
354c802b
ER
267%attr(755,root,root) %{_libdir}/libkmod.so
268%{_includedir}/libkmod.h
269%{_pkgconfigdir}/libkmod.pc
34e8b922
JB
270
271%files -n bash-completion-kmod
272%defattr(644,root,root,755)
273%{_datadir}/bash-completion/completions/kmod
87d6eac2
AM
274
275%files -n python-kmod
276%defattr(644,root,root,755)
277%dir %{py_sitedir}/kmod
278%attr(755,root,root) %{py_sitedir}/kmod/*.so
064bf341 279%{py_sitedir}/kmod/*.py[co]
983e9111
JB
280
281%if %{with python3}
282%files -n python3-kmod
283%defattr(644,root,root,755)
284%dir %{py3_sitedir}/kmod
285%attr(755,root,root) %{py3_sitedir}/kmod/*.so
286%{py3_sitedir}/kmod/*.py
287%{py3_sitedir}/kmod/__pycache__
288%endif
This page took 0.165701 seconds and 4 git commands to generate.