Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

linux-uksm-ck 3.9.2-1

By: stewmario12 on May 12th, 2013  |  syntax: None  |  size: 17.01 KB  |  views: 57  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. # Contributor: Kelvin Ng (qpalz) <kelvin9302104 at gmail dot com>
  2.  
  3. ### PATCH AND BUILD OPTIONS
  4. # Set these variables to ANYTHING (yes or no or 1 or 0 or "I like icecream") to enable them
  5. #
  6. _makenconfig=           # Tweak kernel options prior to a build via nconfig
  7. _localmodcfg=           # Compile ONLY probed modules
  8. _use_current=           # Use the current kernel's .config file
  9. _BFQ_enable_=           # Enable BFQ as the default I/O scheduler
  10. _NUMAdisable=y  # Disable NUMA in kernel config
  11.  
  12. ### DOCS
  13. # Starting with the 3.6.9-3 release, this package ships with the kernel-3x-gcc47-x.patch.
  14. # This allows users an expanded scope of CPU specific options.
  15. # Consult the following resources to understand which option is right for you application:
  16. #
  17. # http://en.gentoo-wiki.com/wiki/Safe_Cflags/Intel
  18. # http://en.gentoo-wiki.com/wiki/Safe_Cflags/AMD
  19. # http://www.linuxforge.net/docs/linux/linux-gcc.php
  20. # http://gcc.gnu.org/onlinedocs/gcc/i386-and-x86_002d64-Options.html
  21.  
  22. # DETAILS FOR _localmodcfg=
  23. # As of mainline 2.6.32, running with this option will only build the modules that you currently have
  24. # probed in your system VASTLY reducing the number of modules built and the build time to do it.
  25. #
  26. # WARNING - make CERTAIN that all modules are modprobed BEFORE you begin making the pkg!
  27. #
  28. # To keep track of which modules are needed for your specific system/hardware, give my module_db script
  29. # a try: http://aur.archlinux.org/packages.php?ID=41689  Note that if you use my script, this PKGBUILD
  30. # will auto run the 'sudo modprobed_db reload' for you to probe all the modules you have logged!
  31. #
  32. # More at this wiki page ---> https://wiki.archlinux.org/index.php/Modprobed_db
  33.  
  34. # DETAILS FOR _use_current=
  35. # Enabling this option will use the .config of the RUNNING kernel rather than the ARCH defaults.
  36. # Useful when the package gets updated and you already went through the trouble of customizing your
  37. # config options.  NOT recommended when a new kernel is released, but again, convenient for package bumps.
  38.  
  39. # DETAILS FOR _BFQ_enable=
  40. # Alternative I/O scheduler by Paolo.  For more, see: http://algo.ing.unimo.it/people/paolo/disk_sched/
  41.  
  42. # DETAILS FOR _NUMAdisable=
  43. # Since 99.9% of users do not have multiple CPUs but do have multiple cores in one CPU
  44. # see, https://bugs.archlinux.org/task/31187
  45.  
  46. pkgname=linux-uksm-ck
  47. true && pkgname=(linux-uksm-ck linux-uksm-ck-headers)
  48. _kernelname=-uksm-ck
  49. _srcname=linux-3.9
  50. pkgver=3.9.2
  51. pkgrel=1
  52. arch=('i686' 'x86_64')
  53. url="http://kerneldedup.org/"
  54. license=('GPL2')
  55. options=('!strip')
  56. _ckpatchversion=1
  57. _ckpatchname="patch-3.9-ck${_ckpatchversion}"
  58. _gcc_patch="kernel-39-gcc48-1.patch"
  59. _bfqpath="http://www.algogroup.unimo.it/people/paolo/disk_sched/patches/3.9.0-v6r1"
  60. _uksmvernel="0.1.2.2"
  61. _uksmname="v3.9.ge.1"
  62. source=("http://www.kernel.org/pub/linux/kernel/v3.x/${_srcname}.tar.xz"
  63. "http://www.kernel.org/pub/linux/kernel/v3.x/patch-${pkgver}.xz"
  64. "http://ck.kolivas.org/patches/3.0/3.9/3.9-ck${_ckpatchversion}/${_ckpatchname}.bz2"
  65. "http://repo-ck.com/source/gcc_patch/${_gcc_patch}.gz"
  66. "http://kerneldedup.org/download/uksm/${_uksmvernel}/uksm-${_uksmvernel}-for-${_uksmname}.patch"
  67. 'linux-uksm-ck.preset'
  68. 'change-default-console-loglevel.patch'
  69. 'config' 'config.x86_64'
  70. "${_bfqpath}/0001-block-cgroups-kconfig-build-bits-for-BFQ-v6r1-3.9.patch"
  71. "${_bfqpath}/0002-block-introduce-the-BFQ-v6r1-I-O-sched-for-3.9.patch")
  72. sha256sums=('SKIP'
  73.             'SKIP'
  74.             'SKIP'
  75.             'SKIP'
  76.             'SKIP'
  77.             'SKIP'
  78.             'SKIP'
  79.             'SKIP'
  80.             'SKIP'
  81.             'SKIP'
  82.             'SKIP')
  83. build() {
  84.         cd "${srcdir}/${_srcname}"
  85.  
  86.         # add upstream patch
  87.         # msg "Patching source upstream patch set to $pkgver"
  88.         patch -p1 -i "${srcdir}/patch-${pkgver}"
  89.  
  90.         # set DEFAULT_CONSOLE_LOGLEVEL to 4 (same value as the 'quiet' kernel param)
  91.         # remove this when a Kconfig knob is made available by upstream
  92.         # (relevant patch sent upstream: https://lkml.org/lkml/2011/7/26/227)
  93.         patch -Np1 -i "${srcdir}/change-default-console-loglevel.patch"
  94.  
  95.         ### Patch source with ck patchset with BFS
  96.         # Fix double name in EXTRAVERSION
  97.         sed -i -re "s/^(.EXTRAVERSION).*$/\1 = /" "${srcdir}/${_ckpatchname}"
  98.         msg "Patching source with ck1 including bfs v0.428"
  99.         patch -Np1 -i "${srcdir}/${_ckpatchname}"
  100.  
  101.         ### Patch source to enable more gcc CPU optimizatons via the make nconfig
  102.         patch -Np1 -i "${srcdir}/${_gcc_patch}"
  103.  
  104.         #msg "Patching source with BFQ patches"
  105.         for p in $(ls ${srcdir}/000{1,2}-block*.patch); do
  106.                 patch -Np1 -i $p
  107.         done
  108.  
  109.   ### Patch source with UKSM
  110.   msg "Patching with UKSM"
  111.   patch -Np1 -i "${srcdir}/uksm-${_uksmvernel}-for-${_uksmname}.patch"
  112.  
  113.         ### Clean tree and copy ARCH config over
  114.         msg "Running make mrproper to clean source tree"
  115.         make mrproper
  116.  
  117.         if [ "${CARCH}" = "x86_64" ]; then
  118.                 cat "${srcdir}/config.x86_64" > ./.config
  119.         else
  120.                 cat "${srcdir}/config" > ./.config
  121.         fi
  122.  
  123.         ### Optionally use running kernel's config
  124.         # code originally by nous; http://aur.archlinux.org/packages.php?ID=40191
  125.         if [ -n "$_use_current" ]; then
  126.                 if [[ -s /proc/config.gz ]]; then
  127.                         msg "Extracting config from /proc/config.gz..."
  128.                         # modprobe configs
  129.                         zcat /proc/config.gz > ./.config
  130.                 else
  131.                         warning "You kernel was not compiled with IKCONFIG_PROC!"
  132.                         warning "You cannot read the current config!"
  133.                         warning "Aborting!"
  134.                         exit
  135.                 fi
  136.         fi
  137.  
  138.         if [ "${_kernelname}" != "" ]; then
  139.                 sed -i "s|CONFIG_LOCALVERSION=.*|CONFIG_LOCALVERSION=\"${_kernelname}\"|g" ./.config
  140.                 sed -i "s|CONFIG_LOCALVERSION_AUTO=.*|CONFIG_LOCALVERSION_AUTO=n|" ./.config
  141.         fi
  142.  
  143.         ### BFQ to be compiled in but not enabled
  144.         sed -i -e s'/CONFIG_CFQ_GROUP_IOSCHED=y/CONFIG_CFQ_GROUP_IOSCHED=y\nCONFIG_IOSCHED_BFQ=y\nCONFIG_CGROUP_BFQIO=y/' \
  145.                 -i -e s'/CONFIG_DEFAULT_CFQ=y/CONFIG_DEFAULT_CFQ=y\n# CONFIG_DEFAULT_BFQ is not set/' ./.config
  146.  
  147.         ### Optionally enable BFQ as the default io scheduler
  148.         if [ -n "$_BFQ_enable_" ]; then
  149.                 sed -i -e '/CONFIG_DEFAULT_IOSCHED/ s,cfq,bfq,' \
  150.                         -i -e s'/CONFIG_DEFAULT_CFQ=y/# CONFIG_DEFAULT_CFQ is not set\nCONFIG_DEFAULT_BFQ=y/' ./.config
  151.         fi
  152.  
  153.         # disable NUMA since 99.9% of users do not have multiple CPUs but do have multiple cores in one CPU
  154.         # see, https://bugs.archlinux.org/task/31187
  155.         if [ -n "$_NUMAdisable" ]; then
  156.                 if [ "${CARCH}" = "x86_64" ]; then
  157.                         sed -i -e 's/CONFIG_NUMA=y/# CONFIG_NUMA is not set/' \
  158.                                 -i -e '/CONFIG_AMD_NUMA=y/d' \
  159.                                 -i -e '/CONFIG_X86_64_ACPI_NUMA=y/d' \
  160.                                 -i -e '/CONFIG_NODES_SPAN_OTHER_NODES=y/d' \
  161.                                 -i -e '/# CONFIG_NUMA_EMU is not set/d' \
  162.                                 -i -e '/CONFIG_NODES_SHIFT=6/d' \
  163.                                 -i -e '/CONFIG_NEED_MULTIPLE_NODES=y/d' \
  164.                                 -i -e '/CONFIG_USE_PERCPU_NUMA_NODE_ID=y/d' \
  165.                                 -i -e '/CONFIG_ACPI_NUMA=y/d' ./.config
  166.                 fi
  167.         fi
  168.  
  169.         # set extraversion to pkgrel
  170.         sed -ri "s|^(EXTRAVERSION =).*|\1 -${pkgrel}|" Makefile
  171.  
  172.         # don't run depmod on 'make install'. We'll do this ourselves in packaging
  173.         sed -i '2iexit 0' scripts/depmod.sh
  174.  
  175.         # get kernel version
  176.         msg "Running make prepare for you to enable patched options of your choosing"
  177.         make prepare
  178.  
  179.         ### Optionally load needed modules for the make localmodconfig
  180.         # See http://aur.archlinux.org/packages.php?ID=41689
  181.         if [ -n "$_localmodcfg" ]; then
  182.                 msg "If you have modprobe_db installed, running it in recall mode now"
  183.                 if [ -e /usr/bin/modprobed_db ]; then
  184.                         [[ ! -x /usr/bin/sudo ]] && echo "Cannot call modprobe with sudo.  Install via pacman -S sudo and configure to work with this user." && exit 1
  185.                         sudo /usr/bin/modprobed_db recall
  186.                 fi
  187.                 msg "Running Steven Rostedt's make localmodconfig now"
  188.                 make localmodconfig
  189.         fi
  190.  
  191.         if [ -n "$_makenconfig" ]; then
  192.                 msg "Running make nconfig"
  193.                 make nconfig
  194.         fi
  195.  
  196.         msg "Running make bzImage and modules"
  197.         make ${MAKEFLAGS} LOCALVERSION= bzImage modules
  198. }
  199.  
  200. package_linux-uksm-ck() {
  201.         _Kpkgdesc='Linux Kernel and modules with the ck1 patchset featuring the Brain Fuck Scheduler v0.428, and with the UKSM patchset featuring the v0.1.2.2.'
  202.         pkgdesc="${_Kpkgdesc}"
  203.         depends=('coreutils' 'linux-firmware' 'mkinitcpio>=0.7')
  204.         optdepends=('crda: to set the correct wireless channels of your country' 'lirc-ck: Linux Infrared Remote Control kernel modules for linux-uksm-ck' 'nvidia-ck: nVidia drivers for linux-uksm-ck' 'nvidia-beta-ck: nVidia beta drivers for linux-uksm-ck' 'modprobed_db: Keeps track of EVERY kernel module that has ever been probed - useful for those of us who make localmodconfig')
  205.         provides=("linux-uksm-ck=${pkgver}")
  206.   conflicts=('kernel26-ck')
  207.   replaces=('kernel26-ck')
  208.         backup=("etc/mkinitcpio.d/linux-uksm-ck.preset")
  209.         install=linux-uksm-ck.install
  210.         #groups=('ck-generic')
  211.  
  212.         cd "${srcdir}/${_srcname}"
  213.  
  214.         KARCH=x86
  215.  
  216.         # get kernel version
  217.         _kernver="$(make LOCALVERSION= kernelrelease)"
  218.         _basekernel=${_kernver%%-*}
  219.         _basekernel=${_basekernel%.*}
  220.  
  221.         mkdir -p "${pkgdir}"/{lib/modules,lib/firmware,boot}
  222.         make LOCALVERSION= INSTALL_MOD_PATH="${pkgdir}" modules_install
  223.         cp arch/$KARCH/boot/bzImage "${pkgdir}/boot/vmlinuz-linux-uksm-ck"
  224.  
  225.         # add vmlinux
  226.         install -D -m644 vmlinux "${pkgdir}/usr/src/linux-${_kernver}/vmlinux"
  227.  
  228.         # install fallback mkinitcpio.conf file and preset file for kernel
  229.         install -D -m644 "${srcdir}/linux-uksm-ck.preset" "${pkgdir}/etc/mkinitcpio.d/linux-uksm-ck.preset"
  230.  
  231.         # set correct depmod command for install
  232.         sed \
  233.                 -e  "s/KERNEL_NAME=.*/KERNEL_NAME=-uksm-ck/g" \
  234.                 -e  "s/KERNEL_VERSION=.*/KERNEL_VERSION=${_kernver}/g" \
  235.                 -i "${startdir}/linux-uksm-ck.install"
  236.         sed \
  237.                 -e "1s|'linux.*'|'linux-uksm-ck'|" \
  238.                 -e "s|ALL_kver=.*|ALL_kver=\"/boot/vmlinuz-linux-uksm-ck\"|" \
  239.                 -e "s|default_image=.*|default_image=\"/boot/initramfs-linux-uksm-ck.img\"|" \
  240.                 -e "s|fallback_image=.*|fallback_image=\"/boot/initramfs-linux-uksm-ck-fallback.img\"|" \
  241.                 -i "${pkgdir}/etc/mkinitcpio.d/linux-uksm-ck.preset"
  242.  
  243.         # remove build and source links
  244.         rm -f "${pkgdir}"/lib/modules/${_kernver}/{source,build}
  245.         # remove the firmware
  246.         rm -rf "${pkgdir}/lib/firmware"
  247.         # gzip -9 all modules to save 100MB of space
  248.         find "${pkgdir}" -name '*.ko' -exec gzip -9 {} \;
  249.         # make room for external modules
  250.         ln -s "../extramodules-${_basekernel}${_kernelname:ck}" "${pkgdir}/lib/modules/${_kernver}/extramodules"
  251.         # add real version for building modules and running depmod from post_install/upgrade
  252.         mkdir -p "${pkgdir}/lib/modules/extramodules-${_basekernel}${_kernelname:ck}"
  253.         echo "${_kernver}" > "${pkgdir}/lib/modules/extramodules-${_basekernel}${_kernelname:ck}/version"
  254.  
  255.         # Now we call depmod...
  256.         depmod -b "$pkgdir" -F System.map "$_kernver"
  257.  
  258.         # move module tree /lib -> /usr/lib
  259.         mv "$pkgdir/lib" "$pkgdir/usr"
  260. }
  261.  
  262. package_linux-uksm-ck-headers() {
  263.         _Hpkgdesc='Header files and scripts to build modules for linux-uksm-ck.'
  264.         pkgdesc="${_Hpkgdesc}"
  265.         depends=('linux-uksm-ck') # added to keep kernel and headers packages matched
  266.   provides=("linux-uksm-ck-headers=${pkgver}" "linux-headers=${pkgver}")
  267.   conflicts=('kernel26-uksm-headers')
  268.   replaces=('kernel26-uksm-headers')
  269.         #groups=('ck-generic')
  270.  
  271.         install -dm755 "${pkgdir}/usr/lib/modules/${_kernver}"
  272.  
  273.         cd "${pkgdir}/usr/lib/modules/${_kernver}"
  274.         ln -sf ../../../src/linux-${_kernver} build
  275.  
  276.         cd "${srcdir}/${_srcname}"
  277.         install -D -m644 Makefile \
  278.                 "${pkgdir}/usr/src/linux-${_kernver}/Makefile"
  279.         install -D -m644 kernel/Makefile \
  280.                 "${pkgdir}/usr/src/linux-${_kernver}/kernel/Makefile"
  281.         install -D -m644 .config \
  282.                 "${pkgdir}/usr/src/linux-${_kernver}/.config"
  283.  
  284.         mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/include"
  285.  
  286.         for i in acpi asm-generic config crypto drm generated linux math-emu \
  287.                 media net pcmcia scsi sound trace uapi video xen; do
  288.                 cp -a include/${i} "${pkgdir}/usr/src/linux-${_kernver}/include/"
  289.         done
  290.  
  291.         # copy arch includes for external modules
  292.         mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/arch/x86"
  293.         cp -a arch/x86/include "${pkgdir}/usr/src/linux-${_kernver}/arch/x86/"
  294.  
  295.         # copy files necessary for later builds, like nvidia and vmware
  296.         cp Module.symvers "${pkgdir}/usr/src/linux-${_kernver}"
  297.         cp -a scripts "${pkgdir}/usr/src/linux-${_kernver}"
  298.  
  299.         # fix permissions on scripts dir
  300.         chmod og-w -R "${pkgdir}/usr/src/linux-${_kernver}/scripts"
  301.         mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/.tmp_versions"
  302.  
  303.         mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/arch/${KARCH}/kernel"
  304.  
  305.         cp arch/${KARCH}/Makefile "${pkgdir}/usr/src/linux-${_kernver}/arch/${KARCH}/"
  306.  
  307.         if [ "${CARCH}" = "i686" ]; then
  308.                 cp arch/${KARCH}/Makefile_32.cpu "${pkgdir}/usr/src/linux-${_kernver}/arch/${KARCH}/"
  309.         fi
  310.  
  311.         cp arch/${KARCH}/kernel/asm-offsets.s "${pkgdir}/usr/src/linux-${_kernver}/arch/${KARCH}/kernel/"
  312.  
  313.         # add headers for lirc package
  314.         # pci
  315.         for i in bt8xx cx88 saa7134; do
  316.                 mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/pci/${i}"
  317.                 cp -a drivers/media/pci/${i}/*.h "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/pci/${i}"
  318.         done
  319.         # usb
  320.         for i in cpia2 em28xx pwc sn9c102; do
  321.                 mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/usb/${i}"
  322.                 cp -a drivers/media/usb/${i}/*.h "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/usb/${i}"
  323.         done
  324.         # i2c
  325.         mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/i2c"
  326.         cp drivers/media/i2c/*.h  "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/i2c/"
  327.         for i in cx25840; do
  328.                 mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/i2c/${i}"
  329.                 cp -a drivers/media/i2c/${i}/*.h "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/i2c/${i}"
  330.         done
  331.  
  332.         # add docbook makefile
  333.         install -D -m644 Documentation/DocBook/Makefile \
  334.                 "${pkgdir}/usr/src/linux-${_kernver}/Documentation/DocBook/Makefile"
  335.  
  336.         # add dm headers
  337.         mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/drivers/md"
  338.         cp drivers/md/*.h "${pkgdir}/usr/src/linux-${_kernver}/drivers/md"
  339.  
  340.         # add inotify.h
  341.         mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/include/linux"
  342.         cp include/linux/inotify.h "${pkgdir}/usr/src/linux-${_kernver}/include/linux/"
  343.  
  344.         # add wireless headers
  345.         mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/net/mac80211/"
  346.         cp net/mac80211/*.h "${pkgdir}/usr/src/linux-${_kernver}/net/mac80211/"
  347.  
  348.         # add dvb headers for external modules
  349.         # in reference to:
  350.         # http://bugs.archlinux.org/task/9912
  351.         mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb-core"
  352.         cp drivers/media/dvb-core/*.h "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb-core/"
  353.         # and...
  354.         # http://bugs.archlinux.org/task/11194
  355.         mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/include/config/dvb/"
  356.        
  357.         # this line will allow the package to build if a user disables the dvb shit
  358.   [[ -d include/config/dvb ]] && find include/config/dvb -name '*.h' -exec cp {} \
  359.     "${pkgdir}/usr/src/linux-${_kernver}/include/config/dvb/" \;
  360.  
  361.         # add dvb headers for http://mcentral.de/hg/~mrec/em28xx-new
  362.         # in reference to:
  363.         # http://bugs.archlinux.org/task/13146
  364.         mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb-frontends/"
  365.         cp drivers/media/dvb-frontends/lgdt330x.h "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb-frontends/"
  366.         cp drivers/media/i2c/msp3400-driver.h "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/i2c/"
  367.  
  368.         # add dvb headers
  369.         # in reference to:
  370.         # http://bugs.archlinux.org/task/20402
  371.         mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/usb/dvb-usb"
  372.         cp drivers/media/usb/dvb-usb/*.h "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/usb/dvb-usb/"
  373.         mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb-frontends"
  374.         cp drivers/media/dvb-frontends/*.h "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb-frontends/"
  375.         mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/tuners"
  376.         cp drivers/media/tuners/*.h "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/tuners/"
  377.  
  378.         # add xfs and shmem for aufs building
  379.         mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/fs/xfs"
  380.         mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/mm"
  381.         cp fs/xfs/xfs_sb.h "${pkgdir}/usr/src/linux-${_kernver}/fs/xfs/xfs_sb.h"
  382.  
  383.         # copy in Kconfig files
  384.         for i in `find . -name "Kconfig*"`; do
  385.                 mkdir -p "${pkgdir}"/usr/src/linux-${_kernver}/`echo ${i} | sed 's|/Kconfig.*||'`
  386.                 cp ${i} "${pkgdir}/usr/src/linux-${_kernver}/${i}"
  387.         done
  388.  
  389.         chown -R root.root "${pkgdir}/usr/src/linux-${_kernver}"
  390.         find "${pkgdir}/usr/src/linux-${_kernver}" -type d -exec chmod 755 {} \;
  391.  
  392.         # strip scripts directory
  393.         find "${pkgdir}/usr/src/linux-${_kernver}/scripts" -type f -perm -u+w 2>/dev/null | while read binary ; do
  394.         case "$(file -bi "${binary}")" in
  395.                 *application/x-sharedlib*) # Libraries (.so)
  396.                         /usr/bin/strip ${STRIP_SHARED} "${binary}";;
  397.                 *application/x-archive*) # Libraries (.a)
  398.                         /usr/bin/strip ${STRIP_STATIC} "${binary}";;
  399.                 *application/x-executable*) # Binaries
  400.                         /usr/bin/strip ${STRIP_BINARIES} "${binary}";;
  401.         esac
  402.         done
  403.  
  404.         # remove unneeded architectures
  405.         rm -rf "${pkgdir}"/usr/src/linux-${_kernver}/arch/{alpha,arm,arm26,avr32,blackfin,c6x,cris,frv,h8300,hexagon,ia64,m32r,m68k,m68knommu,mips,microblaze,mn10300,openrisc,parisc,powerpc,ppc,s390,score,sh,sh64,sparc,sparc64,tile,unicore32,um,v850,xtensa}
  406. }
  407.  
  408. # Global pkgdesc and depends are here so that they will be picked up by AUR
  409. pkgdesc='Linux Kernel and modules with the ck1 patchset featuring the Brain Fuck Scheduler v0.428, and with the UKSM patchset featuring the v0.1.2.2.'
  410.  
  411. # vim:set ts=2 sw=2 et: