]> git.pld-linux.org Git - packages/kmod.git/blob - kmod.spec
- updated to 21
[packages/kmod.git] / kmod.spec
1 # TODO
2 # - alias from /etc/modprobe.d/3.4.32.longterm-1/geninitrd.conf does not work for geninitrd
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
6 #
7 # Conditional build:
8 %bcond_without  tests   # perform "make check" (init_module seems to require root for mkdir)
9
10 Summary:        Linux kernel module handling
11 Summary(pl.UTF-8):      Obsługa modułów jądra Linuksa
12 Name:           kmod
13 Version:        21
14 Release:        1
15 License:        GPL v2+
16 Group:          Applications/System
17 Source0:        https://www.kernel.org/pub/linux/utils/kernel/kmod/%{name}-%{version}.tar.xz
18 # Source0-md5:  ee246fab2e1cba9fbdcad6a86ec31531
19 Source1:        %{name}-blacklist
20 Source2:        %{name}-usb
21 Patch0:         %{name}-modprobe.d-kver.patch
22 URL:            http://git.kernel.org/?p=utils/kernel/kmod/kmod.git;a=summary
23 BuildRequires:  autoconf >= 2.60
24 BuildRequires:  automake >= 1:1.11
25 BuildRequires:  gtk-doc >= 1.14
26 BuildRequires:  kernel-module-build
27 BuildRequires:  libtool >= 2:2.0
28 BuildRequires:  pkgconfig
29 BuildRequires:  python-devel
30 BuildRequires:  rpm-pythonprov
31 BuildRequires:  rpmbuild(macros) >= 1.219
32 BuildRequires:  tar >= 1:1.22
33 BuildRequires:  xz
34 BuildRequires:  xz-devel >= 1:4.99
35 BuildRequires:  zlib-devel
36 # won't work on older kernels as these do not provide require information in /sys
37 Requires:       uname(release) >= 2.6.21
38 Provides:       module-init-tools = 4.0
39 Provides:       virtual(module-tools)
40 Obsoletes:      module-init-tools < 4.0
41 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
42
43 %define         _bindir         /sbin
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
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
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.
80
81 %package devel
82 Summary:        Header files for %{name} library
83 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki %{name}
84 License:        LGPL v2.1+
85 Group:          Development/Libraries
86 Requires:       %{name}-libs = %{version}-%{release}
87 Obsoletes:      kmod-libs-static
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
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
100 %if "%{_rpmversion}" >= "5"
101 BuildArch:      noarch
102 %endif
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
110 %package -n python-kmod
111 Summary:        Python binding for kmod API
112 Summary(pl.UTF-8):      Wiązania Pythona do API kmod
113 License:        LGPL v2.1+
114 Group:          Development/Languages/Python
115 Requires:       %{name}-libs = %{version}-%{release}
116
117 %description -n python-kmod
118 Python binding for kmod API.
119
120 %description -n python-kmod -l pl.UTF-8
121 Wiązania Pythona do API kmod.
122
123 %prep
124 %setup -q
125 %patch0 -p1
126
127 %build
128 %{__libtoolize}
129 %{__aclocal} -I m4
130 %{__autoconf}
131 %{__autoheader}
132 %{__automake}
133 %configure \
134         --disable-silent-rules \
135         --disable-test-modules \
136         --enable-python \
137         --with-rootlibdir=/%{_lib} \
138         --with-xz \
139         --with-zlib
140 %{__make}
141
142 %{?with_tests:%{__make} check KDIR=%{_kernelsrcdir} KVER=%{_kernel_ver}}
143
144 %install
145 rm -rf $RPM_BUILD_ROOT
146 install -d $RPM_BUILD_ROOT/etc/modprobe.d
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
153         ln -s kmod $RPM_BUILD_ROOT%{_bindir}/$prog
154 done
155
156 # obsoleted by pkg-config
157 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libkmod.la
158
159 # not needed in python module
160 %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/kmod/*.la
161 %py_postclean
162
163 :> $RPM_BUILD_ROOT/etc/modprobe.d/modprobe.conf
164
165 cp -p %{SOURCE1} $RPM_BUILD_ROOT/etc/modprobe.d/blacklist.conf
166 cp -p %{SOURCE2} $RPM_BUILD_ROOT/etc/modprobe.d/usb.conf
167
168 %clean
169 rm -rf $RPM_BUILD_ROOT
170
171 %post   libs -p /sbin/ldconfig
172 %postun libs -p /sbin/ldconfig
173
174 %files
175 %defattr(644,root,root,755)
176 %doc NEWS README TODO
177 %dir /etc/modprobe.d
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
181
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
189
190 %{_mandir}/man5/depmod.d.5*
191 %{_mandir}/man5/modprobe.d.5*
192 %{_mandir}/man5/modules.dep.5*
193 %{_mandir}/man5/modules.dep.bin.5*
194 %{_mandir}/man8/depmod.8*
195 %{_mandir}/man8/insmod.8*
196 %{_mandir}/man8/kmod.8*
197 %{_mandir}/man8/lsmod.8*
198 %{_mandir}/man8/modinfo.8*
199 %{_mandir}/man8/modprobe.8*
200 %{_mandir}/man8/rmmod.8*
201
202 %files libs
203 %defattr(644,root,root,755)
204 %attr(755,root,root) /%{_lib}/libkmod.so.*.*.*
205 %attr(755,root,root) %ghost /%{_lib}/libkmod.so.2
206
207 %files devel
208 %defattr(644,root,root,755)
209 %doc libkmod/README
210 %attr(755,root,root) %{_libdir}/libkmod.so
211 %{_includedir}/libkmod.h
212 %{_pkgconfigdir}/libkmod.pc
213
214 %files -n bash-completion-kmod
215 %defattr(644,root,root,755)
216 %{_datadir}/bash-completion/completions/kmod
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
222 %{py_sitedir}/kmod/*.py[co]
This page took 0.161625 seconds and 3 git commands to generate.