summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: d94ac7daed5ec5c91b91f5205bd7e61a62f88bf5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# Maintainer: Kyle Manna <kyle(at)kylemanna(dot)com>

_srcname=linux-4.4
pkgname=linux-can-dkms
pkgver=4.4.1
pkgrel=1
pkgdesc="CAN kernel modules (DKMS)"
arch=('i686' 'x86_64')
url="https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/plain/Documentation/networking/can.txt"
license=('GPL2')
depends=('dkms')
install=${pkgname}.install
source=("https://www.kernel.org/pub/linux/kernel/v4.x/${_srcname}.tar.xz"
        "https://www.kernel.org/pub/linux/kernel/v4.x/${_srcname}.tar.sign"
        "https://www.kernel.org/pub/linux/kernel/v4.x/patch-${pkgver}.xz"
        "https://www.kernel.org/pub/linux/kernel/v4.x/patch-${pkgver}.sign"
        'dkms.conf'
        'Makefile'
       )
sha256sums=('401d7c8fef594999a460d10c72c5a94e9c2e1022f16795ec51746b0d165418b2'
            'SKIP'
            'c0218043e61da3921cd14579ae4a8774a6fdad91667a9fdb851d0a35f62edb48'
            'SKIP'
            'b213142af20f9c0bdfdb52104cc2daed2de3edb2e45a6e4e243b9e980ce3c5db'
            '3653b26f843ad66d31ffe3c916d2b26bd59e2e6273e9d967bfdb8af4e693162d')
validpgpkeys=('ABAF11C65A2970B130ABE3C479BE3E4300411886' # Linus Torvalds
              '647F28654894E3BD457199BE38DBBDC86092693E' # Greg Kroah-Hartman
             )

package() {

  # Copy Makefile and dkms.conf
  install -Dm644 Makefile "${pkgdir}"/usr/src/${pkgname}-${pkgver}/Makefile
  install -Dm644 dkms.conf "${pkgdir}"/usr/src/${pkgname}-${pkgver}/dkms.conf

  # Set name and version
  sed -e "s/@PKGNAME@/${pkgname}/" \
      -e "s/@PKGVER@/${pkgver}/" \
      -i "${pkgdir}"/usr/src/${pkgname}-${pkgver}/dkms.conf

  # Copy sources
  mkdir -p "${pkgdir}/usr/src/${pkgname}-${pkgver}/net/"
  cp -r "${srcdir}/${_srcname}/net/can" "${pkgdir}/usr/src/${pkgname}-${pkgver}/net/can"

  mkdir -p "${pkgdir}/usr/src/${pkgname}-${pkgver}/drivers/net/"
  cp -r "${srcdir}/${_srcname}/drivers/net/can" "${pkgdir}/usr/src/${pkgname}-${pkgver}/drivers/net/can"
}