]>
Commit | Line | Data |
---|---|---|
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: |
335eb04a | 8 | %bcond_without tests # perform "make check" (init_module seems to require root for mkdir) |
5c0bad5f | 9 | |
0cbdbf08 AG |
10 | Summary: Linux kernel module handling |
11 | Summary(pl.UTF-8): Obsługa modułów jądra Linuksa | |
12 | Name: kmod | |
214463da JB |
13 | Version: 20 |
14 | Release: 1 | |
34910362 | 15 | License: GPL v2+ |
223cf71b | 16 | Group: Applications/System |
34e8b922 | 17 | Source0: https://www.kernel.org/pub/linux/utils/kernel/kmod/%{name}-%{version}.tar.xz |
214463da | 18 | # Source0-md5: d6f4fef718a50bd88080de6a43bc64d8 |
ea202d12 AG |
19 | Source1: %{name}-blacklist |
20 | Source2: %{name}-usb | |
185589bc | 21 | Patch0: %{name}-modprobe.d-kver.patch |
598b4505 | 22 | URL: http://git.kernel.org/?p=utils/kernel/kmod/kmod.git;a=summary |
223cf71b JB |
23 | BuildRequires: autoconf >= 2.60 |
24 | BuildRequires: automake >= 1:1.11 | |
34910362 | 25 | BuildRequires: gtk-doc >= 1.14 |
2b79c875 | 26 | BuildRequires: kernel-module-build |
223cf71b | 27 | BuildRequires: libtool >= 2:2.0 |
a01f33dc | 28 | BuildRequires: pkgconfig |
87d6eac2 AM |
29 | BuildRequires: python-devel |
30 | BuildRequires: rpm-pythonprov | |
064bf341 | 31 | BuildRequires: rpmbuild(macros) >= 1.219 |
d7e51de2 JB |
32 | BuildRequires: tar >= 1:1.22 |
33 | BuildRequires: xz | |
0cbdbf08 AG |
34 | BuildRequires: xz-devel >= 1:4.99 |
35 | BuildRequires: zlib-devel | |
512a3cb5 AM |
36 | # won't work on older kernels as these do not provide require information in /sys |
37 | Requires: uname(release) >= 2.6.21 | |
198a4cc1 | 38 | Provides: module-init-tools = 4.0 |
1904028e | 39 | Provides: virtual(module-tools) |
198a4cc1 | 40 | Obsoletes: module-init-tools < 4.0 |
0cbdbf08 AG |
41 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
42 | ||
7ff317f4 | 43 | %define _bindir /sbin |
0cbdbf08 AG |
44 | |
45 | %description | |
46 | kmod is a set of tools to handle common tasks with Linux kernel | |
47 | modules like insert, remove, list, check properties, resolve | |
48 | dependencies and aliases. | |
49 | ||
50 | These tools are designed on top of libkmod, a library that is shipped | |
51 | with kmod. See libkmod/README for more details on this library and how | |
52 | to use it. The aim is to be compatible with tools, configurations and | |
53 | indexes from module-init-tools project. | |
54 | ||
55 | %description -l pl.UTF-8 | |
56 | kmod to zestaw narzędzi do wykonywania typowych czynności związanych z | |
57 | modułami jądra - ładowanie, usuwanie, listowanie, sprawdzanie | |
58 | parametrów, rozwiązywanie zależności czy obsługa aliasów. | |
59 | ||
60 | Narzędzia te zostały stworzone przy użyciu libkmod, biblioteki | |
61 | dostarczanej wraz z kmod. Celem jest stworzenie narzędzi | |
62 | kompatybilnych z programami, konfiguracją oraz indeksami z projektu | |
63 | module-init-tools. | |
64 | ||
34910362 JB |
65 | %package libs |
66 | Summary: Linux kernel module handling library | |
67 | Summary(pl.UTF-8): Biblioteka do obsługi modułów jądra Linuksa | |
68 | License: LGPL v2.1+ | |
69 | Group: Libraries | |
70 | Conflicts: kmod < 4-1 | |
71 | ||
72 | %description libs | |
73 | libkmod was created to allow programs to easily insert, remove and | |
74 | list modules, also checking its properties, dependencies and aliases. | |
75 | ||
76 | %description libs -l pl.UTF-8 | |
ea202d12 AG |
77 | Biblioteka libkmod została zaprojektowana, aby pozwolić programom w |
78 | łatwy sposób ładować, usuwać i listować moduły, także sprawdzając ich | |
79 | właściwości, zależności i aliasy. | |
34910362 | 80 | |
0cbdbf08 AG |
81 | %package devel |
82 | Summary: Header files for %{name} library | |
83 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki %{name} | |
34910362 | 84 | License: LGPL v2.1+ |
0cbdbf08 | 85 | Group: Development/Libraries |
34910362 | 86 | Requires: %{name}-libs = %{version}-%{release} |
d9def0be | 87 | Obsoletes: kmod-libs-static |
0cbdbf08 AG |
88 | |
89 | %description devel | |
90 | Header files for %{name} library. | |
91 | ||
92 | %description devel -l pl.UTF-8 | |
93 | Pliki nagłówkowe biblioteki %{name}. | |
94 | ||
34e8b922 JB |
95 | %package -n bash-completion-kmod |
96 | Summary: bash-completion for kmod utilities | |
97 | Summary(pl.UTF-8): Bashowe uzupełnianie nazw dla narzędzi kmod | |
98 | Group: Applications/Shells | |
99 | Requires: bash-completion >= 2.0 | |
907cd13b ER |
100 | %if "%{_rpmversion}" >= "5" |
101 | BuildArch: noarch | |
102 | %endif | |
34e8b922 JB |
103 | |
104 | %description -n bash-completion-kmod | |
105 | bash-completion for kmod utilities. | |
106 | ||
107 | %description -n bash-completion-kmod -l pl.UTF-8 | |
108 | Bashowe uzupełnianie nazw dla narzędzi kmod. | |
109 | ||
87d6eac2 | 110 | %package -n python-kmod |
ff466d50 JB |
111 | Summary: Python binding for kmod API |
112 | Summary(pl.UTF-8): Wiązania Pythona do API kmod | |
113 | License: LGPL v2.1+ | |
87d6eac2 | 114 | Group: Development/Languages/Python |
064bf341 | 115 | Requires: %{name}-libs = %{version}-%{release} |
87d6eac2 AM |
116 | |
117 | %description -n python-kmod | |
ff466d50 | 118 | Python binding for kmod API. |
87d6eac2 AM |
119 | |
120 | %description -n python-kmod -l pl.UTF-8 | |
ff466d50 | 121 | Wiązania Pythona do API kmod. |
87d6eac2 | 122 | |
0cbdbf08 AG |
123 | %prep |
124 | %setup -q | |
185589bc | 125 | %patch0 -p1 |
0cbdbf08 | 126 | |
335eb04a | 127 | # requires root to work |
fba83af8 | 128 | sed -i -e 's#testsuite/test-modprobe# #g' Makefile.am |
335eb04a | 129 | |
0cbdbf08 AG |
130 | %build |
131 | %{__libtoolize} | |
132 | %{__aclocal} -I m4 | |
133 | %{__autoconf} | |
134 | %{__autoheader} | |
135 | %{__automake} | |
136 | %configure \ | |
223cf71b | 137 | --disable-silent-rules \ |
87d6eac2 | 138 | --enable-python \ |
7ff317f4 | 139 | --with-rootlibdir=/%{_lib} \ |
0cbdbf08 AG |
140 | --with-xz \ |
141 | --with-zlib | |
142 | %{__make} | |
143 | ||
2b79c875 | 144 | %{?with_tests:%{__make} check KDIR=%{_kernelsrcdir} KVER=%{_kernel_ver}} |
bdac6c65 | 145 | |
0cbdbf08 AG |
146 | %install |
147 | rm -rf $RPM_BUILD_ROOT | |
5f253112 | 148 | install -d $RPM_BUILD_ROOT/etc/modprobe.d |
0cbdbf08 AG |
149 | %{__make} install \ |
150 | pkgconfigdir=%{_pkgconfigdir} \ | |
151 | DESTDIR=$RPM_BUILD_ROOT | |
152 | ||
153 | # install symlinks | |
154 | for prog in lsmod rmmod insmod modinfo modprobe depmod; do | |
7ff317f4 | 155 | ln -s kmod $RPM_BUILD_ROOT%{_bindir}/$prog |
0cbdbf08 AG |
156 | done |
157 | ||
7ff317f4 | 158 | # obsoleted by pkg-config |
223cf71b | 159 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/libkmod.la |
354c802b | 160 | |
064bf341 ER |
161 | # not needed in python module |
162 | %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/kmod/*.la | |
163 | %py_postclean | |
164 | ||
5f253112 AM |
165 | :> $RPM_BUILD_ROOT/etc/modprobe.d/modprobe.conf |
166 | ||
1904028e ER |
167 | cp -p %{SOURCE1} $RPM_BUILD_ROOT/etc/modprobe.d/blacklist.conf |
168 | cp -p %{SOURCE2} $RPM_BUILD_ROOT/etc/modprobe.d/usb.conf | |
5f253112 | 169 | |
0cbdbf08 AG |
170 | %clean |
171 | rm -rf $RPM_BUILD_ROOT | |
172 | ||
34910362 JB |
173 | %post libs -p /sbin/ldconfig |
174 | %postun libs -p /sbin/ldconfig | |
0cbdbf08 AG |
175 | |
176 | %files | |
177 | %defattr(644,root,root,755) | |
178 | %doc NEWS README TODO | |
5f253112 | 179 | %dir /etc/modprobe.d |
ea202d12 AG |
180 | %config(noreplace) %verify(not md5 mtime size) /etc/modprobe.d/blacklist.conf |
181 | %config(noreplace) %verify(not md5 mtime size) /etc/modprobe.d/modprobe.conf | |
182 | %config(noreplace) %verify(not md5 mtime size) /etc/modprobe.d/usb.conf | |
5f253112 | 183 | |
7ff317f4 JB |
184 | %attr(755,root,root) %{_bindir}/kmod |
185 | %attr(755,root,root) %{_bindir}/lsmod | |
186 | %attr(755,root,root) %{_bindir}/rmmod | |
187 | %attr(755,root,root) %{_bindir}/insmod | |
188 | %attr(755,root,root) %{_bindir}/modinfo | |
189 | %attr(755,root,root) %{_bindir}/modprobe | |
190 | %attr(755,root,root) %{_bindir}/depmod | |
0cbdbf08 | 191 | |
9d251755 AM |
192 | %{_mandir}/man5/depmod.d.5* |
193 | %{_mandir}/man5/modprobe.d.5* | |
194 | %{_mandir}/man5/modules.dep.5* | |
ea202d12 | 195 | %{_mandir}/man5/modules.dep.bin.5* |
9d251755 AM |
196 | %{_mandir}/man8/depmod.8* |
197 | %{_mandir}/man8/insmod.8* | |
c89b69e1 | 198 | %{_mandir}/man8/kmod.8* |
9d251755 AM |
199 | %{_mandir}/man8/lsmod.8* |
200 | %{_mandir}/man8/modinfo.8* | |
201 | %{_mandir}/man8/modprobe.8* | |
202 | %{_mandir}/man8/rmmod.8* | |
203 | ||
34910362 JB |
204 | %files libs |
205 | %defattr(644,root,root,755) | |
7ff317f4 JB |
206 | %attr(755,root,root) /%{_lib}/libkmod.so.*.*.* |
207 | %attr(755,root,root) %ghost /%{_lib}/libkmod.so.2 | |
34910362 | 208 | |
0cbdbf08 AG |
209 | %files devel |
210 | %defattr(644,root,root,755) | |
0af940e5 | 211 | %doc libkmod/README |
354c802b ER |
212 | %attr(755,root,root) %{_libdir}/libkmod.so |
213 | %{_includedir}/libkmod.h | |
214 | %{_pkgconfigdir}/libkmod.pc | |
34e8b922 JB |
215 | |
216 | %files -n bash-completion-kmod | |
217 | %defattr(644,root,root,755) | |
218 | %{_datadir}/bash-completion/completions/kmod | |
87d6eac2 AM |
219 | |
220 | %files -n python-kmod | |
221 | %defattr(644,root,root,755) | |
222 | %dir %{py_sitedir}/kmod | |
223 | %attr(755,root,root) %{py_sitedir}/kmod/*.so | |
064bf341 | 224 | %{py_sitedir}/kmod/*.py[co] |