# what kernel are we building for ? %{!?kernel: %define kernel %(uname -r)} # get the correct kernel package release by stripping kernel modifiers %define krel %(echo %{kernel} | sed -e s/smp//g -) Name: kernel-module-devel-%{krel} Version: 0.2 Release: 0.fdr.2 Summary: Build files for all kernel arch/types for %{krel} Group: System Environment/Kernel License: GPL URL: http://thomas.apestaart.org/ Source: %{name}.tar.bz2 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Requires: /boot/vmlinuz-%{krel} # we really don't need debug packages for this %define debug_package %{nil} %description This package contains a forest of symlinks and actual files copied from all the kernel rpms. This allows you to build external modules for all architectures and types of kernels. %prep %setup -q -n %{name} %build %install rm -rf $RPM_BUILD_ROOT install -m 755 -d $RPM_BUILD_ROOT%{_libdir}/%{name} cp -pr kernel-* $RPM_BUILD_ROOT%{_libdir}/%{name} %clean rm -rf $RPM_BUILD_ROOT %post if test -d /lib/modules/%{krel}smp then ln -sf /lib/modules/%{krel}smp/build %{_libdir}/%{name}/common else ln -sf /lib/modules/%{krel}/build %{_libdir}/%{name}/common fi %preun rm %{_libdir}/%{name}/common 2> /dev/null || true %files %defattr(-,root,root,-) %{_libdir}/%{name} %changelog * Tue Jun 15 2004 Thomas Vander Stichele - 0.2-0.fdr.2: require vmlinuz-(krel) since that actually works * Fri May 21 2004 Thomas Vander Stichele - 0.2-0.fdr.1: Initial package