repo/linux-headers/PACKAGE
2021-07-02 03:04:59 +02:00

33 lines
959 B
Bash

#!/bin/sh
pkg_ver="5.13-headers"
pkg_deps="linux-kernel"
pkg_install(){
if [ "${pkg_deps}" = `sed -n "/${pkg_deps}/" "${prefix}"/var/cache/spkg.cache` ]
then
#mkdir "${prefix}"/usr/src/linux-headers
#cd linux-headers
#cp "${prefix}"/usr/src/linux-kernel/.config .
#make O="${prefix}"/usr/src/linux-headers oldconfig
#rm .config
#make O="${prefix}"/usr/src/linux-headers modules_prepare
#rm "${prefix}"/usr/src/linux-headers/source
#cp "${prefix}"/usr/src/linux-kernel/Module.symvers "${prefix}"/usr/src/linux-headers
cd "${prefix}"/usr/src/linux-kernel
make mrproper
make headers
find "${prefix}"/usr/include -name '.*' -delete
rm "${prefix}"/usr/include/Makefile
cp -rv "${prefix}"/usr/include $LFS/usr
else
read -p "No linux kernel found, do you want to install it?" -n 1 -r
echo ""
if [[ $response =~ ^[Yy]$ ]]
then
"${prefix}"/bin/spkg install linux-kernel
elif [[ $response =~ ^[Nn]$ ]]
exit 2
fi
fi
}