cc0a2a8d98
Signed-off-by: Jon Masters <jcm@jonmasters.org>
134 lines
4.2 KiB
RPMSpec
134 lines
4.2 KiB
RPMSpec
Name: kmod
|
|
Version: 2
|
|
Release: 5%{?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/
|
|
#TODO: The following URL will be moving to kernel.org eventually
|
|
Source0: http://packages.profusion.mobi/kmod/%{name}-%{version}.tar.xz
|
|
Patch0: kmod-2-with-rootlibdir.patch
|
|
Exclusiveos: Linux
|
|
|
|
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
|
|
|
|
BuildRequires: zlib-devel chrpath
|
|
|
|
# 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
|
|
%patch0 -p1 -b .rootlibdir
|
|
|
|
|
|
%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 --bindir=/bin --with-rootlibdir=/%{_lib}
|
|
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
|
|
rm -rf $RPM_BUILD_ROOT%{_libdir}/*.la
|
|
|
|
# TODO: Fix the upstream rpath issues to avoid doing this (just for now)
|
|
chrpath --delete $RPM_BUILD_ROOT/bin/kmod-insmod
|
|
chrpath --delete $RPM_BUILD_ROOT/bin/kmod-lsmod
|
|
chrpath --delete $RPM_BUILD_ROOT/bin/kmod-modinfo
|
|
chrpath --delete $RPM_BUILD_ROOT/bin/kmod-modprobe
|
|
chrpath --delete $RPM_BUILD_ROOT/bin/kmod-rmmod
|
|
|
|
mkdir -p $RPM_BUILD_ROOT/etc
|
|
mkdir -p $RPM_BUILD_ROOT/etc/modprobe.d
|
|
|
|
# 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
|
|
# NOTE: These do not use macros because we always want "/lib" (no multilib)
|
|
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
|
|
|
|
%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
|
|
# NOTE: always /lib even on systems with /lib64 (there is no macro available)
|
|
%dir /lib/modprobe.d
|
|
/bin/kmod-insmod
|
|
/bin/kmod-lsmod
|
|
/bin/kmod-modinfo
|
|
/bin/kmod-modprobe
|
|
/bin/kmod-rmmod
|
|
%doc NEWS README TODO COPYING
|
|
|
|
%files libs
|
|
/%{_lib}/libkmod.so*
|
|
|
|
%files devel
|
|
%{_includedir}/libkmod.h
|
|
%{_libdir}/pkgconfig/libkmod.pc
|
|
/%{_libdir}/libkmod.so*
|
|
|
|
%changelog
|
|
* Fri Dec 23 2011 Jon Masters <jcm@jonmasters.org> - 2-5
|
|
- Initial build for Fedora following package import
|
|
|
|
* Thu Dec 22 2011 Jon Masters <jcm@jonmasters.org> - 2-4
|
|
- There is no generic macro for non-multilib "/lib", hardcode like others
|
|
|
|
* Thu Dec 22 2011 Jon Masters <jcm@jonmasters.org> - 2-3
|
|
- Update package incorporating fixes from initial review feedback
|
|
- Cleaups to SPEC, rpath, documentation, library and binary locations
|
|
|
|
* Thu Dec 22 2011 Jon Masters <jcm@jonmasters.org> - 2-2
|
|
- Update package for posting to wider test audience (initial review submitted)
|
|
|
|
* Thu Dec 22 2011 Jon Masters <jcm@jonmasters.org> - 2-1
|
|
- Initial Fedora package for module-init-tools replacement (kmod) library
|