2011-12-18 21:28:33 +01:00
|
|
|
#
|
|
|
|
# spec file for package kmod
|
|
|
|
#
|
2014-01-07 13:03:22 +01:00
|
|
|
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
2011-12-18 21:28:33 +01:00
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
2012-03-10 19:27:40 +01:00
|
|
|
|
|
|
|
|
2011-12-18 21:28:33 +01:00
|
|
|
Name: kmod
|
2012-02-08 03:47:37 +01:00
|
|
|
%define lname libkmod2
|
2011-12-18 21:28:33 +01:00
|
|
|
Summary: Utilities to load modules into the kernel
|
2011-12-21 14:03:00 +01:00
|
|
|
License: LGPL-2.1+ and GPL-2.0+
|
2011-12-18 21:28:33 +01:00
|
|
|
Group: System/Kernel
|
2014-04-08 10:48:24 +02:00
|
|
|
Version: 17
|
2012-02-07 01:59:10 +01:00
|
|
|
Release: 0
|
2012-06-22 23:57:21 +02:00
|
|
|
Url: http://www.jonmasters.org/blog/2011/12/20/libkmod-replaces-module-init-tools/
|
2014-01-07 13:03:22 +01:00
|
|
|
#Announce: https://lwn.net/Articles/577962/
|
2012-04-18 13:15:28 +02:00
|
|
|
|
|
|
|
#Git-Web: http://git.kernel.org/?p=utils/kernel/kmod/kmod.git;a=summary
|
|
|
|
#Git-Clone: git://git.kernel.org/pub/scm/utils/kernel/kmod/kmod
|
2012-06-22 23:57:21 +02:00
|
|
|
Source: ftp://ftp.kernel.org/pub/linux/utils/kernel/kmod/%name-%version.tar.xz
|
|
|
|
Source2: ftp://ftp.kernel.org/pub/linux/utils/kernel/kmod/%name-%version.tar.sign
|
2014-02-26 18:34:42 +01:00
|
|
|
Patch2: 0002-modprobe-Recognize-allow-unsupported-modules-on-comm.patch
|
|
|
|
Patch3: 0003-libkmod-config-Recognize-allow_unsupported_modules-i.patch
|
2014-03-05 16:59:07 +01:00
|
|
|
Patch9: 0009-libkmod-Implement-filtering-of-unsupported-modules-o.patch
|
|
|
|
Patch10: 0010-modprobe-Implement-allow-unsupported-modules.patch
|
2011-12-18 21:28:33 +01:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
2013-09-02 23:39:27 +02:00
|
|
|
BuildRequires: autoconf
|
|
|
|
BuildRequires: automake
|
|
|
|
BuildRequires: libtool
|
2012-03-03 21:52:30 +01:00
|
|
|
BuildRequires: pkgconfig >= 0.21
|
2012-02-07 01:59:10 +01:00
|
|
|
BuildRequires: xz
|
2012-12-06 13:09:55 +01:00
|
|
|
%if 0%{?sles_version}
|
|
|
|
BuildRequires: xz-devel >= 4.99
|
|
|
|
BuildRequires: zlib-devel
|
|
|
|
%else
|
2012-02-07 01:59:10 +01:00
|
|
|
BuildRequires: pkgconfig(liblzma) >= 4.99
|
|
|
|
BuildRequires: pkgconfig(zlib)
|
2012-12-06 13:09:55 +01:00
|
|
|
%endif
|
2012-11-23 18:18:22 +01:00
|
|
|
Requires: suse-module-tools
|
2011-12-18 21:28:33 +01:00
|
|
|
|
|
|
|
%description
|
|
|
|
kmod is a set of tools to handle common tasks with Linux kernel
|
|
|
|
modules like insert, remove, list, check properties, resolve
|
|
|
|
dependencies and aliases.
|
|
|
|
|
|
|
|
These tools are designed on top of libkmod, a library that is shipped
|
|
|
|
with kmod. The aim is to be compatible with tools, configurations and
|
|
|
|
indexes from module-init-tools project.
|
|
|
|
|
2011-12-24 03:05:41 +01:00
|
|
|
%package compat
|
|
|
|
Summary: Compat symlinks for kernel module utilities
|
2012-01-06 01:53:03 +01:00
|
|
|
License: GPL-2.0+
|
2011-12-24 03:05:41 +01:00
|
|
|
Group: System/Kernel
|
2013-08-17 02:33:49 +02:00
|
|
|
Requires: kmod
|
2014-03-11 15:01:20 +01:00
|
|
|
Obsoletes: module-init-tools < 3.16
|
|
|
|
Provides: module-init-tools = 3.16
|
2012-09-14 01:20:02 +02:00
|
|
|
Provides: modutils
|
2011-12-24 03:05:41 +01:00
|
|
|
|
|
|
|
%description compat
|
|
|
|
kmod is a set of tools to handle common tasks with Linux kernel
|
|
|
|
modules like insert, remove, list, check properties, resolve
|
|
|
|
dependencies and aliases.
|
|
|
|
|
|
|
|
This package contains traditional name symlinks (lsmod, etc.)
|
|
|
|
|
2011-12-18 21:28:33 +01:00
|
|
|
%package -n %lname
|
|
|
|
Summary: Library to interact with Linux kernel modules
|
2012-01-06 01:53:03 +01:00
|
|
|
License: LGPL-2.1+
|
2011-12-18 21:28:33 +01:00
|
|
|
Group: System/Libraries
|
|
|
|
|
|
|
|
%description -n %lname
|
|
|
|
libkmod was created to allow programs to easily insert, remove and
|
|
|
|
list modules, also checking its properties, dependencies and aliases.
|
|
|
|
|
|
|
|
%package -n libkmod-devel
|
|
|
|
Summary: Development files for libkmod
|
2012-01-06 01:53:03 +01:00
|
|
|
License: LGPL-2.1+
|
2012-02-07 01:59:10 +01:00
|
|
|
Group: Development/Libraries/C and C++
|
2012-04-18 13:05:36 +02:00
|
|
|
Requires: %lname = %{version}
|
2011-12-18 21:28:33 +01:00
|
|
|
|
|
|
|
%description -n libkmod-devel
|
|
|
|
libkmod was created to allow programs to easily insert, remove and
|
|
|
|
list modules, also checking its properties, dependencies and aliases.
|
|
|
|
|
2012-02-08 03:47:37 +01:00
|
|
|
This package contains the development headers for the library found
|
|
|
|
in %lname.
|
|
|
|
|
2011-12-18 21:28:33 +01:00
|
|
|
%prep
|
2013-07-04 00:41:41 +02:00
|
|
|
%{?gpg_verify: xz -dk "%{S:0}"; %gpg_verify %{S:2}}
|
2014-04-08 10:48:24 +02:00
|
|
|
%setup -q
|
2014-02-26 18:34:42 +01:00
|
|
|
%patch2 -p1
|
|
|
|
%patch3 -p1
|
2014-03-05 16:59:07 +01:00
|
|
|
%patch9 -p1
|
|
|
|
%patch10 -p1
|
2011-12-18 21:28:33 +01:00
|
|
|
|
|
|
|
%build
|
2013-09-02 23:39:27 +02:00
|
|
|
autoreconf -fi
|
2011-12-18 21:28:33 +01:00
|
|
|
# The extra --includedir gives us the possibility to detect dependent
|
|
|
|
# packages which fail to properly use pkgconfig.
|
2012-04-18 13:05:36 +02:00
|
|
|
%configure \
|
2012-12-06 13:09:55 +01:00
|
|
|
%if 0%{?sles_version}
|
|
|
|
zlib_CFLAGS=" " zlib_LIBS="-lz" \
|
|
|
|
%endif
|
2012-09-16 03:49:28 +02:00
|
|
|
--with-xz \
|
|
|
|
--with-zlib \
|
|
|
|
--includedir="%_includedir/%name-%version" \
|
|
|
|
--with-rootlibdir="%_libdir" \
|
|
|
|
--bindir="%_bindir"
|
2011-12-18 21:28:33 +01:00
|
|
|
make %{?_smp_mflags}
|
|
|
|
|
|
|
|
%install
|
2012-09-16 03:49:28 +02:00
|
|
|
b="%buildroot";
|
|
|
|
make install DESTDIR="$b";
|
|
|
|
rm -f "$b/%_libdir"/*.la
|
|
|
|
|
|
|
|
mkdir -p "$b/%_libexecdir/%name" "$b/%_sbindir" "$b/sbin";
|
2012-03-10 19:27:40 +01:00
|
|
|
for i in depmod insmod lsmod modinfo modprobe rmmod; do
|
2012-09-16 03:49:28 +02:00
|
|
|
#
|
|
|
|
# kmod-compat and kmod-compat(usrmerge)
|
|
|
|
#
|
|
|
|
ln -s "%_bindir/kmod" "$b/%_sbindir/$i";
|
|
|
|
ln -s "%_bindir/kmod" "$b/sbin/$i";
|
|
|
|
|
|
|
|
#
|
|
|
|
# Make symlinks also available in normal fashion,
|
|
|
|
# so one can actually run it.
|
|
|
|
#
|
|
|
|
ln -s "%_bindir/kmod" "$b/%_libexecdir/%name/$i";
|
|
|
|
done;
|
|
|
|
mkdir -p "$b/%_bindir" "$b/bin";
|
|
|
|
for i in lsmod; do
|
|
|
|
ln -s "%_bindir/kmod" "$b/%_bindir/$i";
|
|
|
|
ln -s "%_bindir/kmod" "$b/bin/$i";
|
2012-03-10 19:27:40 +01:00
|
|
|
done;
|
2012-09-16 03:49:28 +02:00
|
|
|
|
|
|
|
#
|
|
|
|
# make mkinitrd happy
|
|
|
|
# (last time checked it does not look into /usr)
|
|
|
|
#
|
|
|
|
mkdir -p "$b"/{bin,sbin,%_lib};
|
|
|
|
ln -s "%_bindir/kmod" "$b/bin/";
|
2012-06-22 23:57:21 +02:00
|
|
|
%if "%_libdir" != "/%_lib"
|
2012-09-16 03:49:28 +02:00
|
|
|
ln -s "%_libdir/libkmod.so.2" "$b/%_lib/";
|
2014-04-08 10:48:24 +02:00
|
|
|
ln -s "%_libdir/libkmod.so.2.2.7" "$b/%_lib/";
|
2012-06-22 23:57:21 +02:00
|
|
|
%endif
|
2011-12-18 21:28:33 +01:00
|
|
|
|
2011-12-24 19:04:23 +01:00
|
|
|
%check
|
2014-03-05 16:59:07 +01:00
|
|
|
make check
|
2011-12-24 19:04:23 +01:00
|
|
|
|
2011-12-18 21:28:33 +01:00
|
|
|
%post -n %lname -p /sbin/ldconfig
|
|
|
|
|
|
|
|
%postun -n %lname -p /sbin/ldconfig
|
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-,root,root)
|
2012-09-16 03:49:28 +02:00
|
|
|
%_bindir/kmod
|
|
|
|
%_libexecdir/%name
|
2011-12-24 03:05:41 +01:00
|
|
|
/bin/kmod
|
2013-09-02 23:39:27 +02:00
|
|
|
%_datadir/bash-completion/
|
2011-12-18 21:28:33 +01:00
|
|
|
|
|
|
|
%files -n %lname
|
|
|
|
%defattr(-,root,root)
|
2012-03-10 19:27:40 +01:00
|
|
|
%_libdir/libkmod.so.2*
|
2012-02-08 03:47:37 +01:00
|
|
|
/%_lib/libkmod.so.2*
|
2011-12-18 21:28:33 +01:00
|
|
|
|
|
|
|
%files -n libkmod-devel
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%_includedir/*
|
2012-02-08 03:47:37 +01:00
|
|
|
%_libdir/pkgconfig/libkmod.pc
|
2011-12-18 21:28:33 +01:00
|
|
|
%_libdir/libkmod.so
|
|
|
|
|
2011-12-24 03:05:41 +01:00
|
|
|
%files compat
|
|
|
|
%defattr(-,root,root)
|
2012-03-10 19:27:40 +01:00
|
|
|
%_bindir/lsmod
|
|
|
|
%_sbindir/depmod
|
|
|
|
%_sbindir/insmod
|
|
|
|
%_sbindir/lsmod
|
|
|
|
%_sbindir/modinfo
|
|
|
|
%_sbindir/modprobe
|
|
|
|
%_sbindir/rmmod
|
2012-09-16 03:49:28 +02:00
|
|
|
# UsrMerge
|
|
|
|
/bin/lsmod
|
|
|
|
/sbin/depmod
|
|
|
|
/sbin/insmod
|
|
|
|
/sbin/lsmod
|
|
|
|
/sbin/modinfo
|
|
|
|
/sbin/modprobe
|
|
|
|
/sbin/rmmod
|
|
|
|
# EndUsrMerge
|
2012-01-20 19:20:51 +01:00
|
|
|
%_mandir/man5/depmod.d.5*
|
|
|
|
%_mandir/man5/modprobe.d.5*
|
|
|
|
%_mandir/man5/modules.dep.5*
|
2012-11-14 01:41:31 +01:00
|
|
|
%_mandir/man5/modules.dep.bin.5*
|
2012-01-20 19:20:51 +01:00
|
|
|
%_mandir/man8/depmod.8*
|
|
|
|
%_mandir/man8/insmod.8*
|
|
|
|
%_mandir/man8/lsmod.8*
|
|
|
|
%_mandir/man8/modinfo.8*
|
|
|
|
%_mandir/man8/modprobe.8*
|
|
|
|
%_mandir/man8/rmmod.8*
|
2011-12-24 03:05:41 +01:00
|
|
|
|
2011-12-18 21:28:33 +01:00
|
|
|
%changelog
|