mirror of
https://github.com/ivabus/pantry
synced 2024-11-14 12:35:10 +03:00
34 lines
878 B
YAML
34 lines
878 B
YAML
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:
|
|
gnu.org/sed: '*'
|
|
script: |
|
|
make headers
|
|
mkdir -p "{{prefix}}"
|
|
cp -a usr/include "{{prefix}}/"
|
|
|
|
test:
|
|
script:
|
|
#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + ((c) > 255 ? 255 : (c)))
|
|
- run:
|
|
PATCH=$(test {{version.patch}} -gt 255
|
|
&& echo 255
|
|
|| echo {{version.patch}})
|
|
- run:
|
|
V=$(({{version.major}} * 65536
|
|
+ {{version.minor}} * 256
|
|
+ $PATCH))
|
|
- grep "LINUX_VERSION_CODE $V" "{{prefix}}/include/linux/version.h"
|