summaryrefslogtreecommitdiff
path: root/repo/linux/linux-src.xibuild
blob: d4d704e0fc679d69e30f3188937bc0d59483d574 (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
#!/bin/sh

MAKEDEPS="make bc"
DEPS="sbase kmod"

PKG_VER=5.17.2
SOURCE=https://cdn.kernel.org/pub/linux/kernel/v${PKG_VER%%.*}.x/linux-$PKG_VER.tar.xz
ADDITIONAL="
    fix-sbase-coreutils.patch
    config
"

DESC="The latest linux kernel (source)"

prepare () {
    rm linux-$PKG_VER.tar.xz
    apply_patches

    make mrproper
    make headers

    mv config .config
    make olddefconfig
    make -s kernelrelease > version
}

package () {
    local kernver="$(cat version)"
    srcdir=$PKG_DEST/usr/src/linux
    mkdir -p $srcdir
    cp -r ./ $srcdir/
}