[arch-commits] Commit in kernel26/repos (testing-i686 testing-i686/PKGBUILD)

Tobias Powalowski tpowa at archlinux.org
Fri Dec 4 10:31:11 EST 2009


    Date: Friday, December 4, 2009 @ 10:31:11
  Author: tpowa
Revision: 60382

Merged revisions 60380 via svnmerge from 
svn+ssh://gerolde.archlinux.org/srv/svn-packages/kernel26/trunk

........
  r60380 | tpowa | 2009-12-04 15:03:33 +0000 (Fr, 04 Dez 2009) | 2 lines
  
  upgpkg: kernel26 2.6.32-1
      splitted headers from normal kernel
........

Modified:
  kernel26/repos/testing-i686/	(properties)
  kernel26/repos/testing-i686/PKGBUILD

----------+
 PKGBUILD |   53 +++++++++++++++++++++++++++++++----------------------
 1 file changed, 31 insertions(+), 22 deletions(-)


Property changes on: kernel26/repos/testing-i686
___________________________________________________________________
Modified: svnmerge-integrated
   - /kernel26/trunk:1-60358
   + /kernel26/trunk:1-60381

Modified: testing-i686/PKGBUILD
===================================================================
--- testing-i686/PKGBUILD	2009-12-04 15:04:13 UTC (rev 60381)
+++ testing-i686/PKGBUILD	2009-12-04 15:31:11 UTC (rev 60382)
@@ -2,7 +2,7 @@
 # Maintainer: Tobias Powalowski <tpowa at archlinux.org>
 # Maintainer: Thomas Baechler <thomas at archlinux.org>
 pkgbase="kernel26"
-pkgname=('kernel26' 'kernel26-firmware') # Build stock -ARCH kernel
+pkgname=('kernel26' 'kernel26-firmware' 'kernel26-headers') # Build stock -ARCH kernel
 # pkgname=kernel26-custom       # Build kernel with a different name
 _kernelname=${pkgname#kernel26}
 _basekernel=2.6.32
@@ -80,6 +80,35 @@
   make INSTALL_MOD_PATH=${pkgdir} modules_install || return 1
   cp System.map ${pkgdir}/boot/System.map26${_kernelname}
   cp arch/$KARCH/boot/bzImage ${pkgdir}/boot/vmlinuz26${_kernelname}
+  #  # add vmlinux
+  install -m644 -D vmlinux ${pkgdir}/usr/src/linux-${_kernver}/vmlinux
+
+  # install fallback mkinitcpio.conf file and preset file for kernel
+  install -m644 -D ${srcdir}/kernel26.preset ${pkgdir}/etc/mkinitcpio.d/${pkgname}.preset || return 1
+  # set correct depmod command for install
+  sed \
+    -e  "s/KERNEL_NAME=.*/KERNEL_NAME=${_kernelname}/g" \
+    -e  "s/KERNEL_VERSION=.*/KERNEL_VERSION=${_kernver}/g" \
+    -i $startdir/kernel26.install
+  sed \
+    -e "s|source .*|source /etc/mkinitcpio.d/kernel26${_kernelname}.kver|g" \
+    -e "s|default_image=.*|default_image=\"/boot/${pkgname}.img\"|g" \
+    -e "s|fallback_image=.*|fallback_image=\"/boot/${pkgname}-fallback.img\"|g" \
+    -i ${pkgdir}/etc/mkinitcpio.d/${pkgname}.preset
+
+  echo -e "# DO NOT EDIT THIS FILE\nALL_kver='${_kernver}'" > ${pkgdir}/etc/mkinitcpio.d/${pkgname}.kver
+  # remove build and source links
+  rm -f ${pkgdir}/lib/modules/${_kernver}/{source,build}
+  # remove the firmware
+  rm -rf ${pkgdir}/lib/firmware
+}
+
+package_kernel26-headers() {
+  pkgdesc="Header files and scripts for building modules for kernel26"
+  mkdir -p ${pkgdir}/lib/modules/${_kernver}
+  cd ${pkgdir}/lib/modules/${_kernver}
+  ln -sf ../../../usr/src/linux-${_kernver} build
+  cd ${srcdir}/linux-$_basekernel
   install -D -m644 Makefile \
     ${pkgdir}/usr/src/linux-${_kernver}/Makefile
   install -D -m644 kernel/Makefile \
@@ -101,7 +130,7 @@
   cp -a scripts ${pkgdir}/usr/src/linux-${_kernver}
   # fix permissions on scripts dir
   chmod og-w -R ${pkgdir}/usr/src/linux-${_kernver}/scripts
-  #mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/.tmp_versions
+  mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/.tmp_versions
 
   mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/arch/$KARCH/kernel
 
@@ -158,8 +187,6 @@
   # in reference to:
   # http://bugs.archlinux.org/task/14568
   cp -a include/trace $pkgdir/usr/src/linux-${_kernver}/include/
-  # add vmlinux
-  cp vmlinux ${pkgdir}/usr/src/linux-${_kernver}
   # copy in Kconfig files
   for i in `find . -name "Kconfig*"`; do 
     mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/`echo $i | sed 's|/Kconfig.*||'`
@@ -172,26 +199,8 @@
 
   chown -R root.root ${pkgdir}/usr/src/linux-${_kernver}
   find ${pkgdir}/usr/src/linux-${_kernver} -type d -exec chmod 755 {} \;
-  cd ${pkgdir}/lib/modules/${_kernver} && \
-    (rm -f source build; ln -sf ../../../usr/src/linux-${_kernver} build)
-  # install fallback mkinitcpio.conf file and preset file for kernel
-  install -m644 -D ${srcdir}/kernel26.preset ${pkgdir}/etc/mkinitcpio.d/${pkgname}.preset || return 1
-  # set correct depmod command for install
-  sed \
-    -e  "s/KERNEL_NAME=.*/KERNEL_NAME=${_kernelname}/g" \
-    -e  "s/KERNEL_VERSION=.*/KERNEL_VERSION=${_kernver}/g" \
-    -i $startdir/kernel26.install
-  sed \
-    -e "s|source .*|source /etc/mkinitcpio.d/kernel26${_kernelname}.kver|g" \
-    -e "s|default_image=.*|default_image=\"/boot/${pkgname}.img\"|g" \
-    -e "s|fallback_image=.*|fallback_image=\"/boot/${pkgname}-fallback.img\"|g" \
-    -i ${pkgdir}/etc/mkinitcpio.d/${pkgname}.preset
-
-  echo -e "# DO NOT EDIT THIS FILE\nALL_kver='${_kernver}'" > ${pkgdir}/etc/mkinitcpio.d/${pkgname}.kver
   # remove unneeded architectures
   rm -rf ${pkgdir}/usr/src/linux-${_kernver}/arch/{alpha,arm,arm26,avr32,blackfin,cris,frv,h8300,ia64,m32r,m68k,m68knommu,mips,microblaze,mn10300,parisc,powerpc,ppc,s390,sh,sh64,sparc,sparc64,um,v850,xtensa}
-  # remove the firmware
-  rm -rf ${pkgdir}/lib/firmware
 }
 
 package_kernel26-firmware() {



More information about the arch-commits mailing list