Name: kmod Version: 2 Release: 2%{?dist} Summary: Linux kernel module management utilities Group: System Environment/Kernel License: GPLv2+ #TODO: Change the following URLs once there is wiki write access #URL: http://modules.wiki.kernel.org/ URL: http://git.profusion.mobi/cgit.cgi/kmod.git/ #Source0: http://packages.profusion.mobi/kmod/kmod-2.tar.xz Source0: kmod-2.tar.xz Exclusiveos: Linux BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) BuildRequires: glibc-static zlib-devel zlib-static Requires: coreutils Obsoletes: modutils-devel modutils # TODO: Investigate the following and determine prefered policy guide # Fedora Renaming/Replacing Existing Packages policy (review/FIXME) #Provides: module-init-tools = 4.0-1 #Obsoletes: module-init-tools < 4.0-1 %description The kmod package provides various programs needed for automatic loading and unloading of modules under 2.6, 3.x, and later kernels, as well as other module management programs. Device drivers and filesystems are two examples of loaded and unloaded modules. %package libs Summary: Libraries to handle kernel module loading and unloading License: LGPLv2+ Group: System Environment/Libraries %description libs The kmod-libs package provides runtime libraries for any application that wishes to load or unload Linux kernel modules from the running system. %package devel Summary: Header files for kmod development Group: Development/Libraries Requires: %{name} = %{version}-%{release} %description devel The kmod-devel package provides header files used for development of applications that wish to load or unload Linux kernel modules. %prep %setup -q %build # Initially configure into /sbin in line with existing tools. This may well # move into /usr as part of the planned changes to filesystem layout soon. %configure --disable-static make %{?_smp_mflags} # TODO: add a doc target here %install rm -rf $RPM_BUILD_ROOT # TODO: Initially these are installed in /sbin like module-init-tools # TODO: That *cannot* change for the moment (but explicitly noted here) make install DESTDIR=$RPM_BUILD_ROOT bindir=/sbin rm -rf $RPM_BUILD_ROOT%{_libdir}/*.la # TODO: Review this, but using approach from glibc for now mkdir $RPM_BUILD_ROOT/%{_lib} mv $RPM_BUILD_ROOT%{_libdir}/libkmod.so* $RPM_BUILD_ROOT/%{_lib}/ mkdir -p $RPM_BUILD_ROOT/etc mkdir -p $RPM_BUILD_ROOT/etc/modprobe.d touch $RPM_BUILD_ROOT/etc/modprobe.d/local.conf # New configuration files we ship (if any) should go into /lib/modprobe.d # in order to allow the local sysadmin to customize /etc/modprobe.d mkdir -p $RPM_BUILD_ROOT/lib mkdir -p $RPM_BUILD_ROOT/lib/modprobe.d mkdir -p $RPM_BUILD_ROOT/etc/depmod.d # We used to create a depmod "dist.conf" but do not use that any more %clean rm -rf $RPM_BUILD_ROOT %pre # Legacy - in case a /etc/modprobe.conf is found, move it to local.conf if [ -e /etc/modprobe.conf ] && [ ! -e /etc/modprobe.d/local.conf ] then mv /etc/modprobe.conf /etc/modprobe.d/local.conf fi %post libs -p /sbin/ldconfig %postun libs -p /sbin/ldconfig %files %defattr(-,root,root,-) # TODO: Add documentation files and man pages %dir %{_sysconfdir}/depmod.d %dir %{_sysconfdir}/modprobe.d %ghost %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/modprobe.d/local.conf # NOTE: always /lib even on systems with /lib64 (TODO: check better macro?) %dir /lib/modprobe.d /sbin/kmod-insmod /sbin/kmod-lsmod /sbin/kmod-modinfo /sbin/kmod-modprobe /sbin/kmod-rmmod %files libs /%{_lib}/libkmod.so* %files devel %{_includedir}/libkmod.h %{_libdir}/pkgconfig/libkmod.pc %changelog * Thu Dec 22 2011 Jon Masters - 2-1 - Initial Fedora package for module-init-tools replacement (kmod) library