%define major 1 %define libname %mklibname %{name} %{major} %define develname %mklibname %{name} -d Summary: Kernel modules management tools Name: kmod Version: 3 Release: %mkrel 2 Source0: http://packages.profusion.mobi/kmod/%{name}-%{version}.tar.xz License: GPLv2+ Group: System/Kernel and hardware #Url1: http://www.politreco.com/2011/12/announce-kmod-1/ Url: http://git.profusion.mobi/cgit.cgi/kmod.git/ BuildRequires: zlib-devel BuildRequires: lzma-devel %description Simple tools for managing kernel modules. %package -n %{libname} Summary: Kernel modules management library Group: System/Libraries License: LGPLv2+ %description -n %{libname} Dynamic libraries for %{name}. The goal of the libkmod library is to offer to other programs the needed flexibility and fine grained control over insertion, removal, configuration and listing of kernel modules. Using the library, with simple pieces of code it's possible to interact with kernel modules and then there's no need to rely on other tools for that. This is a thing lacking on Linux for a while and it's one of the items in the Plumber's Wish List for Linux. Quoting it: provide a proper libmodprobe.so from module-init-tools: Early boot tools, installers, driver install disks want to access information about available modules to optimize boot up handling. %package -n %{develname} Summary: Development files for %{name} Group: Development/C Requires: %{libname} = %{version}-%{release} Provides: %{name}-devel = %{version}-%{release} License: LGPLv2+ %description -n %{develname} Development files and headers for %{name}. %prep %setup -q %build %configure --with-zlib --with-xz %make %install rm -rf %{buildroot} %makeinstall_std cp tools/.libs/kmod-* %buildroot/%_bindir rm -f %buildroot/%_libdir/libkmod.la %clean rm -rf %{buildroot} %files %_bindir/* %files -n %{libname} %_libdir/libkmod.so.%major %_libdir/libkmod.so.%major.* %files -n %{develname} %_libdir/pkgconfig/libkmod.pc %_includedir/libkmod.h %_libdir/*.so %_libdir/*.a