]>
Commit | Line | Data |
---|---|---|
166a6c21 | 1 | ############################################################################### |
802ea3af MT |
2 | # IPFire.org - An Open Source Firewall Solution # |
3 | # Copyright (C) - IPFire Development Team <info@ipfire.org> # | |
166a6c21 MT |
4 | ############################################################################### |
5 | ||
15a11c5b MT |
6 | name = kernel |
7 | version = 3.0.4 | |
ad1ea534 | 8 | release = 4 |
15a11c5b | 9 | thisapp = linux-%{version} |
166a6c21 | 10 | |
802ea3af MT |
11 | maintainer = Michael Tremer <michael.tremer@ipfire.org> |
12 | groups = System/Kernels | |
13 | url = http://www.kernel.org/ | |
14 | license = GPLv2 | |
15 | summary = The Linux kernel. | |
166a6c21 | 16 | |
802ea3af | 17 | description |
166a6c21 MT |
18 | The kernel package contains the Linux kernel (vmlinuz), the core of any \ |
19 | Linux operating system. The kernel handles the basic functions \ | |
20 | of the operating system: memory allocation, process allocation, device \ | |
21 | input and output, etc. | |
802ea3af | 22 | end |
166a6c21 | 23 | |
802ea3af | 24 | # Version helper variables. |
752a62e7 | 25 | localversion = -%{release}.%{DISTRO_DISTTAG}.%{DISTRO_ARCH} |
802ea3af MT |
26 | fullver = %{version}%{localversion} |
27 | ||
15a11c5b | 28 | sources = %{thisapp}.tar.gz |
802ea3af MT |
29 | |
30 | build | |
31 | requires | |
32 | module-init-tools | |
33 | ncurses-devel | |
34 | perl | |
35 | end | |
36 | ||
37 | prepare_cmds | |
38 | echo "%{localversion}" > localversion-%{DISTRO_SNAME} | |
39 | rm -f %{DIR_APP}/localversion-grsec | |
40 | ||
41 | sed -e "s/^HOSTCFLAGS.*=.*/& -fPIC/g" -i Makefile | |
42 | ||
43 | cp -vf %{DIR_SOURCE}/%{DISTRO_SNAME}_logo.ppm \ | |
44 | drivers/video/logo/logo_linux_clut224.ppm | |
45 | ||
46 | make mrproper | |
47 | ||
48 | # Install configuration file | |
49 | cp -f %{DIR_SOURCE}/config %{DIR_APP}/.config | |
50 | end | |
51 | ||
52 | build | |
53 | yes "" | make oldconfig | |
54 | ||
55 | # Check headers | |
56 | make ARCH=x86 headers_check | |
57 | ||
58 | make CC="gcc -nopie" %{PARALLELISMFLAGS} | |
59 | end | |
60 | ||
61 | install | |
62 | make modules_install INSTALL_MOD_PATH=%{BUILDROOT} | |
63 | ||
64 | mkdir -pv %{BUILDROOT}/boot | |
65 | cp -v arch/x86/boot/bzImage %{BUILDROOT}/boot/vmlinuz-%{fullver} | |
66 | cp -v System.map %{BUILDROOT}/boot/System.map-%{fullver} | |
67 | ||
68 | mkdir -pv %{BUILDROOT}/lib/modules/%{fullver}/extra | |
69 | ||
70 | rm -vf %{BUILDROOT}/lib/modules/%{fullver}/{build,source} | |
71 | ||
72 | # Install the header files | |
73 | make ARCH=x86 INSTALL_HDR_PATH=dest headers_install | |
74 | mkdir -pv %{BUILDROOT}/usr/include | |
75 | find dest/include \( -name .install -o -name ..install.cmd \) -delete | |
76 | cp -rv dest/include/* %{BUILDROOT}/usr/include | |
77 | ||
78 | # Glibc provides these headers | |
79 | rm -rfv %{BUILDROOT}/usr/include/scsi \ | |
80 | %{BUILDROOT}/usr/include/asm*/atomic.h \ | |
81 | %{BUILDROOT}/usr/include/asm*/io.h \ | |
82 | %{BUILDROOT}/usr/include/asm*/irq.h | |
83 | ||
84 | # Create an empty settings file for dracut | |
85 | mkdir -vp %{BUILDROOT}/etc/ld.so.conf.d/ | |
86 | echo "# Placeholder file, no vDSO hwcap entries used in this kernel." \ | |
87 | > %{BUILDROOT}/etc/ld.so.conf.d/kernel-%{fullver}.conf | |
15a11c5b MT |
88 | |
89 | # Remove all firmware files which are distributed by linux-firmware | |
90 | rm -rfv %{BUILDROOT}/lib/firmware | |
802ea3af MT |
91 | end |
92 | end | |
93 | ||
94 | packages | |
95 | package kernel | |
96 | requires | |
97 | dracut | |
98 | linux-firmware | |
99 | end | |
ad1ea534 MT |
100 | |
101 | script posttransin | |
102 | dracut /boot/initramfs-%{fullver}.img %{fullver} | |
103 | end | |
104 | ||
105 | script preun | |
106 | rm -f /boot/initramfs-%{fullver}.img | |
107 | end | |
802ea3af MT |
108 | end |
109 | ||
110 | package kernel-headers | |
802ea3af MT |
111 | summary = Header files of the kernel release %{fullver}. |
112 | desciption = %{summary} | |
c698e4be MT |
113 | |
114 | files | |
115 | /usr/include | |
116 | end | |
802ea3af MT |
117 | end |
118 | ||
119 | end |