kmod v2-21-g9b966da

OBS-URL: https://build.opensuse.org/package/show/Base:System/kmod?expand=0&rev=5
This commit is contained in:
Jan Engelhardt 2011-12-24 02:05:41 +00:00 committed by Git OBS Bridge
parent ad0e29b47b
commit f47a30976e
3 changed files with 46 additions and 8 deletions

3
kmod-2.21.tar.xz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:29334584a6569860c2a2b7f86e5ab87ff62d9d9cfc9431eea2246ca2b967a2ad
size 58220

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:33edf14f28ef9b51d893e6167d846d23fc572f6ba634acf0ad9a6e3925ff55c0
size 262484

View File

@ -18,7 +18,8 @@
Name: kmod
%define lname libkmod1
Summary: Utilities to load modules into the kernel
Version: 2
Version: 2.21
%define git_snapshot 1
Release: 0
License: LGPL-2.1+ and GPL-2.0+
Group: System/Kernel
@ -28,6 +29,9 @@ URL: http://www.politreco.com/2011/12/announce-kmod-2/
Source: %name-%version.tar.xz
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if 0%{?git_snapshot}
BuildRequires: automake, libtool
%endif
BuildRequires: pkgconfig, xz
%description
@ -39,6 +43,19 @@ 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.
%package compat
Summary: Compat symlinks for kernel module utilities
License: GPL-2.0+
Group: System/Kernel
Conflicts: module-init-tools
%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.)
%package -n %lname
Summary: Library to interact with Linux kernel modules
License: LGPL-2.1+
@ -62,14 +79,30 @@ list modules, also checking its properties, dependencies and aliases.
%setup -q
%build
%if 0%{?git_snapshot}
if [ ! -e configure ]; then
autoreconf -fi;
fi;
%endif
# The extra --includedir gives us the possibility to detect dependent
# packages which fail to properly use pkgconfig.
%configure --includedir=%_includedir/%name-%version
%configure --includedir=%_includedir/%name-%version \
--with-rootlibdir=/%_lib --bindir=/bin
make %{?_smp_mflags}
%install
b="%buildroot";
%make_install
rm -f "%buildroot/%_libdir"/*.la
# Remove standalone tools
rm -f "$b/bin"/kmod-*;
rm -f "$b/%_libdir"/*.la;
# kmod-compat
mkdir -p "$b/bin" "$b/sbin";
ln -s kmod "$b/bin/lsmod";
for i in depmod insmod lsmod modinfo modprobe rmmod; do
ln -s "/bin/kmod" "$b/sbin/$i";
done;
%post -n %lname -p /sbin/ldconfig
@ -77,11 +110,11 @@ rm -f "%buildroot/%_libdir"/*.la
%files
%defattr(-,root,root)
%_bindir/kmod-*
/bin/kmod
%files -n %lname
%defattr(-,root,root)
%_libdir/libkmod.so.1*
/%_lib/libkmod.so.1*
%files -n libkmod-devel
%defattr(-,root,root)
@ -89,4 +122,9 @@ rm -f "%buildroot/%_libdir"/*.la
%_libdir/pkgconfig/*.pc
%_libdir/libkmod.so
%files compat
%defattr(-,root,root)
/bin/lsmod
/sbin/*
%changelog