SPECS (LINUX_2_6): kernel.spec - bcond myown; fixed %files on sparc

zbyniu zbyniu at pld-linux.org
Mon May 26 17:45:50 CEST 2008


Author: zbyniu                       Date: Mon May 26 15:45:50 2008 GMT
Module: SPECS                         Tag: LINUX_2_6
---- Log message:
- bcond myown; fixed %files on sparc

---- Files affected:
SPECS:
   kernel.spec (1.441.2.1912 -> 1.441.2.1913) 

---- Diffs:

================================================================
Index: SPECS/kernel.spec
diff -u SPECS/kernel.spec:1.441.2.1912 SPECS/kernel.spec:1.441.2.1913
--- SPECS/kernel.spec:1.441.2.1912	Sat May 24 12:17:18 2008
+++ SPECS/kernel.spec	Mon May 26 17:45:44 2008
@@ -1,6 +1,6 @@
 # $Revision$, $Date$
 #
-# STATUS: 2.6.25 work in progress
+# STATUS: 2.6.25 works, needs testing
 #
 # NOTE:
 # - suspend2 renamed to tuxonice (as project name)
@@ -46,6 +46,8 @@
 
 %bcond_with	rescuecd	# build kernel for our rescue
 
+%bcond_with	myown		# build with your own config (kernel-myown.config)
+
 %{?debug:%define with_verbose 1}
 
 %if %{without grsecurity}
@@ -117,7 +119,7 @@
 %define		netfilter_snap		20070806
 %define		xen_version		3.0.2
 
-%define		_alt_kernel	%{?with_pax:-pax}%{?with_grsec_full:-grsecurity}%{?with_xen0:-xen0}%{?with_xenU:-xenU}%{?with_rescuecd:-rescuecd}%{?with_pae:-pae}
+%define		_alt_kernel	%{?with_pax:-pax}%{?with_grsec_full:-grsecurity}%{?with_xen0:-xen0}%{?with_xenU:-xenU}%{?with_rescuecd:-rescuecd}%{?with_pae:-pae}%{?with_myown:-myown}
 
 # kernel release (used in filesystem and eventually in uname -r)
 # modules will be looked from /lib/modules/%{kernel_release}
@@ -1175,14 +1177,6 @@
 %{?debug:sed -i "s:# CONFIG_DEBUG_PREEMPT is not set:CONFIG_DEBUG_PREEMPT=y:" %{defconfig}}
 %{?debug:sed -i "s:# CONFIG_RT_DEADLOCK_DETECT is not set:CONFIG_RT_DEADLOCK_DETECT=y:" %{defconfig}}
 
