Christos Nouskas avatar Christos Nouskas committed 9b5e0a5


Comments (0)

Files changed (2)

 	cat "${startdir}/config" >| .config
-  sed -i "s/EXTRAVERSION = -${_pfrel}/EXTRAVERSION = ${_kernelname}/" Makefile
-  _arch=$CARCH
 if [[ "$_BATCH" != "y" ]]; then		# for batch building
   # Make some good use of MAKEFLAGS
   # MAKEFLAGS=`grep -v '#' /etc/makepkg.conf | grep MAKEFLAGS= | sed s/MAKEFLAGS=// | sed s/\"//g`
-  # make prepare
-  # Option for make menuconfig
+  make prepare
+  # Options for additional configuration
   msg "Kernel configuration options before build:"
   echo "    <M> make menuconfig (console menu)"
   if [ "${_kernelname}" != "" ]; then
      sed -i "s|CONFIG_LOCALVERSION=.*|CONFIG_LOCALVERSION=\"\"|g" ./.config
-  # remove the sublevel from Makefile
-  # this ensures our kernel version is always 3.X-pf
-  # this way, minor kernel updates will not break external modules
+  # Set EXTRAVERSION to -pf
+  sed -i "s/EXTRAVERSION = -${_pfrel}/EXTRAVERSION = ${_kernelname}/" Makefile
+  _arch=$CARCH
+  # Remove the sublevel from Makefile
+  # This ensures our kernel version is always 3.X-pf
+  # This way, minor kernel updates will not break external modules
   sed -ri 's|^(SUBLEVEL =).*|\1|' Makefile
+  # Don't run depmod on 'make install'. We'll do this ourselves in packaging
+  sed -i '2iexit 0' scripts/
   # If the following is set, stop right there. We only need the headers for
   # dependent drivers' compiling
   [[ ${_NOBUILD} ]] && exit 0
   # Build
   # Want extreme and non-sensical optimization? Uncomment the following line!
   # export KCFLAGS="-march=native -Ofast"
-  make bzImage modules
+  make ${MAKEFLAGS} bzImage modules
 package_linux-pf() {
- depends=('coreutils' 'linux-firmware' 'kmod' 'mkinitcpio>=0.7')
+ depends=('coreutils' 'linux-firmware' 'kmod>=9-2' 'mkinitcpio>=0.7')
  optdepends=('linux-docs: Kernel hackers manual - HTML documentation that comes with the Linux kernel.'
 	    'crda: to set the correct wireless channels of your country'
 	    'pm-utils: utilities and scripts for suspend and hibernate power management'
  ### package_linux-pf
  ### c/p from linux-ARCH
+  cd "${srcdir}/linux-${_basekernel}"
   # get kernel version
   mkdir -p "${pkgdir}/lib/modules/extramodules-${_basekernel}${_kernelname:--pf}"
   echo "${_kernver}" > "${pkgdir}/lib/modules/extramodules-${_basekernel}${_kernelname:--pf}/version"
+  # move module tree /lib -> /usr/lib
+  mv "$pkgdir/lib" "$pkgdir/usr"
+  # Now we call depmod...
+  depmod -b "$pkgdir" -F "$_kernver"
 # end c/p
 # c/p from linux-ARCH
- mkdir -p "${pkgdir}/lib/modules/${_kernver}"
+  install -dm755 "${pkgdir}/usr/lib/modules/${_kernver}"
-  cd "${pkgdir}/lib/modules/${_kernver}"
-  ln -sf ../../../usr/src/linux-${_kernver} build
+  cd "${pkgdir}/usr/lib/modules/${_kernver}"
+  ln -sf ../../../src/linux-${_kernver} build
   cd "${srcdir}/linux-${_basekernel}"
   install -D -m644 Makefile \
 pkgdesc="Linux kernel and modules with the pf-kernel patch [-ck patchset (BFS included), TuxOnIce, BFQ] and aufs3"
 # makepkg -g >>PKGBUILD
-            '85589bd4b97d0bf1bdb2618440ed92814cfced2e6cb8e6c961bf35a9b7798602')
+            '8d7141c06112155a8c64eb5b2635eb512dee958c49a2a7c3e81117545c699888')
+# set a sane PATH to ensure that critical utils like depmod will be found
+export PATH='/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin'
 post_install () {
   # updating module dependencies
   echo ">>> Updating module dependencies. Please wait ..."
 post_upgrade() {
   pacman -Q grub &>/dev/null
-  pacman -Q grub2 &>/dev/null
+  pacman -Q grub2-common &>/dev/null
   pacman -Q lilo &>/dev/null
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.