linux-libre upgraded to version 4.14.9
[dragora.git] / recipes / kernel / headers / recipe
blob8e0012a81487a463b666335db5ff15ad3455484f
1 # Build recipe for linux (libre) headers.
3 # Copyright (c) 2015-2017 Matias Fonzo, <selk@dragora.org>.
5 # Licensed under the Apache License, Version 2.0 (the "License");
6 # you may not use this file except in compliance with the License.
7 # You may obtain a copy of the License at
9 #    http://www.apache.org/licenses/LICENSE-2.0
11 # Unless required by applicable law or agreed to in writing, software
12 # distributed under the License is distributed on an "AS IS" BASIS,
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 # See the License for the specific language governing permissions and
15 # limitations under the License.
17 program=linux
18 version=4.14.9
19 release=1
21 pkgname=kernel-headers
23 tarname=${program}-libre-${version}-gnu.tar.lz
25 # Remote source(s)
26 fetch=http://linux-libre.fsfla.org/pub/linux-libre/releases/${version}-gnu/$tarname
28 description="
29 The Linux kernel headers.
31 The Linux kernel headers from the GNU Linux-libre project.
34 homepage=http://www.gnu.org/software/linux-libre
35 license="GPLv2 only"
37 build()
39     set -e
41     unpack "${tardir}/$tarname"
43     cd "$srcdir"
45     # Expose headers from some extra patches
47     # AUFS
48     cp -R -p "${worktree}/patches/kernel/aufs/fs" .
50     mkdir -p include/uapi/linux
51     cp -p "${worktree}"/patches/kernel/aufs/include/uapi/linux/*.h \
52           include/uapi/linux/
54     # http://github.com/sfjro/aufs4-standalone/tree/aufs4.14
55     patch -p1 < "${worktree}/patches/kernel/aufs/aufs4-kbuild.patch"
56     patch -p1 < "${worktree}/patches/kernel/aufs/aufs4-base.patch"
57     patch -p1 < "${worktree}/patches/kernel/aufs/aufs4-mmap.patch"
58     patch -p1 < "${worktree}/patches/kernel/aufs/aufs4-standalone.patch"
60     make mrproper
61     make headers_check
62     make INSTALL_HDR_PATH="${destdir}/usr" headers_install
64     # Remove cruft
65     find "${destdir}/usr/include" \
66       -type f \( -name .install -o -name ..install.cmd \) -exec rm -f {} +