1 ###############################################################################
2 # IPFire.org - An Open Source Firewall Solution #
3 # Copyright (C) - IPFire Development Team <info@ipfire.org> #
4 ###############################################################################
10 maintainer = Michael Tremer <michael.tremer@ipfire.org>
11 groups = System/Kernels
12 url = http://www.kernel.org/
14 summary = The Linux kernel.
17 The kernel package contains the Linux kernel (vmlinuz), the core of any \
18 Linux operating system. The kernel handles the basic functions \
19 of the operating system: memory allocation, process allocation, device \
20 input and output, etc.
26 # Version helper variables.
27 localversion = -%{DISTRO_SNAME}%{release}
28 fullver = %{version}%{localversion}
30 sources = %{thisapp}.tar.bz2
40 echo "%{localversion}" > localversion-%{DISTRO_SNAME}
41 rm -f %{DIR_APP}/localversion-grsec
43 sed -e "s/^HOSTCFLAGS.*=.*/& -fPIC/g" -i Makefile
45 cp -vf %{DIR_SOURCE}/%{DISTRO_SNAME}_logo.ppm \
46 drivers/video/logo/logo_linux_clut224.ppm
50 # Install configuration file
51 cp -f %{DIR_SOURCE}/config %{DIR_APP}/.config
55 yes "" | make oldconfig
58 make ARCH=x86 headers_check
60 make CC="gcc -nopie" %{PARALLELISMFLAGS}
64 make modules_install INSTALL_MOD_PATH=%{BUILDROOT}
66 mkdir -pv %{BUILDROOT}/boot
67 cp -v arch/x86/boot/bzImage %{BUILDROOT}/boot/vmlinuz-%{fullver}
68 cp -v System.map %{BUILDROOT}/boot/System.map-%{fullver}
70 mkdir -pv %{BUILDROOT}/lib/modules/%{fullver}/extra
72 rm -vf %{BUILDROOT}/lib/modules/%{fullver}/{build,source}
74 # Install the header files
75 make ARCH=x86 INSTALL_HDR_PATH=dest headers_install
76 mkdir -pv %{BUILDROOT}/usr/include
77 find dest/include \( -name .install -o -name ..install.cmd \) -delete
78 cp -rv dest/include/* %{BUILDROOT}/usr/include
80 # Glibc provides these headers
81 rm -rfv %{BUILDROOT}/usr/include/scsi \
82 %{BUILDROOT}/usr/include/asm*/atomic.h \
83 %{BUILDROOT}/usr/include/asm*/io.h \
84 %{BUILDROOT}/usr/include/asm*/irq.h
86 # Create an empty settings file for dracut
87 mkdir -vp %{BUILDROOT}/etc/ld.so.conf.d/
88 echo "# Placeholder file, no vDSO hwcap entries used in this kernel." \
89 > %{BUILDROOT}/etc/ld.so.conf.d/kernel-%{fullver}.conf
101 package kernel-headers
104 summary = Header files of the kernel release %{fullver}.
105 desciption = %{summary}