#
+# Replace MODULE_NAME with real module name and MODULE_DIR
+# with required directory name.
+#
# Conditional build:
%bcond_without dist_kernel # allow non-distribution kernel
%bcond_without kernel # don't build kernel modules
CC="%{__cc}" CPP="%{__cpp}" \
M=$PWD O=$PWD \
%{?with_verbose:V=1}
- mv $mod_name{,-$cfg}.ko
+
+ mv MODULE_NAME{,-$cfg}.ko
done
%endif
%endif
%if %{with kernel}
-install -d $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}{,smp}/$dir
-install $mod_name-%{?with_dist_kernel:up}%{!?with_dist_kernel:nondist}.ko \
- $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/$dir/$mod_name.ko
+install -d $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}{,smp}/MODULE_DIR
+install MODULE_NAME-%{?with_dist_kernel:up}%{!?with_dist_kernel:nondist}.ko \
+ $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/MODULE_DIR/MODULE_NAME.ko
%if %{with smp} && %{with dist_kernel}
-install $mod_name-smp.ko \
- $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}smp/$dir/$mod_name.ko
+install MODULE_NAME-smp.ko \
+ $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}smp/MODULE_DIR/MODULE_NAME.ko
%endif
%endif
%if %{with kernel}
%files -n kernel-...
%defattr(644,root,root,755)
-/lib/modules/%{_kernel_ver}/$dir/*.ko*
+/lib/modules/%{_kernel_ver}/MODULE_DIR/*.ko*
%if %{with smp} && %{with dist_kernel}
%files -n kernel-smp-...
%defattr(644,root,root,755)
-/lib/modules/%{_kernel_ver}smp/$dir/*.ko*
+/lib/modules/%{_kernel_ver}smp/MODULE_DIR/*.ko*
%endif
%endif