]> TLD Linux GIT Repositories - packages/kernel.git/blobdiff - kernel-vanilla.spec
- fix localversion
[packages/kernel.git] / kernel-vanilla.spec
index f1381261229fe70dbe7d54fa96c9444d8319bb3b..d0911884e514bc5169318a88f16ed4888a3008ff 100644 (file)
@@ -13,7 +13,7 @@
 # modules will be looked from /lib/modules/%{kernel_release}
 # localversion is just that without version for "> localversion"
 %define                localversion    %{rel}
-%define                kernel_release  %{version}%{?alt_kernel:.%{alt_kernel}}-%{localversion}
+%define                kernel_release  %{version}%{?alt_kernel:-%{alt_kernel}}-%{localversion}
 
 Summary:       The Linux kernel (the core of the Linux operating system)
 Summary(de.UTF-8):     Der Linux-Kernel (Kern des Linux-Betriebssystems)
@@ -37,6 +37,9 @@ Source2:      kernel.sysconfig
 Source3:       kernel-module-build.pl
 Source4:       kernel.make
 
+Source10:      kernel-vanilla-x86.config
+Source11:      kernel-vanilla-x86_64.config
+
 URL:           http://www.kernel.org/
 BuildRequires: binutils >= 3:2.18
 BuildRequires: /sbin/depmod
@@ -358,7 +361,7 @@ cd linux-%{basever}
 %endif
 
 # Fix EXTRAVERSION in main Makefile
-sed -i 's#EXTRAVERSION =.*#EXTRAVERSION = %{?alt_kernel:.%{alt_kernel}}#g' Makefile
+sed -i 's#EXTRAVERSION =.*#EXTRAVERSION = %{?alt_kernel:-%{alt_kernel}}#g' Makefile
 
 # cleanup backups after patching
 find '(' -name '*~' -o -name '*.orig' -o -name '.gitignore' ')' -print0 | xargs -0 -r -l512 rm -f
@@ -380,12 +383,12 @@ EOF
 cd %{objdir}
 install -d arch/%{target_arch_dir}
 %ifarch i686
-%define         kernel_config           kernel-%{alt_kernel}-x86.config
-%else
-%define         kernel_config           kernel-%{alt_kernel}-%{_target_base_arch}.config
+       cat %{SOURCE10} > %{defconfig}
+%endif
+%ifarch x86_64
+       cat %{SOURCE11} > %{defconfig}
 %endif
-echo "Building config file using %{kernel_config}..."
-cat $RPM_SOURCE_DIR/%{kernel_config} > %{defconfig}
+sed -i "s:CONFIG_LOCALVERSION=\"\":CONFIG_LOCALVERSION=\"-%{localversion}\":" %{defconfig}
 
 ln -sf %{defconfig} .config
 cd -