]>
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 | |
e9ab11f9 JB |
13 | Version: 21 |
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 |
e9ab11f9 | 18 | # Source0-md5: ee246fab2e1cba9fbdcad6a86ec31531 |
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 AG |
126 | |
127 | %build | |
128 | %{__libtoolize} | |
129 | %{__aclocal} -I m4 | |
130 | %{__autoconf} | |
131 | %{__autoheader} | |
132 | %{__automake} | |
133 | %configure \ | |
223cf71b | 134 | --disable-silent-rules \ |
e9ab11f9 | 135 | --disable-test-modules \ |
87d6eac2 | 136 | --enable-python \ |
7ff317f4 | 137 | --with-rootlibdir=/%{_lib} \ |
0cbdbf08 AG |
138 | --with-xz \ |
139 | --with-zlib | |
140 | %{__make} | |
141 | ||
2b79c875 | 142 | %{?with_tests:%{__make} check KDIR=%{_kernelsrcdir} KVER=%{_kernel_ver}} |
bdac6c65 | 143 | |
0cbdbf08 AG |
144 | %install |
145 | rm -rf $RPM_BUILD_ROOT | |
5f253112 | 146 | install -d $RPM_BUILD_ROOT/etc/modprobe.d |
0cbdbf08 AG |
147 | %{__make} install \ |
148 | pkgconfigdir=%{_pkgconfigdir} \ | |
149 | DESTDIR=$RPM_BUILD_ROOT | |
150 | ||
151 | # install symlinks | |
152 | for prog in lsmod rmmod insmod modinfo modprobe depmod; do | |
7ff317f4 | 153 | ln -s kmod $RPM_BUILD_ROOT%{_bindir}/$prog |
0cbdbf08 AG |
154 | done |
155 | ||
7ff317f4 | 156 | # obsoleted by pkg-config |
223cf71b | 157 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/libkmod.la |
354c802b | 158 | |
064bf341 ER |
159 | # not needed in python module |
160 | %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/kmod/*.la | |
161 | %py_postclean | |
162 | ||
5f253112 AM |
163 | :> $RPM_BUILD_ROOT/etc/modprobe.d/modprobe.conf |
164 | ||
1904028e ER |
165 | cp -p %{SOURCE1} $RPM_BUILD_ROOT/etc/modprobe.d/blacklist.conf |
166 | cp -p %{SOURCE2} $RPM_BUILD_ROOT/etc/modprobe.d/usb.conf | |
5f253112 | 167 | |
0cbdbf08 AG |
168 | %clean |
169 | rm -rf $RPM_BUILD_ROOT | |
170 | ||
34910362 JB |
171 | %post libs -p /sbin/ldconfig |
172 | %postun libs -p /sbin/ldconfig | |
0cbdbf08 AG |
173 | |
174 | %files | |
175 | %defattr(644,root,root,755) | |
176 | %doc NEWS README TODO | |
5f253112 | 177 | %dir /etc/modprobe.d |
ea202d12 AG |
178 | %config(noreplace) %verify(not md5 mtime size) /etc/modprobe.d/blacklist.conf |
179 | %config(noreplace) %verify(not md5 mtime size) /etc/modprobe.d/modprobe.conf | |
180 | %config(noreplace) %verify(not md5 mtime size) /etc/modprobe.d/usb.conf | |
5f253112 | 181 | |
7ff317f4 JB |
182 | %attr(755,root,root) %{_bindir}/kmod |
183 | %attr(755,root,root) %{_bindir}/lsmod | |
184 | %attr(755,root,root) %{_bindir}/rmmod | |
185 | %attr(755,root,root) %{_bindir}/insmod | |
186 | %attr(755,root,root) %{_bindir}/modinfo | |
187 | %attr(755,root,root) %{_bindir}/modprobe | |
188 | %attr(755,root,root) %{_bindir}/depmod | |
0cbdbf08 | 189 | |
9d251755 AM |
190 | %{_mandir}/man5/depmod.d.5* |
191 | %{_mandir}/man5/modprobe.d.5* | |
192 | %{_mandir}/man5/modules.dep.5* | |
ea202d12 | 193 | %{_mandir}/man5/modules.dep.bin.5* |
9d251755 AM |
194 | %{_mandir}/man8/depmod.8* |
195 | %{_mandir}/man8/insmod.8* | |
c89b69e1 | 196 | %{_mandir}/man8/kmod.8* |
9d251755 AM |
197 | %{_mandir}/man8/lsmod.8* |
198 | %{_mandir}/man8/modinfo.8* | |
199 | %{_mandir}/man8/modprobe.8* | |
200 | %{_mandir}/man8/rmmod.8* | |
201 | ||
34910362 JB |
202 | %files libs |
203 | %defattr(644,root,root,755) | |
7ff317f4 JB |
204 | %attr(755,root,root) /%{_lib}/libkmod.so.*.*.* |
205 | %attr(755,root,root) %ghost /%{_lib}/libkmod.so.2 | |
34910362 | 206 | |
0cbdbf08 AG |
207 | %files devel |
208 | %defattr(644,root,root,755) | |
0af940e5 | 209 | %doc libkmod/README |
354c802b ER |
210 | %attr(755,root,root) %{_libdir}/libkmod.so |
211 | %{_includedir}/libkmod.h | |
212 | %{_pkgconfigdir}/libkmod.pc | |
34e8b922 JB |
213 | |
214 | %files -n bash-completion-kmod | |
215 | %defattr(644,root,root,755) | |
216 | %{_datadir}/bash-completion/completions/kmod | |
87d6eac2 AM |
217 | |
218 | %files -n python-kmod | |
219 | %defattr(644,root,root,755) | |
220 | %dir %{py_sitedir}/kmod | |
221 | %attr(755,root,root) %{py_sitedir}/kmod/*.so | |
064bf341 | 222 | %{py_sitedir}/kmod/*.py[co] |