]>
Commit | Line | Data |
---|---|---|
ab5d2067 AM |
1 | # TODO: |
2 | # - implement /etc/modprobe.d/kver/ support (just as in our module-init-tools) | |
7ea69ece | 3 | # - modprobe keeps "-" in module names: sprunge.us/dYCZ (probably irrelevant) |
60e11f6d JB |
4 | # |
5 | # Conditional build: | |
6 | %bcond_with tests # perform "make check" (init_module seems to require root for mkdir) | |
7 | # | |
0cbdbf08 AG |
8 | Summary: Linux kernel module handling |
9 | Summary(pl.UTF-8): Obsługa modułów jądra Linuksa | |
10 | Name: kmod | |
93ac00d5 | 11 | Version: 10 |
3b166d2d | 12 | Release: 2 |
34910362 | 13 | License: GPL v2+ |
223cf71b | 14 | Group: Applications/System |
f48c0983 | 15 | Source0: ftp://ftp.kernel.org/pub/linux/utils/kernel/kmod/%{name}-%{version}.tar.xz |
93ac00d5 | 16 | # Source0-md5: e2a883c4df15a50f78a7a61d5b64089f |
ea202d12 AG |
17 | Source1: %{name}-blacklist |
18 | Source2: %{name}-usb | |
598b4505 | 19 | URL: http://git.kernel.org/?p=utils/kernel/kmod/kmod.git;a=summary |
223cf71b JB |
20 | BuildRequires: autoconf >= 2.60 |
21 | BuildRequires: automake >= 1:1.11 | |
34910362 | 22 | BuildRequires: gtk-doc >= 1.14 |
223cf71b | 23 | BuildRequires: libtool >= 2:2.0 |
a01f33dc | 24 | BuildRequires: pkgconfig |
0cbdbf08 AG |
25 | BuildRequires: xz-devel >= 1:4.99 |
26 | BuildRequires: zlib-devel | |
34910362 | 27 | Requires: %{name}-libs = %{version}-%{release} |
512a3cb5 AM |
28 | # won't work on older kernels as these do not provide require information in /sys |
29 | Requires: uname(release) >= 2.6.21 | |
c7e58ea9 | 30 | Provides: virtual(module-tools) |
995ea127 | 31 | Obsoletes: module-init-tools |
0cbdbf08 AG |
32 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
33 | ||
354c802b | 34 | %define _exec_prefix / |
223cf71b | 35 | %define _bindir %{_sbindir} |
0cbdbf08 AG |
36 | |
37 | %description | |
38 | kmod is a set of tools to handle common tasks with Linux kernel | |
39 | modules like insert, remove, list, check properties, resolve | |
40 | dependencies and aliases. | |
41 | ||
42 | These tools are designed on top of libkmod, a library that is shipped | |
43 | with kmod. See libkmod/README for more details on this library and how | |
44 | to use it. The aim is to be compatible with tools, configurations and | |
45 | indexes from module-init-tools project. | |
46 | ||
47 | %description -l pl.UTF-8 | |
48 | kmod to zestaw narzędzi do wykonywania typowych czynności związanych z | |
49 | modułami jądra - ładowanie, usuwanie, listowanie, sprawdzanie | |
50 | parametrów, rozwiązywanie zależności czy obsługa aliasów. | |
51 | ||
52 | Narzędzia te zostały stworzone przy użyciu libkmod, biblioteki | |
53 | dostarczanej wraz z kmod. Celem jest stworzenie narzędzi | |
54 | kompatybilnych z programami, konfiguracją oraz indeksami z projektu | |
55 | module-init-tools. | |
56 | ||
34910362 JB |
57 | %package libs |
58 | Summary: Linux kernel module handling library | |
59 | Summary(pl.UTF-8): Biblioteka do obsługi modułów jądra Linuksa | |
60 | License: LGPL v2.1+ | |
61 | Group: Libraries | |
62 | Conflicts: kmod < 4-1 | |
63 | ||
64 | %description libs | |
65 | libkmod was created to allow programs to easily insert, remove and | |
66 | list modules, also checking its properties, dependencies and aliases. | |
67 | ||
68 | %description libs -l pl.UTF-8 | |
ea202d12 AG |
69 | Biblioteka libkmod została zaprojektowana, aby pozwolić programom w |
70 | łatwy sposób ładować, usuwać i listować moduły, także sprawdzając ich | |
71 | właściwości, zależności i aliasy. | |
34910362 | 72 | |
10bee1d6 JR |
73 | %package libs-static |
74 | Summary: Linux kernel module handling static library | |
75 | Summary(pl.UTF-8): Statyczna biblioteka do obsługi modułów jądra Linuksa | |
76 | License: LGPL v2.1+ | |
77 | Group: Libraries | |
78 | Requires: %{name}-devel = %{version}-%{release} | |
79 | ||
80 | %description libs-static | |
81 | Linux kernel module handling static library. | |
82 | ||
83 | %description libs-static -l pl.UTF-8 | |
84 | Statyczna biblioteka do obsługi modułów jądra Linuksa. | |
85 | ||
0cbdbf08 AG |
86 | %package devel |
87 | Summary: Header files for %{name} library | |
88 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki %{name} | |
34910362 | 89 | License: LGPL v2.1+ |
0cbdbf08 | 90 | Group: Development/Libraries |
34910362 | 91 | Requires: %{name}-libs = %{version}-%{release} |
0cbdbf08 AG |
92 | |
93 | %description devel | |
94 | Header files for %{name} library. | |
95 | ||
96 | %description devel -l pl.UTF-8 | |
97 | Pliki nagłówkowe biblioteki %{name}. | |
98 | ||
99 | %prep | |
100 | %setup -q | |
101 | ||
102 | %build | |
103 | %{__libtoolize} | |
104 | %{__aclocal} -I m4 | |
105 | %{__autoconf} | |
106 | %{__autoheader} | |
107 | %{__automake} | |
108 | %configure \ | |
10bee1d6 | 109 | --enable-static \ |
223cf71b | 110 | --disable-silent-rules \ |
0cbdbf08 AG |
111 | --with-xz \ |
112 | --with-zlib | |
113 | %{__make} | |
114 | ||
bdac6c65 AM |
115 | %{?with_tests:%{__make} check} |
116 | ||
0cbdbf08 AG |
117 | %install |
118 | rm -rf $RPM_BUILD_ROOT | |
5f253112 AM |
119 | install -d $RPM_BUILD_ROOT/etc/modprobe.d |
120 | ||
0cbdbf08 AG |
121 | %{__make} install \ |
122 | pkgconfigdir=%{_pkgconfigdir} \ | |
123 | DESTDIR=$RPM_BUILD_ROOT | |
124 | ||
125 | # install symlinks | |
126 | for prog in lsmod rmmod insmod modinfo modprobe depmod; do | |
354c802b | 127 | ln -s kmod $RPM_BUILD_ROOT%{_sbindir}/$prog |
0cbdbf08 AG |
128 | done |
129 | ||
10bee1d6 | 130 | %{__mv} $RPM_BUILD_ROOT%{_libdir}/libkmod.a $RPM_BUILD_ROOT%{_prefix}/%{_lib} |
223cf71b | 131 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/libkmod.la |
354c802b | 132 | |
5f253112 AM |
133 | :> $RPM_BUILD_ROOT/etc/modprobe.d/modprobe.conf |
134 | ||
135 | install %{SOURCE1} $RPM_BUILD_ROOT/etc/modprobe.d/blacklist.conf | |
136 | install %{SOURCE2} $RPM_BUILD_ROOT/etc/modprobe.d/usb.conf | |
137 | ||
0cbdbf08 AG |
138 | %clean |
139 | rm -rf $RPM_BUILD_ROOT | |
140 | ||
34910362 JB |
141 | %post libs -p /sbin/ldconfig |
142 | %postun libs -p /sbin/ldconfig | |
0cbdbf08 AG |
143 | |
144 | %files | |
145 | %defattr(644,root,root,755) | |
146 | %doc NEWS README TODO | |
5f253112 | 147 | %dir /etc/modprobe.d |
ea202d12 AG |
148 | %config(noreplace) %verify(not md5 mtime size) /etc/modprobe.d/blacklist.conf |
149 | %config(noreplace) %verify(not md5 mtime size) /etc/modprobe.d/modprobe.conf | |
150 | %config(noreplace) %verify(not md5 mtime size) /etc/modprobe.d/usb.conf | |
5f253112 | 151 | |
0cbdbf08 AG |
152 | %attr(755,root,root) %{_sbindir}/kmod |
153 | %attr(755,root,root) %{_sbindir}/lsmod | |
154 | %attr(755,root,root) %{_sbindir}/rmmod | |
155 | %attr(755,root,root) %{_sbindir}/insmod | |
156 | %attr(755,root,root) %{_sbindir}/modinfo | |
157 | %attr(755,root,root) %{_sbindir}/modprobe | |
158 | %attr(755,root,root) %{_sbindir}/depmod | |
0cbdbf08 | 159 | |
9d251755 AM |
160 | %{_mandir}/man5/depmod.d.5* |
161 | %{_mandir}/man5/modprobe.d.5* | |
162 | %{_mandir}/man5/modules.dep.5* | |
ea202d12 | 163 | %{_mandir}/man5/modules.dep.bin.5* |
9d251755 AM |
164 | %{_mandir}/man8/depmod.8* |
165 | %{_mandir}/man8/insmod.8* | |
166 | %{_mandir}/man8/lsmod.8* | |
167 | %{_mandir}/man8/modinfo.8* | |
168 | %{_mandir}/man8/modprobe.8* | |
169 | %{_mandir}/man8/rmmod.8* | |
170 | ||
34910362 JB |
171 | %files libs |
172 | %defattr(644,root,root,755) | |
173 | %doc libkmod/README | |
174 | %attr(755,root,root) %{_libdir}/libkmod.so.*.*.* | |
ea202d12 | 175 | %attr(755,root,root) %ghost %{_libdir}/libkmod.so.2 |
34910362 | 176 | |
10bee1d6 JR |
177 | %files libs-static |
178 | %defattr(644,root,root,755) | |
179 | %{_prefix}/%{_lib}/libkmod.a | |
180 | ||
0cbdbf08 AG |
181 | %files devel |
182 | %defattr(644,root,root,755) | |
354c802b ER |
183 | %attr(755,root,root) %{_libdir}/libkmod.so |
184 | %{_includedir}/libkmod.h | |
185 | %{_pkgconfigdir}/libkmod.pc |