diff -up ./kmodtool-template.lfarkas ./kmodtool-template --- ./kmodtool-template.lfarkas 2009-08-28 15:15:56.000000000 +0200 +++ ./kmodtool-template 2009-08-28 15:14:01.000000000 +0200 @@ -107,11 +107,21 @@ Requires(post): /sbin/depmod Requires(postun): /sbin/depmod EOF +if [ "" != "$kmp_add_requires" ] +then + echo "Requires: $kmp_add_requires" +fi + if [ "no" != "$kmp_nobuildreqs" ] then echo "BuildRequires: kernel${dashvariant}-devel-%{_target_cpu} = ${verrel}" fi +if [ "" != "$kmp_add_buildrequires" ] +then + echo "BuildRequires: $kmp_add_buildrequires" +fi + if [ "" != "$kmp_override_preamble" ] then cat "$kmp_override_preamble" diff -up ./template-kmod.spec.lfarkas ./template-kmod.spec --- ./template-kmod.spec.lfarkas 2009-08-28 14:05:19.000000000 +0200 +++ ./template-kmod.spec 2009-08-28 14:37:18.000000000 +0200 @@ -3,13 +3,14 @@ Name: %{kmod_name}-kmod Version: 0.0 -Release: 1.el5.elrepo +Release: 1%{?dist} Group: System Environment/Kernel License: GPL v2 -Summary: PHOO driver module +Summary: %{kmod_name} driver module URL: http://www.kernel.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-build-%(%{__id_u} -n) +BuildRequires: redhat-rpm-config ExclusiveArch: i686 x86_64 # Sources. @@ -36,10 +37,10 @@ Source10: kmodtool-%{kmod_name} %{expand:%(%{kmodtool} rpmtemplate_kmp %{kmod_name} %{kversion} %{kvariants} 2>/dev/null)} %description -This package provides the PHOO driver module. -This package provides the kernel driver module for the PHOO controller. +This package provides the %{kmod_name} driver module. +This package provides the kernel driver module for the %{kmod_name} controller. It is built to depend upon the specific ABI provided by a range of releases -of the same variant of the CentOS kernel and not on any one specific build. +of the same variant of the kernel and not on any one specific build. %prep %setup -q -c -T -a 0 @@ -52,7 +53,7 @@ done %build for kvariant in %{kvariants} ; do - ksrc=%{_usrsrc}/kernels/%{kversion}${kvariant:+-$kvariant}-%{_target_cpu} + ksrc=%{_usrsrc}/kernels/%{kversion}${kvariant:+$kvariant}-%{_target_cpu} pushd _kmod_build_$kvariant %{__make} -C "${ksrc}" modules M=$PWD popd @@ -62,7 +63,7 @@ done export INSTALL_MOD_PATH=$RPM_BUILD_ROOT export INSTALL_MOD_DIR=extra/%{kmod_name} for kvariant in %{kvariants} ; do - ksrc=%{_usrsrc}/kernels/%{kversion}${kvariant:+-$kvariant}-%{_target_cpu} + ksrc=%{_usrsrc}/kernels/%{kversion}${kvariant:+$kvariant}-%{_target_cpu} pushd _kmod_build_$kvariant %{__make} -C "${ksrc}" modules_install M=$PWD %{__install} -d ${INSTALL_MOD_PATH}/etc/depmod.d/