2017-12-09 21:51:48 +01:00
|
|
|
# inherit package details from kernel package
|
2019-03-31 14:06:46 +02:00
|
|
|
source "$SCRIPTDIR/pkg/${PREFERED_PROVIDER[linux]}/build"
|
2019-02-27 14:22:03 +01:00
|
|
|
DEPENDS="tc-pkgtool"
|
|
|
|
SUBPKG="linux-dev"
|
2017-12-09 21:51:48 +01:00
|
|
|
|
|
|
|
build() {
|
2018-10-19 19:04:00 +02:00
|
|
|
local LINUX_CPU=$(get_linux_cpu)
|
|
|
|
|
2018-02-16 23:22:04 +01:00
|
|
|
make -C "$1" O="$PKGBUILDDIR" ARCH="$LINUX_CPU" mrproper
|
|
|
|
make -C "$1" O="$PKGBUILDDIR" ARCH="$LINUX_CPU" headers_check
|
2017-12-09 21:51:48 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
deploy() {
|
2018-10-19 19:04:00 +02:00
|
|
|
local LINUX_CPU=$(get_linux_cpu)
|
2017-12-09 21:51:48 +01:00
|
|
|
|
2018-02-16 23:22:04 +01:00
|
|
|
export KBUILD_OUTPUT="$PKGBUILDDIR"
|
2019-03-06 10:03:12 +01:00
|
|
|
make -C "$1" O="$PKGBUILDDIR" ARCH="$LINUX_CPU" INSTALL_HDR_PATH="$PKGDEPLOYDIR" headers_install
|
2019-02-27 14:22:03 +01:00
|
|
|
|
2019-03-06 10:03:12 +01:00
|
|
|
cp "$SCRIPTDIR/pkg/$PKGNAME/linux-dev.desc" "$PKGDEPLOYDIR"
|
2019-03-01 19:53:20 +01:00
|
|
|
|
2019-03-06 10:03:12 +01:00
|
|
|
echo "dir include 0755 0 0" > "$PKGDEPLOYDIR/linux-dev.files"
|
2019-03-01 19:53:20 +01:00
|
|
|
|
2019-03-30 16:18:11 +01:00
|
|
|
pkg_scan_dir "$PKGDEPLOYDIR/include" |\
|
2019-03-06 10:03:12 +01:00
|
|
|
sed "s#$PKGDEPLOYDIR/##g" >> "$PKGDEPLOYDIR/linux-dev.files"
|
2017-12-09 21:51:48 +01:00
|
|
|
}
|