2011-12-18 21:28:33 +01:00
|
|
|
#
|
|
|
|
# spec file for package kmod
|
|
|
|
#
|
2012-01-06 01:53:03 +01:00
|
|
|
# Copyright (c) 2012 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-01-06 01:53:03 +01:00
|
|
|
|
|
|
|
|
2011-12-18 21:28:33 +01:00
|
|
|
Name: kmod
|
|
|
|
%define lname libkmod1
|
|
|
|
Summary: Utilities to load modules into the kernel
|
2012-01-06 01:53:03 +01:00
|
|
|
Version: 3
|
2011-12-18 21:28:33 +01:00
|
|
|
Release: 0
|
2012-01-06 01:53:03 +01:00
|
|
|
%define git_snapshot 0
|
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
|
2012-01-06 01:53:03 +01:00
|
|
|
Url: http://www.politreco.com/2011/12/announce-kmod-2/
|
2011-12-18 21:28:33 +01:00
|
|
|
|
|
|
|
#Git-Clone: git://git.profusion.mobi/kmod
|
|
|
|
Source: %name-%version.tar.xz
|
|
|
|
|
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
2011-12-24 03:05:41 +01:00
|
|
|
%if 0%{?git_snapshot}
|
2012-01-06 01:53:03 +01:00
|
|
|
BuildRequires: autoconf automake libtool
|
2011-12-24 03:05:41 +01:00
|
|
|
%endif
|
2012-01-06 01:53:03 +01:00
|
|
|
BuildRequires: pkgconfig >= 0.23 pkgconfig(liblzma) pkgconfig(zlib) xz
|
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
|
2012-01-06 01:53:03 +01:00
|
|
|
Conflicts: module-init-tools
|
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
|
|
|
|
Group: Development/Libraries/C and C++
|
2012-01-06 01:53:03 +01:00
|
|
|
License: LGPL-2.1+
|
2011-12-18 21:28:33 +01:00
|
|
|
Requires: %lname = %version
|
|
|
|
|
|
|
|
%description -n libkmod-devel
|
|
|
|
libkmod was created to allow programs to easily insert, remove and
|
|
|
|
list modules, also checking its properties, dependencies and aliases.
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q
|
|
|
|
|
|
|
|
%build
|
2011-12-24 03:05:41 +01:00
|
|
|
%if 0%{?git_snapshot}
|
|
|
|
if [ ! -e configure ]; then
|
|
|
|
autoreconf -fi;
|
|
|
|
fi;
|
|
|
|
%endif
|
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.
|
2011-12-24 21:30:44 +01:00
|
|
|
%configure --with-xz --with-zlib --includedir=%_includedir/%name-%version \
|
2011-12-24 03:05:41 +01:00
|
|
|
--with-rootlibdir=/%_lib --bindir=/bin
|
2011-12-18 21:28:33 +01:00
|
|
|
make %{?_smp_mflags}
|
|
|
|
|
|
|
|
%install
|
2011-12-24 03:05:41 +01:00
|
|
|
b="%buildroot";
|
2011-12-18 21:28:33 +01:00
|
|
|
%make_install
|
2011-12-24 03:05:41 +01:00
|
|
|
# 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;
|
2011-12-18 21:28:33 +01:00
|
|
|
|
2011-12-24 19:04:23 +01:00
|
|
|
%check
|
|
|
|
make check
|
|
|
|
|
2011-12-18 21:28:33 +01:00
|
|
|
%post -n %lname -p /sbin/ldconfig
|
|
|
|
|
|
|
|
%postun -n %lname -p /sbin/ldconfig
|
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-,root,root)
|
2011-12-24 03:05:41 +01:00
|
|
|
/bin/kmod
|
2011-12-18 21:28:33 +01:00
|
|
|
|
|
|
|
%files -n %lname
|
|
|
|
%defattr(-,root,root)
|
2011-12-24 03:05:41 +01:00
|
|
|
/%_lib/libkmod.so.1*
|
2011-12-18 21:28:33 +01:00
|
|
|
|
|
|
|
%files -n libkmod-devel
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%_includedir/*
|
|
|
|
%_libdir/pkgconfig/*.pc
|
|
|
|
%_libdir/libkmod.so
|
|
|
|
|
2011-12-24 03:05:41 +01:00
|
|
|
%files compat
|
|
|
|
%defattr(-,root,root)
|
|
|
|
/bin/lsmod
|
|
|
|
/sbin/*
|
|
|
|
|
2011-12-18 21:28:33 +01:00
|
|
|
%changelog
|