Arch/PKGBUILD
author Andreas Boehler <andreas _AT_ aboehler.at>
Wed, 23 Oct 2013 22:50:29 +0200
changeset 6 35c0804c8ca2
permissions -rw-r--r--
Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
6
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
     1
# Maintainer: Mike Staszel <mikestaszel@plugapps.com>
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
     2
# Maintainer: Kevin Mihelich <kevin@archlinuxarm.org>
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
     3
# Maintainer: Jason Plum <jplum@archlinuxarm.org>
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
     4
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
     5
buildarch=2
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
     6
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
     7
pkgbase=linux-dns320l
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
     8
pkgname=('linux-dns320l' 'linux-headers-dns320l')
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
     9
# pkgname=linux-custom       # Build kernel with a different name
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
    10
_kernelname=${pkgname#linux}
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
    11
_basekernel=3.11
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
    12
pkgver=${_basekernel}.1
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
    13
pkgrel=2
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
    14
arch=('arm')
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
    15
url="http://www.kernel.org/"
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
    16
license=('GPL2')
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
    17
makedepends=('xmlto' 'docbook-xsl' 'uboot-mkimage')
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
    18
options=('!strip')
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
    19
source=("ftp://ftp.kernel.org/pub/linux/kernel/v3.x/linux-${_basekernel}.tar.bz2"
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
    20
        "ftp://ftp.kernel.org/pub/linux/kernel/v3.x/patch-${pkgver}.bz2"
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
    21
        'dns320l.patch'
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
    22
        'led_fixes.patch'
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
    23
        'config'
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
    24
        'mach-types::http://www.arm.linux.org.uk/developer/machines/download.php'
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
    25
        )
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
    26
md5sums=('17c6c1bc3d96547c05dfa74344480142'
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
    27
         '31e63fa819c76eadcaef2afa2e91b74c'
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
    28
         '2dfdfde68f1193e2e5127039d68cb7cf'
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
    29
         'c168b19148b66d6693cb371e3ab324e3'
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
    30
         '241a87eac40403cd5b19014257f4d088'
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
    31
         'SKIP')
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
    32
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
    33
build() {
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
    34
msg "Patches:"
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
    35
  cd "${srcdir}/linux-${_basekernel}"
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
    36
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
    37
msg2 "Add upstream patch"
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
    38
  patch -p1 -i "${srcdir}/patch-${pkgver}"
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
    39
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
    40
msg2 "Add the DNS320L patch for kirkwoods"
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
    41
  patch -p1 -i "${srcdir}/dns320l.patch"
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
    42
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
    43
msg2 "Add the LED fixes patch for DNS320l"
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
    44
  # FS#26528
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
    45
  patch -p1 -i "${srcdir}/led_fixes.patch"
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
    46
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
    47
msg2 "Add mach-types"
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
    48
  cp "${srcdir}/mach-types" arch/arm/tools
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
    49
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
    50
  cat "${srcdir}/config" > ./.config
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
    51
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
    52
  # set extraversion to pkgrel
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
    53
  sed -ri "s|^(EXTRAVERSION =).*|\1 -${pkgrel}|" Makefile
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
    54
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
    55
  # don't run depmod on 'make install'. We'll do this ourselves in packaging
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
    56
  sed -i '2iexit 0' scripts/depmod.sh
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
    57
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
    58
  # get kernel version
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
    59
  make prepare
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
    60
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
    61
  # load configuration
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
    62
  # Configure the kernel. Replace the line below with one of your choice.
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
    63
  #make menuconfig # CLI menu for configuration
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
    64
  #make nconfig # new CLI menu for configuration
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
    65
  #make xconfig # X-based configuration
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
    66
  #make oldconfig # using old config from previous kernel version
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
    67
  # ... or manually edit .config
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
    68
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
    69
  # Copy back our configuration (use with new kernel version)
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
    70
  #cp ./.config ../${_basekernel}.config
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
    71
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
    72
  ####################
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
    73
  # stop here
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
    74
  # this is useful to configure the kernel
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
    75
  #msg "Stopping build"
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
    76
  #return 1
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
    77
  ####################
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
    78
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
    79
  #yes "" | make config
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
    80
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
    81
msg "Building!"
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
    82
  make ${MAKEFLAGS} uImage modules
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
    83
}
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
    84
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
    85
package_linux-dns320l() {
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
    86
  pkgdesc="The Linux Kernel and modules"
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
    87
  depends=('coreutils' 'linux-firmware' 'module-init-tools>=3.16' 'mkinitcpio>=0.7')
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
    88
  optdepends=('crda: to set the correct wireless channels of your country')
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
    89
  provides=('kernel26' 'aufs_friendly' 'cryptodev_friendly')
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
    90
  conflicts=('kernel26')
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
    91
  replaces=('kernel26')
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
    92
  install=${pkgname}.install
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
    93
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
    94
  cd "${srcdir}/linux-${_basekernel}"
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
    95
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
    96
  KARCH=arm
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
    97
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
    98
  # get kernel version
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
    99
  _kernver="$(make kernelrelease)"
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   100
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   101
  mkdir -p "${pkgdir}"/{lib/modules,lib/firmware,boot}
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   102
  make INSTALL_MOD_PATH="${pkgdir}" modules_install
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   103
  cp arch/$KARCH/boot/uImage "${pkgdir}/boot/uImage"
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   104
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   105
  # set correct depmod command for install
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   106
  sed \
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   107
    -e  "s/KERNEL_NAME=.*/KERNEL_NAME=${_kernelname}/g" \
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   108
    -e  "s/KERNEL_VERSION=.*/KERNEL_VERSION=${_kernver}/g" \
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   109
    -i "${startdir}/${pkgname}.install"
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   110
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   111
  # remove build and source links
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   112
  rm -f "${pkgdir}"/lib/modules/${_kernver}/{source,build}
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   113
  # remove the firmware
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   114
  rm -rf "${pkgdir}/lib/firmware"
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   115
  # gzip -9 all modules to save 100MB of space
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   116
  find "${pkgdir}" -name '*.ko' |xargs -P 2 -n 1 gzip -9
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   117
  # make room for external modules
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   118
  ln -s "../extramodules-${_basekernel}-${_kernelname:-ARCH}" "${pkgdir}/lib/modules/${_kernver}/extramodules"
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   119
  # add real version for building modules and running depmod from post_install/upgrade
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   120
  mkdir -p "${pkgdir}/lib/modules/extramodules-${_basekernel}-${_kernelname:-ARCH}"
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   121
  echo "${_kernver}" > "${pkgdir}/lib/modules/extramodules-${_basekernel}-${_kernelname:-ARCH}/version"
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   122
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   123
  cd "${srcdir}/linux-${_basekernel}"
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   124
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   125
  # Now we call depmod...
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   126
  depmod -b "$pkgdir" -F System.map "$_kernver"
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   127
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   128
  # move module tree /lib -> /usr/lib
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   129
  mkdir -p "${pkgdir}/usr"
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   130
  mv "$pkgdir/lib" "$pkgdir/usr"
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   131
}
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   132
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   133
package_linux-headers-dns320l() {
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   134
  pkgdesc="Header files and scripts for building modules for linux kernel - Marvell Kirkwood"
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   135
  provides=('kernel26-headers' 'linux-headers=${pkgver}')
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   136
  conflicts=('kernel26-headers' 'linux-headers')
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   137
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   138
  install -dm755 "${pkgdir}/usr/lib/modules/${_kernver}"
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   139
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   140
  cd "${pkgdir}/usr/lib/modules/${_kernver}"
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   141
  ln -sf ../../../src/linux-${_kernver} build
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   142
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   143
  cd "${srcdir}/linux-${_basekernel}"
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   144
  install -D -m644 Makefile \
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   145
    "${pkgdir}/usr/src/linux-${_kernver}/Makefile"
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   146
  install -D -m644 kernel/Makefile \
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   147
    "${pkgdir}/usr/src/linux-${_kernver}/kernel/Makefile"
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   148
  install -D -m644 .config \
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   149
    "${pkgdir}/usr/src/linux-${_kernver}/.config"
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   150
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   151
  mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/include"
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   152
  make headers_install INSTALL_HDR_PATH="${pkgdir}/usr/src/linux-${_kernver}"
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   153
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   154
# Clean up unneeded files
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   155
#  find "${pkgdir}" -name "..install.cmd" -delete
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   156
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   157
  for i in acpi asm-generic config crypto drm generated linux math-emu \
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   158
    media net pcmcia scsi sound trace uapi video xen; do
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   159
    cp -a include/${i} "${pkgdir}/usr/src/linux-${_kernver}/include/"
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   160
  done
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   161
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   162
  # copy arch includes for external modules
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   163
  mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/arch/arm
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   164
  cp -a arch/arm/include ${pkgdir}/usr/src/linux-${_kernver}/arch/arm/
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   165
  mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/arch/arm/mach-kirkwood   
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   166
  cp -a arch/arm/mach-kirkwood/include ${pkgdir}/usr/src/linux-${_kernver}/arch/arm/mach-kirkwood/
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   167
  mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/arch/arm/plat-orion
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   168
  cp -a arch/arm/plat-orion/include ${pkgdir}/usr/src/linux-${_kernver}/arch/arm/plat-orion/
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   169
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   170
  # copy files necessary for later builds, like nvidia and vmware
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   171
  cp Module.symvers "${pkgdir}/usr/src/linux-${_kernver}"
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   172
  cp -a scripts "${pkgdir}/usr/src/linux-${_kernver}"
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   173
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   174
  # fix permissions on scripts dir
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   175
  chmod og-w -R "${pkgdir}/usr/src/linux-${_kernver}/scripts"
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   176
  mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/.tmp_versions"
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   177
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   178
  mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/arch/arm/kernel"
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   179
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   180
  cp arch/arm/Makefile "${pkgdir}/usr/src/linux-${_kernver}/arch/arm/"
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   181
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   182
  cp arch/arm/kernel/asm-offsets.s "${pkgdir}/usr/src/linux-${_kernver}/arch/arm/kernel/"
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   183
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   184
 # add headers for lirc package
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   185
  # pci
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   186
  for i in bt8xx cx88 saa7134; do
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   187
mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/pci/${i}"
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   188
    cp -a drivers/media/pci/${i}/*.h "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/pci/${i}"
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   189
  done
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   190
  # usb
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   191
  for i in cpia2 em28xx pwc sn9c102; do
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   192
mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/usb/${i}"
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   193
    cp -a drivers/media/usb/${i}/*.h "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/usb/${i}"
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   194
  done
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   195
  # i2c
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   196
  mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/i2c"
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   197
  cp drivers/media/i2c/*.h "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/i2c/"
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   198
  for i in cx25840; do
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   199
mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/i2c/${i}"
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   200
    cp -a drivers/media/i2c/${i}/*.h "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/i2c/${i}"
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   201
  done
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   202
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   203
  # add docbook makefile
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   204
  install -D -m644 Documentation/DocBook/Makefile \
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   205
    "${pkgdir}/usr/src/linux-${_kernver}/Documentation/DocBook/Makefile"
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   206
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   207
# add dm headers
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   208
  mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/drivers/md"
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   209
  cp drivers/md/*.h "${pkgdir}/usr/src/linux-${_kernver}/drivers/md"
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   210
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   211
  # add inotify.h
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   212
  mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/include/linux"
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   213
  cp include/linux/inotify.h "${pkgdir}/usr/src/linux-${_kernver}/include/linux/"
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   214
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   215
  # add wireless headers
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   216
  mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/net/mac80211/"
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   217
  cp net/mac80211/*.h "${pkgdir}/usr/src/linux-${_kernver}/net/mac80211/"
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   218
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   219
  # add dvb headers for external modules
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   220
  # in reference to:
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   221
  # http://bugs.archlinux.org/task/9912
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   222
  mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb-core"
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   223
  cp drivers/media/dvb-core/*.h "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb-core/"
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   224
  # and...
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   225
  # http://bugs.archlinux.org/task/11194
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   226
  mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/include/config/dvb/"
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   227
  cp include/config/dvb/*.h "${pkgdir}/usr/src/linux-${_kernver}/include/config/dvb/"
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   228
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   229
  # add dvb headers for http://mcentral.de/hg/~mrec/em28xx-new
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   230
  # in reference to:
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   231
  # http://bugs.archlinux.org/task/13146
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   232
  mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb-frontends/"
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   233
  cp drivers/media/dvb-frontends/lgdt330x.h "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb-frontends/"
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   234
  #cp drivers/media/i2c/msp3400-driver.h "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/i2c/"
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   235
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   236
  # add dvb headers
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   237
  # in reference to:
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   238
  # http://bugs.archlinux.org/task/20402
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   239
  mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/usb/dvb-usb"
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   240
  cp drivers/media/usb/dvb-usb/*.h "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/usb/dvb-usb/"
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   241
  mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb-frontends"
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   242
  cp drivers/media/dvb-frontends/*.h "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/dvb-frontends/"
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   243
  mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/tuners"
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   244
  cp drivers/media/tuners/*.h "${pkgdir}/usr/src/linux-${_kernver}/drivers/media/tuners/"
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   245
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   246
  # add xfs and shmem for aufs building
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   247
  mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/fs/xfs"
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   248
  mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/mm"
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   249
  cp fs/xfs/xfs_sb.h "${pkgdir}/usr/src/linux-${_kernver}/fs/xfs/xfs_sb.h"
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   250
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   251
  # copy in Kconfig files
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   252
  for i in `find . -name "Kconfig*"`; do
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   253
    mkdir -p "${pkgdir}"/usr/src/linux-${_kernver}/`echo ${i} | sed 's|/Kconfig.*||'`
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   254
    cp ${i} "${pkgdir}/usr/src/linux-${_kernver}/${i}"
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   255
  done
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   256
  
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   257
  chown -R root.root "${pkgdir}/usr/src/linux-${_kernver}"
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   258
  find "${pkgdir}/usr/src/linux-${_kernver}" -type d -exec chmod 755 {} \;
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   259
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   260
  # strip scripts directory
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   261
  find "${pkgdir}/usr/src/linux-${_kernver}/scripts" -type f -perm -u+w 2>/dev/null | while read binary ; do
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   262
    case "$(file -bi "${binary}")" in
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   263
      *application/x-sharedlib*) # Libraries (.so)
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   264
        /usr/bin/strip ${STRIP_SHARED} "${binary}";;
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   265
      *application/x-archive*) # Libraries (.a)
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   266
        /usr/bin/strip ${STRIP_STATIC} "${binary}";;
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   267
      *application/x-executable*) # Binaries
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   268
        /usr/bin/strip ${STRIP_BINARIES} "${binary}";;
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   269
    esac
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   270
  done
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   271
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   272
  # remove unneeded architectures
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   273
  rm -rf "${pkgdir}"/usr/src/linux-${_kernver}/arch/{alpha,arm26,avr32,blackfin,cris,frv,h8300,ia64,m32r,m68k,m68knommu,mips,microblaze,mn10300,parisc,powerpc,ppc,s390,sh,sh64,sparc,sparc64,um,v850,x86,xtensa}
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   274
35c0804c8ca2 Add Arch PKGBUILD scripts to build linux-dns320l based on Linux 3.11.1
Andreas Boehler <andreas _AT_ aboehler.at>
parents:
diff changeset
   275
}