esac
cat <<EOF
+
+%global _find_debuginfo_opts %{?_find_debuginfo_opts} -p '.*openafs.ko(\.debug)?' -o kmod-debuginfo.list
+
%package -n kmod-${kmod_name}${dashvariant}
Summary: ${kmod_name} kernel module(s)
Group: System Environment/Kernel
%description -n kmod-${kmod_name}${dashvariant}
This package provides the ${kmod_name} kernel modules built for the Linux
kernel ${kname} for the %{_target_cpu} family of processors.
+
+%package -n kmod-%{kmod_name}${dashvariant}-debuginfo
+Summary: Debug information for %{kmod_name} kernel modules
+Group: Development/Debug
+Release: %{pkgrel}.%(echo ${verrel} | tr - _)
+AutoReqProv: no
+%description -n kmod-%{kmod_name}${dashvariant}-debuginfo
+This package provides debug information for the %{kmod_name} kernel modules
+built for the Linux kernel ${kname} for the %{_target_cpu} family of processors.
+
%post -n kmod-${kmod_name}${dashvariant}
${depmod} -aeF /boot/System.map-${kname} ${kname} > /dev/null || :
%postun -n kmod-${kmod_name}${dashvariant}
%defattr(644,root,root,755)
/lib/modules/${kname}/extra/${kmod_name}/
+%files -f kmod-debuginfo.list -n kmod-%{kmod_name}${dashvariant}-debuginfo
+%defattr(-,root,root)
+
EOF
}
##############################################################################
%if %{build_modules}
-# Make debuginfo for the kernel components into their own package
-# so we can upgrade kernel and userspace seperately and still debug each
-%package -n %{name}-kernel-debuginfo
-Summary: Debug information for %{name} kernel modules
-Group: Development/Debug
-AutoReqProv: no
-%description -n %{name}-kernel-debuginfo
-This package provides debug information for %{name} kernel modules.
-
-%{expand:%%global _find_debuginfo_opts %{?_find_debuginfo_opts} -p '.*openafs.ko(\.debug)?' -o kmod-debuginfo.list}
-
%{expand:%(%{kmodtool} rpmtemplate %{kmod_name} %{kverrel} %{depmod} %{kvariants} 2>/dev/null)}
%endif
%endif
%endif # build_userspace
-%if %{build_modules}
-%files -f kmod-debuginfo.list -n %{name}-kernel-debuginfo
-%defattr(-,root,root)
-%endif
-
##############################################################################
###
### openafs.spec change log