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