diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..e0392302525a --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,243 @@ +# Maintainer: Jan Alexander Steffens (heftig) +# Maintainer: Cyber Knight (cyberknight777) +# Maintainer: Venkatesh Chaturvedi (Blaster4385) + +pkgbase=linux-IllusionX +pkgver=6.11.IllusionX +pkgrel=1 +pkgdesc='Linux' +url='https://git.tablaster.dev/Blaster4385/linux-IllusionX' +arch=(x86_64) +license=(GPL-2.0-only) +makedepends=( + bc + cpio + gettext + libelf + pahole + perl + python + tar + xz + + # htmldocs + graphviz + imagemagick + python-sphinx + python-yaml +) +options=( + !debug + !strip +) + +export KBUILD_BUILD_HOST=archlinux +export KBUILD_BUILD_USER=$pkgbase +export KBUILD_BUILD_TIMESTAMP="$(date -Ru${SOURCE_DATE_EPOCH:+d @$SOURCE_DATE_EPOCH})" + +export TC="$(pwd)/neutron-clang/bin" +export PATH="$TC:${PATH}" + +FLAGS=( + LLVM=1 + LLVM_IAS=1 + CC="$TC"/clang + AR="$TC"/llvm-ar + LD="$TC"/ld.lld + NM="$TC"/llvm-nm + STRIP="$TC"/llvm-strip + OBJCOPY="$TC"/llvm-objcopy + OBJDUMP="$TC"/llvm-objdump + OBJSIZE="$TC"/llvm-size + HOSTCC="$TC"/clang + HOSTCXX="$TC"/clang++ + HOSTAR="$TC"/llvm-ar + HOSTLD="$TC"/ld.lld +) + +prepare() { + cd ../ + + echo "Setting config..." + + make ${FLAGS[@]} archlinux_defconfig + + vendor=$(lscpu | awk '/Vendor ID/{print $3}') + if [[ "$vendor" == "GenuineIntel" || "$vendor" == "AuthenticAMD" ]]; then + echo "CPU: $(lscpu | awk '/Model name/{ print substr($0, index($0,$3)) }')" + echo "Applying optimizations..." + scripts/config --disable CONFIG_GENERIC_CPU + scripts/config --set-val CONFIG_NR_CPUS $(nproc --all) + + if [[ "$vendor" == "GenuineIntel" ]]; then + scripts/config --enable CONFIG_MNATIVE_INTEL + elif [[ "$vendor" == "AuthenticAMD" ]]; then + scripts/config --enable CONFIG_X86_AMD_PSTATE + scripts/config --enable CONFIG_MNATIVE_AMD + fi + fi + + make -s kernelrelease > version + echo "Prepared $pkgbase version $( /dev/null; then + make all -j$(nproc --all) ${FLAGS[@]} + else + PATH="/usr/lib/ccache/bin:${PATH}" make all -j$(nproc --all) ${FLAGS[@]} + fi +} + +_package() { + pkgdesc="The $pkgdesc kernel and modules" + depends=( + coreutils + initramfs + kmod + ) + optdepends=( + 'wireless-regdb: to set the correct wireless channels of your country' + 'linux-firmware: firmware images needed for some devices' + ) + provides=( + KSMBD-MODULE + VIRTUALBOX-GUEST-MODULES + WIREGUARD-MODULE + ) + replaces=( + virtualbox-guest-modules-arch + wireguard-arch + ) + + cd ../ + local modulesdir="$pkgdir/usr/lib/modules/$(