repo/linux-headers/PACKAGE

34 lines
959 B
Text
Raw Permalink Normal View History

2021-07-02 03:59:14 +03:00
#!/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
2021-07-02 04:04:59 +03:00
find "${prefix}"/usr/include -name '.*' -delete
rm "${prefix}"/usr/include/Makefile
cp -rv "${prefix}"/usr/include $LFS/usr
2021-07-02 03:59:14 +03:00
2021-07-02 04:04:59 +03:00
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
2021-07-02 03:59:14 +03:00
fi
}