linux kernel, headers, spkg packages

This commit is contained in:
Ohio2 2021-07-02 02:59:14 +02:00
parent 0cb7a2c83d
commit ad936b05bf
4 changed files with 57 additions and 0 deletions

View file

@ -7,6 +7,7 @@ pkg_install() {
make defconfig make defconfig
make make
make install CONFIG_PREFIX="$1/usr" make install CONFIG_PREFIX="$1/usr"
busybox --install
} }
pkg_uninstall() { pkg_uninstall() {

24
linux-headers/PACKAGE Normal file
View file

@ -0,0 +1,24 @@
#!/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
fi
}

12
linux-kernel/PACKAGE Normal file
View file

@ -0,0 +1,12 @@
#!/bin/sh
pkg_ver="5.13"
pkg_install(){
wget -O ${prefix}/usr/src/linux-5.13.tar.xz https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.13.tar.xz
tar -xfJ linux-5.13.tar.xz
rm linux-5.13.tar.xz
}
pkg_uninstall(){
rm -rf ${prefix}/usr/src/linux-5.13
echo "Linux source dir removed"
}

20
spkg/PACKAGE Normal file
View file

@ -0,0 +1,20 @@
#!/bin/sh
pkg_ver="21.07.01.21.nr"
pkg_install(){
mkdir spkg
cd spkg
wget -O ./spkg https://git.hippoz.xyz/duck/spkg/spkg
rm /bin/spkg
install -Dm755 ./spkg /bin/spkg
}
pkg_uninstall(){
read -p "Are you sure you want to remove sPKG via wget (Duck Linux's PM). If yes, you are aware that Duck Linux will become Linux from Scratch, continue still?" -n 1 -r
echo ""
if [[ $confirmation =~ ^[Yy]$ ]]
then
rm /bin/spkg
rm /usr/bin/spkg
echo "sPKG via wget removed, g'luck!"
fi
}