-	ln -sf %{defconfig} .config
-	install -d $KERNEL_INSTALL_DIR%{_kernelsrcdir}/include/linux
-	rm -f include/linux/autoconf.h
-	%{__make} %CrossOpts include/linux/autoconf.h
-	install include/linux/autoconf.h \
-		$KERNEL_INSTALL_DIR%{_kernelsrcdir}/include/linux/autoconf-dist.h
-	install .config \
-		$KERNEL_INSTALL_DIR%{_kernelsrcdir}/config-dist
 }
 
 BuildKernel() {
@@ -1250,6 +1244,10 @@
 	install vmlinuz $KERNEL_INSTALL_DIR/boot/efi/vmlinuz-$KernelVer
 	ln -sf efi/vmlinuz-$KernelVer $KERNEL_INSTALL_DIR/boot/vmlinuz-$KernelVer
 %endif
+%ifarch arm
+	install arch/arm/boot/zImage $KERNEL_INSTALL_DIR/boot/vmlinuz-$KernelVer
+%endif
+
 	%{__make} %CrossOpts modules_install \
 		%{?with_verbose:V=1} \
 		DEPMOD=%DepMod \
@@ -1273,7 +1271,19 @@
 
 KERNEL_INSTALL_DIR="$KERNEL_BUILD_DIR/build-done/kernel"
 rm -rf $KERNEL_INSTALL_DIR
+%if %{without myown}
 BuildConfig
+%else
+cat $RPM_SOURCE_DIR/kernel-myown.config > %{defconfig}
+%endif
+ln -sf %{defconfig} .config
+install -d $KERNEL_INSTALL_DIR%{_kernelsrcdir}/include/linux
+rm -f include/linux/autoconf.h
+%{__make} %CrossOpts include/linux/autoconf.h
+install include/linux/autoconf.h \
+	$KERNEL_INSTALL_DIR%{_kernelsrcdir}/include/linux/autoconf-dist.h
+install .config \
+	$KERNEL_INSTALL_DIR%{_kernelsrcdir}/config-dist
 BuildKernel
 PreInstallKernel
 
@@ -1467,7 +1477,7 @@
 %endif
 /lib/modules/%{kernel_release}/kernel/crypto
 /lib/modules/%{kernel_release}/kernel/drivers
-%if %{have_drm}
+%if %{have_drm} && %{without myown}
 %exclude /lib/modules/%{kernel_release}/kernel/drivers/char/drm
 %endif
 /lib/modules/%{kernel_release}/kernel/fs
@@ -1477,16 +1487,18 @@
 
 /lib/modules/%{kernel_release}/kernel/lib
 /lib/modules/%{kernel_release}/kernel/net
-%if %{have_sound}
+%if %{have_sound} && %{without myown}
 %dir /lib/modules/%{kernel_release}/kernel/sound
 /lib/modules/%{kernel_release}/kernel/sound/ac97_bus.ko*
 /lib/modules/%{kernel_release}/kernel/sound/sound*.ko*
+%ifnarch sparc
 %exclude /lib/modules/%{kernel_release}/kernel/drivers/media/video/cx88/cx88-alsa.ko*
 %exclude /lib/modules/%{kernel_release}/kernel/drivers/media/video/em28xx/em28xx-alsa.ko*
 %exclude /lib/modules/%{kernel_release}/kernel/drivers/media/video/saa7134/saa7134-alsa.ko*
 %endif
+%endif
 %dir /lib/modules/%{kernel_release}/misc
-%if %{with pcmcia}
+%if %{with pcmcia} && %{without myown}
 %dir /lib/modules/%{kernel_release}/kernel/drivers/pcmcia
 /lib/modules/%{kernel_release}/kernel/drivers/pcmcia/pcmcia*ko*
 %exclude /lib/modules/%{kernel_release}/kernel/drivers/pcmcia/[!p]*
@@ -1520,13 +1532,13 @@
 /boot/vmlinux-%{kernel_release}
 %endif
 
-%if %{have_drm}
+%if %{have_drm} && %{without myown}
 %files drm
 %defattr(644,root,root,755)
 /lib/modules/%{kernel_release}/kernel/drivers/char/drm
 %endif
 
-%if %{with pcmcia}
+%if %{with pcmcia} && %{without myown}
 %files pcmcia
 %defattr(644,root,root,755)
 /lib/modules/%{kernel_release}/kernel/drivers/pcmcia/*ko*
@@ -1565,7 +1577,7 @@
 %endif
 %endif
 
-%if %{have_sound}
+%if %{have_sound} && %{without myown}
 %files sound-alsa
 %defattr(644,root,root,755)
 /lib/modules/%{kernel_release}/kernel/sound
@@ -1575,12 +1587,14 @@
 %if %{have_oss}
 %exclude /lib/modules/%{kernel_release}/kernel/sound/oss
 %endif
+%ifnarch sparc
 /lib/modules/%{kernel_release}/kernel/drivers/usb/gadget/g_midi.ko*
 /lib/modules/%{kernel_release}/kernel/drivers/media/video/cx88/cx88-alsa.ko*
 /lib/modules/%{kernel_release}/kernel/drivers/media/video/em28xx/em28xx-alsa.ko*
 /lib/modules/%{kernel_release}/kernel/drivers/media/video/saa7134/saa7134-alsa.ko*
+%endif
 
-%if %{have_oss}
+%if %{have_oss} && %{without myown}
 %files sound-oss
 %defattr(644,root,root,755)
 /lib/modules/%{kernel_release}/kernel/sound/oss
@@ -1672,6 +1686,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.441.2.1913  2008-05-26 15:45:44  zbyniu
+- bcond myown; fixed %files on sparc
+
 Revision 1.441.2.1912  2008-05-24 10:17:18  zbyniu
 - symbol consistency between packages completed
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SPECS/kernel.spec?r1=1.441.2.1912&r2=1.441.2.1913&f=u



More information about the pld-cvs-commit mailing list