Christos Nouskas avatar Christos Nouskas committed 9b5e0a5

3.4.4-pf

Comments (0)

Files changed (2)

 #_subversion=1
 _basekernel=$_major.$_minor
 _pkgname=linux-pf
-_pfrel=3
+_pfrel=4
 _kernelname=-pf
 _pfpatchhome="http://pf.natalenko.name/sources/${_basekernel}/"
 _pfpatchname="patch-${_basekernel}.${_pfrel}${_kernelname}"
 	cat "${startdir}/config" >| .config
    fi
 fi
-  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
   echo
   msg "Kernel configuration options before build:"
   echo "    <M> make menuconfig (console menu)"
   if [ "${_kernelname}" != "" ]; then
      sed -i "s|CONFIG_LOCALVERSION=.*|CONFIG_LOCALVERSION=\"\"|g" ./.config
   fi
-  # 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/depmod.sh
+
   # 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() {
  pkgdesc=${_pkgdesc}
  groups=('base')
  backup=(etc/mkinitcpio.d/${_pkgname}.preset)
- 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}"
+
   KARCH=x86
 
   # 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 System.map "$_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
+
 sha256sums=('ff3dee6a855873d12487a6f4070ec2f7996d073019171361c955639664baa0c6'
             '8cdfbc7ba1e94629dd166498dcbd52470faf427c2caf7fa096acefbd3b0e9ee5'
             '994896fa44b8e646d674540777d7b389d9a007f15b43a12b1ed98b3ac8d27be3'
             'b9d79ca33b0b51ff4f6976b7cd6dbb0b624ebf4fbf440222217f8ffc50445de4'
             '763eb938442e3112aa63c8e5153361254d9b2c9b20adce66c67892f14b89d1d4'
             '4bc5a3fc40bf60bd4b362b519219cae56141a9f209bd2cf6bed25c1bd434e2cc'
-            '85589bd4b97d0bf1bdb2618440ed92814cfced2e6cb8e6c961bf35a9b7798602')
+            '8d7141c06112155a8c64eb5b2635eb512dee958c49a2a7c3e81117545c699888')
 KERNEL_NAME=-pf
 KERNEL_VERSION=3.4-pf
 
+# 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
   hasgrub=$?
-  pacman -Q grub2 &>/dev/null
+  pacman -Q grub2-common &>/dev/null
   hasgrub2=$?
   pacman -Q lilo &>/dev/null
   haslilo=$?
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 ProjectModifiedEvent.java.
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.