############################################################################### # IPFire.org - An Open Source Firewall Solution # # Copyright (C) - IPFire Development Team # ############################################################################### name = linux version = 2.6.39 release = 4 maintainer = Michael Tremer groups = System/Kernels url = http://www.kernel.org/ license = GPLv2 summary = The Linux kernel. description The kernel package contains the Linux kernel (vmlinuz), the core of any \ Linux operating system. The kernel handles the basic functions \ of the operating system: memory allocation, process allocation, device \ input and output, etc. end CFLAGS = CXXFLAGS = # Version helper variables. localversion = -%{DISTRO_SNAME}%{release} fullver = %{version}%{localversion} sources = %{thisapp}.tar.bz2 build requires module-init-tools ncurses-devel perl end prepare_cmds echo "%{localversion}" > localversion-%{DISTRO_SNAME} rm -f %{DIR_APP}/localversion-grsec sed -e "s/^HOSTCFLAGS.*=.*/& -fPIC/g" -i Makefile cp -vf %{DIR_SOURCE}/%{DISTRO_SNAME}_logo.ppm \ drivers/video/logo/logo_linux_clut224.ppm make mrproper # Install configuration file cp -f %{DIR_SOURCE}/config %{DIR_APP}/.config end build yes "" | make oldconfig # Check headers make ARCH=x86 headers_check make CC="gcc -nopie" %{PARALLELISMFLAGS} end install make modules_install INSTALL_MOD_PATH=%{BUILDROOT} mkdir -pv %{BUILDROOT}/boot cp -v arch/x86/boot/bzImage %{BUILDROOT}/boot/vmlinuz-%{fullver} cp -v System.map %{BUILDROOT}/boot/System.map-%{fullver} mkdir -pv %{BUILDROOT}/lib/modules/%{fullver}/extra rm -vf %{BUILDROOT}/lib/modules/%{fullver}/{build,source} # Install the header files make ARCH=x86 INSTALL_HDR_PATH=dest headers_install mkdir -pv %{BUILDROOT}/usr/include find dest/include \( -name .install -o -name ..install.cmd \) -delete cp -rv dest/include/* %{BUILDROOT}/usr/include # Glibc provides these headers rm -rfv %{BUILDROOT}/usr/include/scsi \ %{BUILDROOT}/usr/include/asm*/atomic.h \ %{BUILDROOT}/usr/include/asm*/io.h \ %{BUILDROOT}/usr/include/asm*/irq.h # Create an empty settings file for dracut mkdir -vp %{BUILDROOT}/etc/ld.so.conf.d/ echo "# Placeholder file, no vDSO hwcap entries used in this kernel." \ > %{BUILDROOT}/etc/ld.so.conf.d/kernel-%{fullver}.conf end end packages package kernel requires dracut linux-firmware end end package kernel-headers template DEVEL summary = Header files of the kernel release %{fullver}. desciption = %{summary} end end