1
0
Fork 0
mirror of https://github.com/pygos/build.git synced 2024-11-16 16:37:10 +01:00
build/pkg/linux_headers/build
David Oberhollenzer 5307722cc2 Fix rpi3 build
Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
2019-03-03 23:54:47 +01:00

31 lines
900 B
Text
Executable file

# inherit package details from kernel package
source "$SCRIPTDIR/pkg/$LINUXPKG/build"
DEPENDS="tc-pkgtool"
SUBPKG="linux-dev"
build() {
local LINUX_CPU=$(get_linux_cpu)
make -C "$1" O="$PKGBUILDDIR" ARCH="$LINUX_CPU" mrproper
make -C "$1" O="$PKGBUILDDIR" ARCH="$LINUX_CPU" headers_check
}
deploy() {
local LINUX_CPU=$(get_linux_cpu)
export KBUILD_OUTPUT="$PKGBUILDDIR"
make -C "$1" O="$PKGBUILDDIR" ARCH="$LINUX_CPU" INSTALL_HDR_PATH="$2" headers_install
cp "$SCRIPTDIR/pkg/$PKGNAME/linux-dev.desc" "$2"
echo "dir include 0755 0 0" > "$2/linux-dev.files"
find -H "$2/include" -type d -printf "dir %p 0%m 0 0\\n" |\
tail -n +2 | sed "s#$2/##g" >> "$2/linux-dev.files"
find -H "$2/include" -type l -printf "slink %p 0%m 0 0 %l\\n" |\
sed "s#$2/##g" >> "$2/linux-dev.files"
find -H "$2/include" -type f -printf "file %p 0%m 0 0\\n" |\
sed "s#$2/##g" >> "$2/linux-dev.files"
}