SPECS (LINUX_2_6_22): kernel-desktop.spec - merge better {build, so...

glen glen at pld-linux.org
Wed Feb 27 16:03:41 CET 2008


Author: glen                         Date: Wed Feb 27 15:03:41 2008 GMT
Module: SPECS                         Tag: LINUX_2_6_22
---- Log message:
- merge better {build,source} symlinks handling from kernel-vanilla.spec

---- Files affected:
SPECS:
   kernel-desktop.spec (1.165.2.1 -> 1.165.2.2) 

---- Diffs:

================================================================
Index: SPECS/kernel-desktop.spec
diff -u SPECS/kernel-desktop.spec:1.165.2.1 SPECS/kernel-desktop.spec:1.165.2.2
--- SPECS/kernel-desktop.spec:1.165.2.1	Tue Feb 26 13:09:45 2008
+++ SPECS/kernel-desktop.spec	Wed Feb 27 16:03:35 2008
@@ -840,6 +840,8 @@
 
 # ghost initrd not to leave images around when pkg is uninstalled
 touch $RPM_BUILD_ROOT/boot/initrd-%{kernel_release}.gz
+rm -f $RPM_BUILD_ROOT/lib/modules/%{kernel_release}/{build,source}
+touch $RPM_BUILD_ROOT/lib/modules/%{kernel_release}/{build,source}
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -925,6 +927,15 @@
 	fi
 fi
 
+%triggerin module-build -- %{name} = %{epoch}:%{version}-%{release}
+ln -sfn %{_kernelsrcdir} /lib/modules/%{kernel_release}/build
+ln -sfn %{_kernelsrcdir} /lib/modules/%{kernel_release}/source
+
+%triggerun module-build -- %{name} = %{epoch}:%{version}-%{release}
+if [ "$1" = 0 ]; then
+	rm -f /lib/modules/%{kernel_release}/{build,source}
+fi
+
 %files
 %defattr(644,root,root,755)
 /boot/vmlinuz-%{kernel_release}
@@ -956,8 +967,10 @@
 %exclude /lib/modules/%{kernel_release}/kernel/drivers/serial/serial_cs.ko*
 %exclude /lib/modules/%{kernel_release}/kernel/drivers/telephony/ixj_pcmcia.ko*
 %exclude /lib/modules/%{kernel_release}/kernel/drivers/usb/host/sl811_cs.ko*
-/lib/modules/%{kernel_release}/build
 %ghost /lib/modules/%{kernel_release}/modules.*
+%ghost /lib/modules/%{kernel_release}/build
+%ghost /lib/modules/%{kernel_release}/source
+
 %dir %{_sysconfdir}/modprobe.d/%{kernel_release}
 
 %ifarch alpha %{ix86} %{x8664} sparc sparc64
@@ -1072,6 +1085,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.165.2.2  2008-02-27 15:03:35  glen
+- merge better {build,source} symlinks handling from kernel-vanilla.spec
+
 Revision 1.165.2.1  2008-02-26 12:09:45  glen
 - update to 2.6.22.19
 
================================================================

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



More information about the pld-cvs-commit mailing list