pantry/projects/kernel.org/linux-headers/package.yml

31 lines
791 B
YAML
Raw Normal View History

2023-04-26 04:49:40 +03:00
distributable:
url: https://cdn.kernel.org/pub/linux/kernel/v{{version.major}}.x/linux-{{version}}.tar.xz
strip-components: 1
versions:
# FIXME: source for _all_ mainline versions
url: "https://cdn.kernel.org/pub/linux/kernel/v5.x/"
match: /linux-\d+\.\d+\.\d+\.tar\.xz/
strip:
- /linux-/
- /\.tar\.xz/
platforms: linux
build:
dependencies:
tea.xyz/gx/cc: c99
tea.xyz/gx/make: '*'
gnu.org/sed: '*'
script: |
make headers
mkdir -p "{{prefix}}"
cp -a usr/include "{{prefix}}/"
2023-05-17 18:52:19 +03:00
test:
script:
grep "LINUX_VERSION_CODE $V" "{{prefix}}/include/linux/version.h"
env:
#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + ((c) > 255 ? 255 : (c)))
V: $(({{version.major}} * 65536 + {{version.minor}} * 256 + {{version.patch}}))