]> git.pld-linux.org Git - packages/kernel.git/blame - kernel.spec
- 3.14 is now logterm kernel, see https://lkml.org/lkml/2014/7/3/692
[packages/kernel.git] / kernel.spec
CommitLineData
a7313793 1#
8ad00cb1
ER
2# LATEST VERSION CHECKER:
3# # curl -s http://www.kernel.org/kdist/finger_banner
4#
a5585a68 5# TODO:
351f379b 6# - benchmark NO_HZ & HZ=1000 vs HZ=300 on i686
9a1672a0
JR
7# - IPv4 source address selection for multihomed vservers is completely broken
8# meaning routing table is ignored except for default
351f379b 9#
fc5a68a2
AM
10# HOWTO update configuration files:
11# - run build
12# - add new options to proper config (kernel-multiarch.config, kernel-x86.config, kernel-powerpc.config etc)
13# - sort configuration files using:
ee5dc1b8 14# ./kernel-config-sort.pl ~/rpm/BUILD/kernel-%{version}/linux-%{version}/ -a x86 kernel-x86.config
fc5a68a2 15# ./kernel-config-sort.pl ~/rpm/BUILD/kernel-%{version}/linux-%{version} kernel-multiarch.config
a5585a68
AM
16#
17# Conditional build:
a5585a68 18%bcond_without source # don't build kernel-source package
1848fd38 19%bcond_without doc # don't build kernel-doc package
351f379b
JR
20%bcond_without pcmcia # don't build pcmcia
21
a5585a68 22%bcond_with verbose # verbose build (V=1)
351f379b 23
351f379b 24%bcond_with fbcondecor # build fbcondecor (disable FB_TILEBLITTING and affected fb modules)
bacfcd36 25%bcond_without pae # build PAE (HIGHMEM64G) support on 32bit i686 athlon pentium3 pentium4
351f379b
JR
26%bcond_with nfsroot # build with root on NFS support
27
7f07242b 28%bcond_without imq # imq support
1b75c2b4 29%bcond_without esfq # esfq support
351f379b 30%bcond_without ipv6 # ipv6 support
40bf53f0 31%bcond_with padmcrypt # parallel dm-crypt
351f379b 32
c2e5f7c8 33%bcond_without vserver # support for VServer
351f379b 34
7141a3b6 35%bcond_with vanilla # don't include any patches
351f379b 36%bcond_with rescuecd # build kernel for our rescue
351f379b 37%bcond_with myown # build with your own config (kernel-myown.config)
a5585a68
AM
38
39%{?debug:%define with_verbose 1}
40
351f379b 41%define have_drm 1
55e054be 42%define have_ide 1
351f379b
JR
43%define have_oss 1
44%define have_sound 1
101ae904 45%define have_pcmcia 1
351f379b
JR
46
47%if %{with rescuecd}
b488384f 48%unglobal with_vserver
351f379b
JR
49%define have_drm 0
50%define have_sound 0
51%endif
52
101ae904 53%if %{with myown}
54%define have_drm 0
55e054be 55%define have_ide 0
101ae904 56%define have_oss 0
57%define have_sound 0
58%define have_pcmcia 0
351f379b
JR
59%endif
60
61%ifarch sparc sparc64
b488384f 62%unglobal with_pcmcia
351f379b
JR
63%define have_drm 0
64%define have_oss 0
65%endif
66
101ae904 67%if %{without pcmcia}
68%define have_pcmcia 0
69%endif
70
15f2eec7 71%define rel 1
8ac0bc91 72%define basever 3.14
15f2eec7 73%define postver .10
a5585a68 74
46dd5ea3 75%define versuffix -%{basever}
e865f3ec 76
1fb73fcf
ER
77# __alt_kernel is list of features, empty string if none set
78# _alt kernel is defined as: %{nil}%{?alt_kernel:-%{?alt_kernel}} (defined in rpm.macros)
79# alt_kernel should be defined if __alt_kernel has non-empty value (for %{?alt_kernel:foo} constructs)
473f3855 80%define __alt_kernel %{nil}
b2615ca0 81
ff48aee0 82%if "%{__alt_kernel}" != ""
b2615ca0 83%define alt_kernel %{__alt_kernel}
ff48aee0
ER
84%endif
85
86# these override whatever name was picked from bconds
1fb73fcf 87%if %{with myown} && "%{_alt_kernel}" == ""
101ae904 88%define alt_kernel myown
351f379b 89%endif
06936f6f 90%if %{with rescuecd}
91%define alt_kernel rescuecd
351f379b 92%endif
ff48aee0
ER
93%if %{with vanilla}
94%define alt_kernel vanilla
b2615ca0 95%endif
351f379b
JR
96
97# kernel release (used in filesystem and eventually in uname -r)
98# modules will be looked from /lib/modules/%{kernel_release}
99# localversion is just that without version for "> localversion"
100%define localversion %{rel}
1401be4b 101%define kernel_release %{version}%{?alt_kernel:.%{alt_kernel}}-%{localversion}
a5585a68
AM
102
103Summary: The Linux kernel (the core of the Linux operating system)
351f379b
JR
104Summary(de.UTF-8): Der Linux-Kernel (Kern des Linux-Betriebssystems)
105Summary(et.UTF-8): Linuxi kernel (ehk operatsioonisüsteemi tuum)
106Summary(fr.UTF-8): Le Kernel-Linux (La partie centrale du systeme)
107Summary(pl.UTF-8): Jądro Linuksa
e865f3ec 108Name: kernel%{versuffix}%{_alt_kernel}
351f379b
JR
109Version: %{basever}%{postver}
110Release: %{rel}
a5585a68 111Epoch: 3
c491b43b 112License: GPL v2
a5585a68 113Group: Base/Kernel
0d674525 114Source0: http://www.kernel.org/pub/linux/kernel/v3.x/linux-%{basever}.tar.xz
8ac0bc91 115# Source0-md5: b621207b3f6ecbb67db18b13258f8ea8
4d8c31dd 116%if "%{postver}" != ".0"
cc4361d4 117Patch0: http://www.kernel.org/pub/linux/kernel/v3.x/patch-%{version}.xz
15f2eec7 118# Patch0-md5: 13d435d77d719cd845fb82627aa07974
351f379b 119%endif
5aeaa3c2 120Source1: kernel.sysconfig
351f379b
JR
121
122Source3: kernel-autoconf.h
123Source4: kernel-config.h
351f379b
JR
124Source6: kernel-config.awk
125Source7: kernel-module-build.pl
126Source8: kernel-track-config-change.awk
127# not used by kernel.spec, but it's good to have it in SOURCES
128Source9: kernel-config-sort.pl
129Source10: kernel.make
130
131Source20: kernel-multiarch.config
132Source21: kernel-x86.config
133Source22: kernel-sparc.config
5a99ae3d 134Source23: kernel-alpha.config
135Source24: kernel-powerpc.config
136Source25: kernel-ia64.config
351f379b 137
351f379b 138Source41: kernel-patches.config
351f379b 139Source43: kernel-vserver.config
351f379b 140
351f379b 141Source55: kernel-imq.config
351f379b
JR
142
143Source58: kernel-inittmpfs.config
351f379b 144
351f379b
JR
145# http://dev.gentoo.org/~spock/projects/fbcondecor/archive/fbcondecor-0.9.4-2.6.25-rc6.patch
146Patch3: kernel-fbcondecor.patch
60bb736d 147Patch4: kernel-fbcon-margins.patch
1414594b 148Patch5: linux-wistron-amilo8210.patch
c2992931 149Patch6: linux-wistron-nx.patch
351f379b
JR
150
151# netfilter related stuff mostly based on patch-o-matic-ng
17da405a 152# snapshot 20070806 with some fixes. Some modules
e69c45e8 153# were ported to nf_conntrack.
351f379b
JR
154
155Patch10: kernel-pom-ng-IPV4OPTSSTRIP.patch
351f379b 156
351f379b
JR
157# http://ftp.linux-vserver.org/pub/people/dhozac/p/k/delta-owner-xid-feat02.diff
158Patch37: kernel-owner-xid.patch
159
351f379b
JR
160# based on kernel-2.6.25-layer7-2.20.patch from
161# http://switch.dl.sourceforge.net/sourceforge/l7-filter/netfilter-layer7-v2.20.tar.gz
162Patch40: kernel-layer7.patch
163
351f379b
JR
164### End netfilter
165
166# http://zph.bratcheda.org/linux-2.6.26.3-zph.patch
167Patch49: kernel-zph.patch
168
514e5dae 169# http://www.linuximq.net
351f379b
JR
170Patch50: kernel-imq.patch
171
351f379b 172# http://fatooh.org/esfq-2.6/sfq-2.6.24.1.tar.bz2
60bb736d 173Patch53: kernel-esfq.patch
351f379b 174
351f379b
JR
175# by Baggins request:
176# derived from ftp://ftp.cmf.nrl.navy.mil/pub/chas/linux-atm/vbr/vbr-kernel-diffs
60bb736d
JR
177Patch55: kernel-atm-vbr.patch
178Patch56: kernel-atmdd.patch
351f379b 179
351f379b
JR
180# http://synce.svn.sourceforge.net/svnroot/synce/trunk/patches/linux-2.6.22-rndis_host-wm5.patch
181Patch59: kernel-rndis_host-wm5.patch
182
351f379b
JR
183# adds some ids for hostap suported cards and monitor_enable from/for aircrack-ng
184# http://patches.aircrack-ng.org/hostap-kernel-2.6.18.patch
60bb736d 185Patch85: kernel-hostap.patch
351f379b 186
98d9a5b1 187# http://vserver.13thfloor.at/Experimental/patch-3.13.6-vs2.3.6.11.diff
9f25dc6a
AM
188# note there are additional patches from above url:
189# - *fix* are real fixes (we want these)
190# - *feat* are new features/tests (we don't want these)
01d3b055 191Patch100: kernel-vserver-2.3.patch
351f379b
JR
192Patch101: kernel-vserver-fixes.patch
193
68184a5a
JR
194# git clone git://kernel.opensuse.org/kernel-source.git
195# patches.suse/ovl*
196Patch110: ovl01-vfs-add-i_op-dentry_open.patch
197Patch111: ovl02-vfs-export-do_splice_direct-to-modules.patch
c06a8ce3
AM
198Patch112: ovl03-vfs-export-inode_permission-to-modules.patch
199Patch113: ovl04-vfs-introduce-clone_private_mount.patch
200Patch114: ovl05-overlay-filesystem.patch
201Patch115: ovl06-overlayfs-add-statfs-support.patch
202Patch116: ovl07-overlayfs-implement-show_options.patch
203Patch117: ovl08-overlay-overlay-filesystem-documentation.patch
204Patch118: ovl09-fs-limit-filesystem-stacking-depth.patch
351f379b 205
53392da6 206# git://aufs.git.sourceforge.net/gitroot/aufs/aufs3-standalone.git, read README
b752ccd1 207# Patch creation:
53392da6
AM
208# git clone git://aufs.git.sourceforge.net/gitroot/aufs/aufs3-standalone.git
209# cd aufs3-standalone
fb47a38f 210# git checkout -b aufs3.14 origin/aufs3.14
93a1a2a2 211# cat aufs3-kbuild.patch aufs3-base.patch aufs3-mmap.patch aufs3-standalone.patch > ~/rpm/packages/kernel/kernel-aufs3.patch
b752ccd1
AM
212# mkdir linux
213# cp -a Documentation fs include linux
d14e0f73 214# diff -urN /usr/share/empty linux >> ~/rpm/packages/kernel/kernel-aufs3.patch
7ce627cf 215# drop hunk at the end of patch (hunk is patching include/linux/Kbuild with single line change)
93a1a2a2 216# cat aufs3-loopback.patch >> ~/rpm/packages/kernel/kernel-aufs3.patch
0c5527e5 217#
53392da6 218Patch145: kernel-aufs3.patch
ff3e50f1 219Patch146: kernel-aufs3+vserver.patch
a899ef35 220
54fd642e 221# Show normal colors in menuconfig with ncurses ABI 6
222Patch250: kernel-fix_256colors_menuconfig.patch
223
31f62932
AM
224# https://patchwork.kernel.org/patch/236261/
225Patch400: kernel-virtio-gl-accel.patch
226
101a7448
ŁK
227# http://people.redhat.com/mpatocka/patches/kernel/dm-crypt-paralelizace/current/series.html
228Patch500: dm-crypt-remove-percpu.patch
0a2e4279
ŁK
229Patch501: bio-kmalloc-align.patch
230Patch502: dm-crypt-per_bio_data.patch
231Patch503: dm-crypt-unbound-workqueue.patch
232Patch504: dm-crypt-dont-allocate-partial-pages.patch
233Patch505: dm-crypt-fix-allocation-deadlock.patch
234Patch506: dm-crypt-remove-io-pool.patch
235Patch507: dm-crypt-offload-writes-to-thread.patch
236Patch508: dm-crypt-sort-requests.patch
101a7448 237
08aa9d92 238Patch2000: kernel-small_fixes.patch
60bb736d 239Patch2001: kernel-pwc-uncompress.patch
351f379b
JR
240Patch2003: kernel-regressions.patch
241
5882c9d4
AM
242# bzr co lp:apparmor
243# ls apparmor/kernel-patches/3.12
351f379b 244Patch5000: kernel-apparmor.patch
351f379b
JR
245
246# for rescuecd
48ead238 247# based on ftp://ftp.leg.uct.ac.za/pub/linux/rip/tmpfs_root-2.6.30.diff.gz
351f379b
JR
248Patch7000: kernel-inittmpfs.patch
249
73cc1c57 250# Do not remove this line, please. It is easier for me to uncomment two lines, then patch
251# kernel.spec every time.
252#Patch50000: kernel-usb_reset.patch
253
a5585a68 254URL: http://www.kernel.org/
ec155748 255BuildRequires: bc
351f379b 256BuildRequires: binutils >= 3:2.18
a5585a68
AM
257%ifarch sparc sparc64
258BuildRequires: elftoaout
259%endif
351f379b
JR
260%ifarch ppc
261BuildRequires: uboot-mkimage
262%endif
351f379b
JR
263BuildRequires: /sbin/depmod
264BuildRequires: gcc >= 5:3.2
cfce203c 265BuildRequires: xz >= 1:4.999.7
e69c45e8 266AutoReqProv: no
d80d232c 267BuildRequires: hostname
68184a5a 268BuildRequires: kmod
a5585a68 269BuildRequires: perl-base
b488384f 270BuildRequires: rpm-build >= 4.5-24
7b6fa769 271BuildRequires: rpmbuild(macros) >= 1.652
351f379b
JR
272Requires(post): coreutils
273Requires(post): geninitrd >= 10000-3
621dfa8b 274Requires(post): kmod >= 12-2
351f379b
JR
275Requires: /sbin/depmod
276Requires: coreutils
277Requires: geninitrd >= 10000-3
621dfa8b 278Requires: kmod >= 12-2
bacfcd36
AM
279%if %{with pae}
280%ifarch i686 athlon pentium3 pentium4
281Requires: cpuinfo(pae)
282%endif
283%endif
59c3e314 284Suggests: crda
54f0effc 285Suggests: dracut
b75546f3 286Suggests: keyutils
46dd5ea3 287Suggests: kernel%{versuffix}-ide = %{epoch}:%{version}-%{release}
af560d0f 288Suggests: linux-firmware
52e5f3df 289Provides: %{name}(netfilter) = 20070806
351f379b 290Provides: %{name}(vermagic) = %{kernel_release}
1fb73fcf
ER
291Obsoletes: kernel%{_alt_kernel}-char-lirc-ene0100
292Obsoletes: kernel%{_alt_kernel}-char-lirc-it87
293Obsoletes: kernel%{_alt_kernel}-char-lirc-ite8709
294Obsoletes: kernel%{_alt_kernel}-char-lirc-mceusb
295Obsoletes: kernel%{_alt_kernel}-char-lirc-streamzap
d14e0f73 296Obsoletes: kernel%{_alt_kernel}-isdn-mISDN
26b1ceeb 297Obsoletes: kernel-firmware
351f379b
JR
298Obsoletes: kernel-misc-acer_acpi
299Obsoletes: kernel-misc-fuse
300Obsoletes: kernel-misc-uvc
a5585a68 301Obsoletes: kernel-modules
351f379b
JR
302Obsoletes: kernel-net-ar81
303Obsoletes: kernel-net-hostap
304Obsoletes: kernel-net-ieee80211
305Obsoletes: kernel-net-ipp2p
306Obsoletes: kernel-net-rt61
307Obsoletes: kernel-smp
308Conflicts: e2fsprogs < 1.29
309Conflicts: isdn4k-utils < 3.1pre1
310Conflicts: jfsutils < 1.1.3
89785d20 311Conflicts: libusb < 1.0.9
af560d0f 312Conflicts: linux-firmware < 20120720
cf8de22f 313Conflicts: lvm2 < 2.02.40
8fe4cdc5 314Conflicts: module-init-tools < 3.16
351f379b
JR
315Conflicts: nfs-utils < 1.0.5
316Conflicts: oprofile < 0.9
317Conflicts: ppp < 1:2.4.0
318Conflicts: procps < 3.2.0
319Conflicts: quota-tools < 3.09
351f379b 320Conflicts: reiserfsprogs < 3.6.3
4dabe329 321Conflicts: rpm < 4.4.2-0.2
351f379b
JR
322Conflicts: udev < 1:081
323Conflicts: util-linux < 2.10o
d3c4e01e 324Conflicts: util-vserver < 0.30.216
351f379b 325Conflicts: xfsprogs < 2.6.0
0ed05467 326ExclusiveArch: i486 i586 i686 pentium3 pentium4 athlon %{x8664} alpha arm ia64 ppc ppc64 sparc sparc64
a5585a68
AM
327ExclusiveOS: Linux
328BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
329
351f379b
JR
330%ifarch %{ix86} %{x8664}
331%define target_arch_dir x86
332%endif
333%ifarch ppc ppc64
334%define target_arch_dir powerpc
335%endif
5a99ae3d 336%ifarch sparc sparc64
337%define target_arch_dir sparc
338%endif
339%ifnarch %{ix86} %{x8664} ppc ppc64 sparc sparc64
351f379b
JR
340%define target_arch_dir %{_target_base_arch}
341%endif
342
343%define defconfig arch/%{target_arch_dir}/defconfig
344
345# No ELF objects there to strip (skips processing 27k files)
ded910ba 346%define _noautostrip \\(.*%{_kernelsrcdir}/.*\\|.*/vmlinux.*\\)
351f379b 347%define _noautochrpath .*%{_kernelsrcdir}/.*
b36a2f6d 348%define _enable_debug_packages 0
351f379b 349
a5585a68
AM
350%ifarch ia64
351%define initrd_dir /boot/efi
352%else
353%define initrd_dir /boot
354%endif
355
351f379b 356%define topdir %{_builddir}/%{name}-%{version}
67d87e28 357%define srcdir %{topdir}/linux-%{basever}
351f379b 358%define objdir %{topdir}/%{targetobj}
6db8537c 359%define targetobj %{_target_base_arch}-gcc-%(%{__cc} -dumpversion)
351f379b 360
e865f3ec 361%define _kernelsrcdir /usr/src/linux%{versuffix}%{_alt_kernel}-%{version}
351f379b 362
7b6fa769 363%if "%{_target_base_arch}" != "%{_host_base_arch}"
351f379b
JR
364 %define CrossOpts ARCH=%{_target_base_arch} CROSS_COMPILE=%{_target_cpu}-pld-linux-
365 %define DepMod /bin/true
366
7b6fa769 367 %if "%{_host_base_arch}" == "sparc" && "%{_target_base_arch}" == "sparc64"
351f379b
JR
368 %define CrossOpts ARCH=%{_target_base_arch} CC="%{__cc}"
369 %define DepMod /sbin/depmod
370 %endif
371
7b6fa769 372 %if "%{_host_base_arch}" == "sparc64" && "%{_target_base_arch}" == "sparc"
351f379b
JR
373 %define CrossOpts ARCH=%{_target_base_arch} CC="%{__cc}"
374 %define DepMod /sbin/depmod
375 %endif
376
7b6fa769 377 %if "%{_host_base_arch}" == "x86_64" && "%{_target_base_arch}" == "i386"
351f379b
JR
378 %define CrossOpts ARCH=%{_target_base_arch} CC="%{__cc}"
379 %define DepMod /sbin/depmod
380 %endif
381
5a99ae3d 382 %if "%{_target_base_arch}" == "ppc" || "%{_target_base_arch}" == "ppc64"
351f379b
JR
383 %define CrossOpts ARCH=powerpc CROSS_COMPILE=%{_target_cpu}-pld-linux-
384 %endif
385%else
386 %ifarch ppc ppc64
387 %define CrossOpts ARCH=powerpc CC="%{__cc}"
388 %else
389 %define CrossOpts ARCH=%{_target_base_arch} CC="%{__cc}"
390 %endif
391 %define DepMod /sbin/depmod
392%endif
7e0d31a4
JB
393# use 64-bit offsets for fixdeps to work with 64-bit inodes
394%define MakeOpts %{CrossOpts} HOSTCC="%{__cc} -D_FILE_OFFSET_BITS=64"
351f379b 395
52e5f3df 396%define __features \
b2b86b86
AM
397%{?with_vserver:Vserver - enabled}\
398%{!?with_vserver:WARNING: VSERVER IS DISABLED IN THIS KERNEL BUILD!}\
351f379b
JR
399%{?with_fbcondecor:Fbsplash/fbcondecor - enabled }\
400%{?with_nfsroot:Root on NFS - enabled}\
351f379b
JR
401
402%define Features %(echo "%{__features}" | sed '/^$/d')
403
a5585a68
AM
404%description
405This package contains the Linux kernel that is used to boot and run
406your system. It contains few device drivers for specific hardware.
407Most hardware is instead supported by modules loaded after booting.
408
351f379b
JR
409%{Features}
410
3a467bc1
JR
411%description -l de.UTF-8
412Das Kernel-Paket enthält den Linux-Kernel (vmlinuz), den Kern des
413Linux-Betriebssystems. Der Kernel ist für grundliegende
a5585a68 414Systemfunktionen verantwortlich: Speicherreservierung,
3a467bc1 415Prozeß-Management, Geräte Ein- und Ausgaben, usw.
a5585a68 416
351f379b
JR
417%{Features}
418
3a467bc1 419%description -l fr.UTF-8
a5585a68 420Le package kernel contient le kernel linux (vmlinuz), la partie
3a467bc1
JR
421centrale d'un système d'exploitation Linux. Le noyau traite les
422fonctions basiques d'un système d'exploitation: allocation mémoire,
423allocation de process, entrée/sortie de peripheriques, etc.
a5585a68 424
351f379b
JR
425%{Features}
426
3a467bc1
JR
427%description -l pl.UTF-8
428Pakiet zawiera jądro Linuksa niezbędne do prawidłowego działania
429Twojego komputera. Zawiera w sobie sterowniki do sprzętu znajdującego
430się w komputerze, takiego jak sterowniki dysków itp.
a5585a68 431
351f379b
JR
432%{Features}
433
434%package vmlinux
435Summary: vmlinux - uncompressed kernel image
436Summary(de.UTF-8): vmlinux - dekompressiertes Kernel Bild
437Summary(pl.UTF-8): vmlinux - rozpakowany obraz jądra
438Group: Base/Kernel
439Obsoletes: kernel-smp-vmlinux
440
441%description vmlinux
442vmlinux - uncompressed kernel image.
443
444%description vmlinux -l de.UTF-8
445vmlinux - dekompressiertes Kernel Bild.
446
447%description vmlinux -l pl.UTF-8
448vmlinux - rozpakowany obraz jądra.
449
a5585a68
AM
450%package drm
451Summary: DRM kernel modules
351f379b
JR
452Summary(de.UTF-8): DRM Kernel Treiber
453Summary(pl.UTF-8): Sterowniki DRM
a5585a68 454Group: Base/Kernel
351f379b
JR
455Requires(postun): %{name} = %{epoch}:%{version}-%{release}
456Requires: %{name} = %{epoch}:%{version}-%{release}
457Obsoletes: kernel-smp-drm
07ff8614 458AutoReqProv: no
a5585a68
AM
459
460%description drm
351f379b
JR
461DRM kernel modules.
462
463%description drm -l de.UTF-8
464DRM Kernel Treiber.
a5585a68 465
3a467bc1 466%description drm -l pl.UTF-8
351f379b 467Sterowniki DRM.
a5585a68 468
55e054be
JR
469%package ide
470Summary: IDE kernel modules
471Summary(de.UTF-8): IDE Kernel Treiber
472Summary(pl.UTF-8): Sterowniki IDE
473Group: Base/Kernel
474Requires(postun): %{name} = %{epoch}:%{version}-%{release}
475Requires: %{name} = %{epoch}:%{version}-%{release}
476AutoReqProv: no
477
478%description ide
479IDE kernel modules.
480
481%description ide -l de.UTF-8
482IDE Kernel Treiber.
483
484%description ide -l pl.UTF-8
485Sterowniki IDE.
486
a5585a68
AM
487%package pcmcia
488Summary: PCMCIA modules
351f379b
JR
489Summary(de.UTF-8): PCMCIA Module
490Summary(pl.UTF-8): Moduły PCMCIA
a5585a68 491Group: Base/Kernel
351f379b
JR
492Requires(postun): %{name} = %{epoch}:%{version}-%{release}
493Requires: %{name} = %{epoch}:%{version}-%{release}
494Obsoletes: kernel-smp-pcmcia
495Conflicts: pcmcia-cs < 3.1.21
496Conflicts: pcmciautils < 004
07ff8614 497AutoReqProv: no
a5585a68
AM
498
499%description pcmcia
351f379b
JR
500PCMCIA modules.
501
502%description pcmcia -l de.UTF-8
503PCMCIA Module.
a5585a68 504
3a467bc1 505%description pcmcia -l pl.UTF-8
351f379b
JR
506Moduły PCMCIA.
507
a5585a68
AM
508%package sound-alsa
509Summary: ALSA kernel modules
351f379b
JR
510Summary(de.UTF-8): ALSA Kernel Module
511Summary(pl.UTF-8): Sterowniki dźwięku ALSA
a5585a68 512Group: Base/Kernel
351f379b
JR
513Requires(postun): %{name} = %{epoch}:%{version}-%{release}
514Requires: %{name} = %{epoch}:%{version}-%{release}
515Obsoletes: kernel-smp-sound-alsa
07ff8614 516AutoReqProv: no
a5585a68
AM
517
518%description sound-alsa
519ALSA (Advanced Linux Sound Architecture) sound drivers.
520
351f379b
JR
521%description sound-alsa -l de.UTF-8
522ALSA (Advanced Linux Sound Architecture) Sound-Treiber.
523
3a467bc1
JR
524%description sound-alsa -l pl.UTF-8
525Sterowniki dźwięku ALSA (Advanced Linux Sound Architecture).
a5585a68
AM
526
527%package sound-oss
528Summary: OSS kernel modules
351f379b
JR
529Summary(de.UTF-8): OSS Kernel Module
530Summary(pl.UTF-8): Sterowniki dźwięku OSS
a5585a68 531Group: Base/Kernel
351f379b
JR
532Requires(postun): %{name} = %{epoch}:%{version}-%{release}
533Requires: %{name} = %{epoch}:%{version}-%{release}
534Obsoletes: kernel-smp-sound-oss
07ff8614 535AutoReqProv: no
a5585a68
AM
536
537%description sound-oss
538OSS (Open Sound System) drivers.
539
351f379b
JR
540%description sound-oss -l de.UTF-8
541OSS (Open Sound System) Treiber.
542
3a467bc1
JR
543%description sound-oss -l pl.UTF-8
544Sterowniki dźwięku OSS (Open Sound System).
a5585a68 545
a5585a68
AM
546%package headers
547Summary: Header files for the Linux kernel
351f379b
JR
548Summary(de.UTF-8): Header Dateien für den Linux-Kernel
549Summary(pl.UTF-8): Pliki nagłówkowe jądra Linuksa
550Group: Development/Building
52e5f3df 551Provides: %{name}-headers(netfilter) = 20070806
07ff8614 552AutoReqProv: no
a5585a68
AM
553
554%description headers
555These are the C header files for the Linux kernel, which define
351f379b
JR
556structures and constants that are needed when rebuilding the kernel or
557building kernel modules.
558
559%description headers -l de.UTF-8
560Dies sind die C Header Dateien für den Linux-Kernel, die definierte
561Strukturen und Konstante beinhalten, die beim rekompilieren des
562Kernels oder bei Kernel Modul kompilationen gebraucht werden.
a5585a68 563
3a467bc1
JR
564%description headers -l pl.UTF-8
565Pakiet zawiera pliki nagłówkowe jądra, niezbędne do rekompilacji jądra
566oraz budowania modułów jądra.
a5585a68
AM
567
568%package module-build
569Summary: Development files for building kernel modules
351f379b
JR
570Summary(de.UTF-8): Development Dateien die beim Kernel Modul kompilationen gebraucht werden
571Summary(pl.UTF-8): Pliki służące do budowania modułów jądra
572Group: Development/Building
a5585a68 573Requires: %{name}-headers = %{epoch}:%{version}-%{release}
48d6a50c 574Requires: make
7b6fa769 575Conflicts: rpmbuild(macros) < 1.652
07ff8614 576AutoReqProv: no
a5585a68
AM
577
578%description module-build
579Development files from kernel source tree needed to build Linux kernel
580modules from external packages.
581
351f379b
JR
582%description module-build -l de.UTF-8
583Development Dateien des Linux-Kernels die beim kompilieren externer
584Kernel Module gebraucht werden.
585
3a467bc1
JR
586%description module-build -l pl.UTF-8
587Pliki ze drzewa źródeł jądra potrzebne do budowania modułów jądra
588Linuksa z zewnętrznych pakietów.
a5585a68
AM
589
590%package source
591Summary: Kernel source tree
351f379b
JR
592Summary(de.UTF-8): Der Kernel Quelltext
593Summary(pl.UTF-8): Kod źródłowy jądra Linuksa
594Group: Development/Building
a5585a68 595Requires: %{name}-module-build = %{epoch}:%{version}-%{release}
07ff8614 596AutoReqProv: no
d63ae4d9
ER
597%if "%{_rpmversion}" >= "5"
598BuildArch: noarch
599%endif
a5585a68
AM
600
601%description source
351f379b
JR
602This is the source code for the Linux kernel. You can build a custom
603kernel that is better tuned to your particular hardware.
a5585a68 604
3a467bc1
JR
605%description source -l de.UTF-8
606Das Kernel-Source-Paket enthält den source code (C/Assembler-Code) des
a5585a68 607Linux-Kernels. Die Source-Dateien werden gebraucht, um viele
351f379b 608C-Programme zu kompilieren, da sie auf Konstanten zurückgreifen, die
3a467bc1 609im Kernel-Source definiert sind. Die Source-Dateien können auch
351f379b 610benutzt werden, um einen Kernel zu kompilieren, der besser auf Ihre
a5585a68
AM
611Hardware ausgerichtet ist.
612
3a467bc1 613%description source -l fr.UTF-8
a5585a68 614Le package pour le kernel-source contient le code source pour le noyau
3a467bc1
JR
615linux. Ces sources sont nécessaires pour compiler la plupart des
616programmes C, car il dépend de constantes définies dans le code
617source. Les sources peuvent être aussi utilisée pour compiler un noyau
618personnalisé pour avoir de meilleures performances sur des matériels
a5585a68
AM
619particuliers.
620
3a467bc1
JR
621%description source -l pl.UTF-8
622Pakiet zawiera kod źródłowy jądra systemu.
a5585a68
AM
623
624%package doc
625Summary: Kernel documentation
351f379b
JR
626Summary(de.UTF-8): Kernel Dokumentation
627Summary(pl.UTF-8): Dokumentacja do jądra Linuksa
628Group: Documentation
07ff8614 629AutoReqProv: no
d63ae4d9
ER
630%if "%{_rpmversion}" >= "5"
631BuildArch: noarch
632%endif
a5585a68
AM
633
634%description doc
635This is the documentation for the Linux kernel, as found in
636/usr/src/linux/Documentation directory.
637
351f379b
JR
638%description doc -l de.UTF-8
639Dies ist die Kernel Dokumentation wie sie im 'Documentation'
640Verzeichniss vorgefunden werden kann.
641
3a467bc1
JR
642%description doc -l pl.UTF-8
643Pakiet zawiera dokumentację do jądra Linuksa pochodzącą z katalogu
a5585a68
AM
644/usr/src/linux/Documentation.
645
646%prep
351f379b
JR
647%setup -qc
648ln -s %{SOURCE7} kernel-module-build.pl
649ln -s %{SOURCE10} Makefile
67d87e28 650cd linux-%{basever}
a5585a68 651
1c5b0f0a 652%if "%{postver}" != ".0"
c6897157 653%patch0 -p1
351f379b 654%endif
a5585a68 655
7141a3b6 656%if %{without vanilla}
657
351f379b
JR
658%if %{with fbcondecor}
659%patch3 -p1
a5585a68 660%endif
351f379b 661%patch4 -p1
1414594b 662%patch5 -p1
c2992931 663%patch6 -p1
a5585a68 664
351f379b
JR
665## netfilter
666#
a5585a68 667
351f379b
JR
668# kernel-pom-ng-IPV4OPTSSTRIP.patch
669%patch10 -p1
a5585a68 670
351f379b
JR
671# kernel-owner-xid.patch
672%if %{with vserver}
673%patch37 -p1
a5585a68 674%endif
a5585a68 675
351f379b
JR
676# kernel-layer7.patch
677%patch40 -p1
678
351f379b
JR
679##
680# end of netfilter
681
682# zph
683%patch49 -p1
684
685%if %{with imq}
686%patch50 -p1
a5585a68 687%endif
351f379b 688
351f379b 689# esfq
068b6c82
AM
690%if %{with esfq}
691%patch53 -p1
692%endif
351f379b 693
351f379b
JR
694%patch55 -p1
695%patch56 -p1
696
351f379b
JR
697# kernel-rndis_host-wm5.patch
698%patch59 -p1
699
700# hostap enhancements from/for aircrack-ng
701%patch85 -p1
702
351f379b
JR
703# vserver
704%if %{with vserver}
705%patch100 -p1
706%patch101 -p1
a5585a68 707%endif
351f379b 708
68184a5a
JR
709%patch110 -p1
710%patch111 -p1
711%patch112 -p1
712%patch113 -p1
713%patch114 -p1
714%patch115 -p1
715%patch116 -p1
716%patch117 -p1
717%patch118 -p1
68184a5a 718
7ce627cf 719# aufs3
20493b41 720%patch145 -p1
ff3e50f1
JR
721%if %{with vserver}
722%patch146 -p1
723%endif
a5585a68 724
351f379b
JR
725%if %{with rescuecd}
726%patch7000 -p1
e981df17 727%endif
a5585a68 728
df4db69a 729# apparmor
df4db69a 730%patch5000 -p1
df4db69a 731
54fd642e 732%patch250 -p1
733
31f62932
AM
734# virtio-gl
735%patch400 -p1
736
101a7448
ŁK
737# parallel dm-crypt
738%if %{with padmcrypt}
739%patch500 -p1
740%patch501 -p1
741%patch502 -p1
742%patch503 -p1
743%patch504 -p1
744%patch505 -p1
0a2e4279
ŁK
745%patch506 -p1
746%patch507 -p1
747%patch508 -p1
101a7448
ŁK
748%endif
749
7141a3b6 750%endif # vanilla
751
351f379b 752# Small fixes:
08aa9d92 753%patch2000 -p1
351f379b
JR
754%patch2001 -p1
755#%patch2003 -p1
a5585a68 756
73cc1c57 757# Do not remove this, please!
5d3a3ea2 758#%%patch50000 -p1
73cc1c57 759
351f379b 760# Fix EXTRAVERSION in main Makefile
7a8dfe5c 761sed -i 's#EXTRAVERSION =.*#EXTRAVERSION = %{?alt_kernel:.%{alt_kernel}}#g' Makefile
a5585a68 762
351f379b
JR
763# cleanup backups after patching
764find '(' -name '*~' -o -name '*.orig' -o -name '.gitignore' ')' -print0 | xargs -0 -r -l512 rm -f
a5585a68 765
351f379b
JR
766%build
767install -d %{objdir}
768cat > %{targetobj}.mk <<'EOF'
769# generated by %{name}.spec
d85d4a9b 770KERNELSRC := %{srcdir}
351f379b
JR
771KERNELOUTPUT := %{objdir}
772
773SRCARCH := %{target_arch_dir}
774ARCH := %{_target_base_arch}
775Q := %{!?with_verbose:@}
776MAKE_OPTS := %{MakeOpts}
5a5ad91b 777DEFCONFIG := %{defconfig}
351f379b 778EOF
a5585a68 779
351f379b
JR
780RescueConfig() {
781 set -x
782 cat <<-EOCONFIG > $1
783 # CONFIG_SOUND is not set
784 # CONFIG_AUDIT is not set
785 # CONFIG_TR is not set
786 # CONFIG_BT is not set
787 # CONFIG_VIDEO_DEV is not set
788 # CONFIG_DVB_CORE is not set
789 # CONFIG_HAMRADIO is not set
790 # CONFIG_ARCNET is not set
351f379b
JR
791 # CONFIG_DRM is not set
792 # CONFIG_WATCHDOG is not set
793 # CONFIG_INPUT_JOYSTICK is not set
794 # CONFIG_DEBUG_KERNEL is not set
795 # CONFIG_ISDN is not set
796 # CONFIG_AGP is not set
797 # CONFIG_SECURITY is not set
798 # CONFIG_PARIDE is not set
799 # CONFIG_CPU_FREQ is not set
800 # CONFIG_GAMEPORT is not set
801 # CONFIG_KVM is not set
802 # CONFIG_PHONE is not set
dd55897d 803 # CONFIG_STRICT_DEVMEM is not set
6bab3a31 804 # CONFIG_IMA is not set
a947000a
AP
805 # CONFIG_MEDIA_SUPPORT is not set
806 # CONFIG_UWB is not set
807 # CONFIG_PWM is not set
38e632af
JK
808 # CONFIG_COMEDI_NI_LABPC_ISA is not set
809 # CONFIG_FB_SYS_FILLRECT is not set
810 # CONFIG_FB_SYS_COPYAREA is not set
811 # CONFIG_FB_SYS_IMAGEBLIT is not set
812 # CONFIG_FB_SYS_FOPS is not set
813 # CONFIG_FB_HECUBA is not set
814 # CONFIG_FB_SVGALIB is not set
815 # CONFIG_FB_CIRRUS is not set
816 # CONFIG_FB_PM2 is not set
817 # CONFIG_FB_CYBER2000 is not set
818 # CONFIG_FB_ARC is not set
819 # CONFIG_FB_ASILIANT is not set
820 # CONFIG_FB_IMSTT is not set
821 # CONFIG_FB_VGA16 is not set
822 # CONFIG_FB_UVESA is not set
823 # CONFIG_FB_N411 is not set
824 # CONFIG_FB_HGA is not set
825 # CONFIG_FB_S1D13XXX is not set
826 # CONFIG_FB_NVIDIA is not set
827 # CONFIG_FB_RIVA is not set
828 # CONFIG_FB_I740 is not set
829 # CONFIG_FB_LE80578 is not set
830 # CONFIG_FB_CARILLO_RANCH is not set
831 # CONFIG_FB_MATROX is not set
832 # CONFIG_FB_RADEON is not set
833 # CONFIG_FB_ATY128 is not set
834 # CONFIG_FB_ATY is not set
835 # CONFIG_FB_S3 is not set
836 # CONFIG_FB_SAVAGE is not set
837 # CONFIG_FB_SIS is not set
838 # CONFIG_FB_VIA is not set
839 # CONFIG_FB_NEOMAGIC is not set
840 # CONFIG_FB_KYRO is not set
841 # CONFIG_FB_3DFX is not set
842 # CONFIG_FB_VOODOO1 is not set
843 # CONFIG_FB_VT8623 is not set
844 # CONFIG_FB_TRIDENT is not set
845 # CONFIG_FB_ARK is not set
846 # CONFIG_FB_PM3 is not set
847 # CONFIG_FB_CARMINE is not set
848 # CONFIG_FB_GEODE is not set
849 # CONFIG_FB_TMIO is not set
850 # CONFIG_FB_SM501 is not set
851 # CONFIG_FB_SMSCUFX is not set
852 # CONFIG_FB_UDL is not set
853 # CONFIG_FB_GOLDFISH is not set
854 # CONFIG_XEN_FBDEV_FRONTEND is not set
855 # CONFIG_FB_METRONOME is not set
856 # CONFIG_FB_MB862XX is not set
857 # CONFIG_FB_BROADSHEET is not set
858 # CONFIG_FB_AUO_K190X is not set
859 # CONFIG_FB_AUO_K1900 is not set
860 # CONFIG_FB_AUO_K1901 is not set
861 # CONFIG_FB_HYPERV is not set
351f379b 862 CONFIG_AUFS=y
a899ef35 863 CONFIG_AUFS_FS=y
864 CONFIG_AUFS_BR_RAMFS=y
62fff140 865 CONFIG_AUFS_RDU=y
351f379b
JR
866 CONFIG_BLK_DEV_LOOP=y
867 CONFIG_ISO9660_FS=y
868 CONFIG_NLS_UTF8=y
6b79006d 869 CONFIG_SQUASHFS=y
38e632af
JK
870 CONFIG_FB=y
871 CONFIG_FB_EFI=y
872 CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y
351f379b
JR
873EOCONFIG
874
875 return 0
876}
a5585a68 877
351f379b
JR
878BuildConfig() {
879 %{?debug:set -x}
880 set -e
a5585a68 881
351f379b
JR
882 Config="kernel-%{target_arch_dir}.config"
883 echo >&2 "Building config file for %{_target_cpu} using $Config et al."
a5585a68 884
351f379b
JR
885 # prepare local and important options
886 cat <<-EOCONFIG > important.config
887 LOCALVERSION="-%{localversion}"
fb4e3822 888
351f379b
JR
889%if 0%{?debug:1}
890 CONFIG_DEBUG_SLAB=y
891 CONFIG_DEBUG_SLAB_LEAK=y
892 CONFIG_DEBUG_PREEMPT=y
893 CONFIG_RT_DEADLOCK_DETECT=y
a5585a68 894%endif
351f379b 895
351f379b
JR
896%if %{without ipv6}
897 CONFIG_IPV6=n
898%endif
a5585a68 899
351f379b 900%ifarch i686 athlon pentium3 pentium4
5a5ad91b 901 %if %{with pae}
351f379b
JR
902 CONFIG_HIGHMEM4G=n
903 CONFIG_HIGHMEM64G=y
904 CONFIG_X86_PAE=y
7c99a84b 905 CONFIG_NUMA=n
5a5ad91b 906 %endif
351f379b 907%endif
a5585a68 908
351f379b
JR
909%if %{without pcmcia}
910 CONFIG_PCMCIA=n
911%endif
a5585a68 912
351f379b
JR
913%if %{with fbcondecor}
914 CONFIG_FB_S3=n
915 CONFIG_FB_VT8623=n
916 CONFIG_FB_ARK=n
917 CONFIG_FB_TILEBLITTING=n
918 CONFIG_FB_CON_DECOR=y
919%endif
a5585a68 920
351f379b
JR
921%if %{with nfsroot}
922 CONFIG_NFS_FS=y
923 CONFIG_ROOT_NFS=y
924%endif
351f379b 925EOCONFIG
a5585a68 926
351f379b
JR
927%if %{with rescuecd}
928 RescueConfig rescue.config
351f379b 929%endif
351f379b
JR
930 # prepare kernel-style config file from multiple config files
931 %{__awk} -v arch="all %{target_arch_dir} %{_target_base_arch} %{_target_cpu}" -f %{SOURCE6} \
101ae904 932%if %{with myown}
933 $RPM_SOURCE_DIR/kernel-%{alt_kernel}.config \
934%endif
351f379b 935 important.config \
7141a3b6 936%if %{without vanilla}
351f379b
JR
937%if %{with rescuecd}
938 %{SOURCE58} \
351f379b
JR
939 rescue.config \
940%endif
941 \
351f379b
JR
942%if %{with imq}
943 %{SOURCE55} \
944%endif
945%if %{with vserver}
946 %{SOURCE43} \
351f379b 947%endif
351f379b 948 %{SOURCE41} %{?0:patches} \
7141a3b6 949%endif
351f379b
JR
950 %{SOURCE20} \
951 $RPM_SOURCE_DIR/$Config
952}
a5585a68 953
351f379b
JR
954cd %{objdir}
955install -d arch/%{target_arch_dir}
351f379b 956BuildConfig > %{defconfig}
351f379b
JR
957ln -sf %{defconfig} .config
958cd -
a5585a68 959
7856c5e8
AM
960%{__make} \
961 TARGETOBJ=%{targetobj} \
962 %{?with_verbose:V=1} \
963 oldconfig
a5585a68 964
351f379b 965%{__awk} %{?debug:-v dieOnError=1} -v infile=%{objdir}/%{defconfig} -f %{SOURCE8} %{objdir}/.config
a5585a68 966
351f379b 967# build kernel
7856c5e8
AM
968%{__make} \
969 TARGETOBJ=%{targetobj} \
970 %{?with_verbose:V=1} \
971 all
a5585a68 972
351f379b
JR
973%install
974rm -rf $RPM_BUILD_ROOT
4505b6c5 975%{__make} %{MakeOpts} -j1 %{!?with_verbose:-s} modules_install firmware_install \
351f379b
JR
976 -C %{objdir} \
977 %{?with_verbose:V=1} \
978 DEPMOD=%{DepMod} \
979 INSTALL_MOD_PATH=$RPM_BUILD_ROOT \
980 INSTALL_FW_PATH=$RPM_BUILD_ROOT/lib/firmware/%{kernel_release} \
981 KERNELRELEASE=%{kernel_release}
982
983install -d $RPM_BUILD_ROOT/lib/modules/%{kernel_release}/misc
984
101ae904 985# create directories which may be missing, to simplyfy %files
64d14572 986install -d $RPM_BUILD_ROOT/lib/modules/%{kernel_release}/kernel/{arch,sound,mm}
101ae904 987
351f379b
JR
988# rpm obeys filelinkto checks for ghosted symlinks, convert to files
989rm -f $RPM_BUILD_ROOT/lib/modules/%{kernel_release}/{build,source}
990touch $RPM_BUILD_ROOT/lib/modules/%{kernel_release}/{build,source}
991
6d54bd67
ER
992# no point embed content for %ghost files. empty them
993for a in \
994 dep{,.bin} \
995 alias{,.bin} \
8ee3ac38
AM
996 devname \
997 softdep \
6d54bd67 998 symbols{,.bin} \
6d54bd67 999; do
09e63f4a 1000 test -f $RPM_BUILD_ROOT/lib/modules/%{kernel_release}/modules.$a
6d54bd67
ER
1001 > $RPM_BUILD_ROOT/lib/modules/%{kernel_release}/modules.$a
1002done
1003
351f379b
JR
1004# /boot
1005install -d $RPM_BUILD_ROOT/boot
1006cp -a %{objdir}/System.map $RPM_BUILD_ROOT/boot/System.map-%{kernel_release}
99eb7fa8 1007cp -aL %{objdir}/.config $RPM_BUILD_ROOT/boot/config-%{kernel_release}
351f379b 1008%ifarch %{ix86} %{x8664}
1db9a2c1
ER
1009 cp -a %{objdir}/arch/%{target_arch_dir}/boot/bzImage $RPM_BUILD_ROOT/boot/vmlinuz-%{kernel_release}
1010 install -p %{objdir}/vmlinux $RPM_BUILD_ROOT/boot/vmlinux-%{kernel_release}
351f379b
JR
1011%endif
1012%ifarch ppc ppc64
1db9a2c1
ER
1013 install -p %{objdir}/vmlinux $RPM_BUILD_ROOT/boot/vmlinuz-%{kernel_release}
1014 install -p %{objdir}/vmlinux $RPM_BUILD_ROOT/boot/vmlinux-%{kernel_release}
a5585a68 1015%endif
a5585a68 1016%ifarch ia64
1db9a2c1
ER
1017 %{__gzip} -cfv %{objdir}/vmlinux > %{objdir}/vmlinuz
1018 cp -a %{objdir}/vmlinuz $RPM_BUILD_ROOT/boot/efi/vmlinuz-%{kernel_release}
1019 ln -sf efi/vmlinuz-%{kernel_release} $RPM_BUILD_ROOT/boot/vmlinuz-%{kernel_release}
351f379b
JR
1020%endif
1021%ifarch alpha sparc sparc64
1022 %{__gzip} -cfv %{objdir}/vmlinux > %{objdir}/vmlinuz
1023 cp -a %{objdir}/vmlinuz $RPM_BUILD_ROOT/boot/vmlinuz-%{kernel_release}
1db9a2c1
ER
1024 install -p %{objdir}/vmlinux $RPM_BUILD_ROOT/boot/vmlinuz-%{kernel_release}
1025 %ifarch sparc
1026 elftoaout %{objdir}/arch/sparc/boot/image -o %{objdir}/vmlinux.aout
1027 install -p %{objdir}/vmlinux.aout $RPM_BUILD_ROOT/boot/vmlinux.aout-%{kernel_release}
1028 %endif
1029 %ifarch sparc64
1030 elftoaout %{objdir}/arch/sparc64/boot/image -o %{objdir}/vmlinux.aout
1031 install -p %{objdir}/vmlinux.aout $RPM_BUILD_ROOT/boot/vmlinux.aout-%{kernel_release}
1032 %endif
351f379b
JR
1033%endif
1034%ifarch arm
1db9a2c1 1035 install -p %{objdir}/arch/arm/boot/zImage $RPM_BUILD_ROOT/boot/vmlinuz-%{kernel_release}
a5585a68 1036%endif
a5585a68 1037
351f379b
JR
1038# ghosted initrd
1039touch $RPM_BUILD_ROOT%{initrd_dir}/initrd-%{kernel_release}.gz
1a30aaa8 1040touch $RPM_BUILD_ROOT%{initrd_dir}/initramfs-%{kernel_release}.img
a5585a68 1041
7b6fa769 1042%if "%{_target_base_arch}" != "%{_host_base_arch}"
351f379b
JR
1043touch $RPM_BUILD_ROOT/lib/modules/%{kernel_release}/modules.dep
1044%endif
a5585a68 1045
351f379b
JR
1046# /etc/modrobe.d
1047install -d $RPM_BUILD_ROOT%{_sysconfdir}/modprobe.d/%{kernel_release}
a5585a68 1048
5aeaa3c2
JR
1049install -d $RPM_BUILD_ROOT/etc/sysconfig
1050install %{SOURCE1} $RPM_BUILD_ROOT/etc/sysconfig/kernel
1051
351f379b 1052# /usr/src/linux
82833fcc
AM
1053install -d $RPM_BUILD_ROOT%{_kernelsrcdir}
1054
351f379b
JR
1055# test if we can hardlink -- %{_builddir} and $RPM_BUILD_ROOT on same partition
1056if cp -al %{srcdir}/COPYING $RPM_BUILD_ROOT/COPYING 2>/dev/null; then
1057 l=l
1058 rm -f $RPM_BUILD_ROOT/COPYING
a5585a68 1059fi
a5585a68 1060
351f379b 1061cp -a$l %{srcdir}/* $RPM_BUILD_ROOT%{_kernelsrcdir}
29564a2e
JR
1062cp -a %{objdir}/Module.symvers $RPM_BUILD_ROOT%{_kernelsrcdir}
1063cp -aL %{objdir}/.config $RPM_BUILD_ROOT%{_kernelsrcdir}
1064cp -a %{objdir}/include $RPM_BUILD_ROOT%{_kernelsrcdir}
c122bff4
AM
1065# copy arch/x86/include/generated
1066for dir in $(cd %{objdir} && find arch -name generated -type d); do
1067 cp -a %{objdir}/$dir $RPM_BUILD_ROOT%{_kernelsrcdir}/$dir
1068 find $RPM_BUILD_ROOT%{_kernelsrcdir}/$dir -name '.*.cmd' -exec rm "{}" ";"
1069done
351f379b 1070
301ecb4a
JR
1071# version.h location changed in 3.7, but a lot of external modules don't know about it
1072# add a compatibility symlink
fca82534 1073ln -s ../generated/uapi/linux/version.h $RPM_BUILD_ROOT%{_kernelsrcdir}/include/linux/version.h
301ecb4a 1074
4217a9ad
JR
1075# disable this here, causes a lot of build-time problems and our rpm-build disables it anyway
1076%{__sed} -i -e 's|\(CONSTIFY_PLUGIN.*:=.*\)|# \1|' $RPM_BUILD_ROOT%{_kernelsrcdir}/Makefile
1077
351f379b
JR
1078# collect module-build files and directories
1079# Usage: kernel-module-build.pl $rpmdir $fileoutdir
1080fileoutdir=$(pwd)
1081cd $RPM_BUILD_ROOT%{_kernelsrcdir}
1082%{__perl} %{topdir}/kernel-module-build.pl %{_kernelsrcdir} $fileoutdir
1083cd -
1084
29564a2e
JR
1085for f in `find %{objdir}/scripts -type f -print | grep -v "/\.\|\.o$"` ; do
1086 ff=${f##%{objdir}/}
1087 if [ -x "$f" ]; then
1088 echo "%attr(755,root,root) %{_kernelsrcdir}/$ff" >>files.mb_include_modulebuild_and_dirs
1089 else
1090 echo "%{_kernelsrcdir}/$ff" >>files.mb_include_modulebuild_and_dirs
1091 fi
1092 echo "%exclude %{_kernelsrcdir}/$ff" >>files.source_exclude_modulebuild_and_dirs
1093 cp -a "$f" "$RPM_BUILD_ROOT%{_kernelsrcdir}/$ff"
1094done
1095
d63ae4d9 1096%if %{with doc}
30f08736
ER
1097# move to %{_docdir} so we wouldn't depend on any kernel package for dirs
1098install -d $RPM_BUILD_ROOT%{_docdir}
1099mv $RPM_BUILD_ROOT{%{_kernelsrcdir}/Documentation,%{_docdir}/%{name}-%{version}}
1100
d63ae4d9
ER
1101%{__rm} $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/dontdiff
1102%{__rm} $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/Makefile
1103%{__rm} $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/*/Makefile
1104%{__rm} $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/*/*/Makefile
1105%else
1106%{__rm} -r $RPM_BUILD_ROOT%{_kernelsrcdir}/Documentation
1107%endif
d3a69071 1108
351f379b
JR
1109%clean
1110rm -rf $RPM_BUILD_ROOT
1111
1112%preun
1113if [ -x /sbin/new-kernel-pkg ]; then
1114 /sbin/new-kernel-pkg --remove %{kernel_release}
a5585a68 1115fi
351f379b
JR
1116
1117%post
5aeaa3c2
JR
1118[ -f /etc/sysconfig/kernel ] && . /etc/sysconfig/kernel
1119if [[ "$CREATE_SYMLINKS" != [Nn][Oo] ]]; then
351f379b 1120%ifarch ia64
5aeaa3c2
JR
1121 mv -f /boot/efi/vmlinuz{,.old} 2> /dev/null
1122 ln -sf vmlinuz-%{kernel_release} /boot/efi/vmlinuz
b400362c 1123%if 0%{?alt_kernel:1}
5aeaa3c2
JR
1124 mv -f /boot/efi/vmlinuz%{_alt_kernel}{,.old} 2> /dev/null
1125 ln -sf vmlinuz-%{kernel_release} /boot/efi/vmlinuz%{_alt_kernel}
b400362c 1126%endif
351f379b 1127%endif
5aeaa3c2
JR
1128 mv -f /boot/vmlinuz{,.old} 2> /dev/null
1129 mv -f /boot/System.map{,.old} 2> /dev/null
1130 ln -sf vmlinuz-%{kernel_release} /boot/vmlinuz
1131 ln -sf System.map-%{kernel_release} /boot/System.map
b400362c 1132%if 0%{?alt_kernel:1}
5aeaa3c2
JR
1133 mv -f /boot/vmlinuz%{_alt_kernel}{,.old} 2> /dev/null
1134 mv -f /boot/System%{_alt_kernel}.map{,.old} 2> /dev/null
1135 ln -sf vmlinuz-%{kernel_release} /boot/vmlinuz%{_alt_kernel}
1136 ln -sf System.map-%{kernel_release} /boot/System.map%{_alt_kernel}
b400362c 1137%endif
5aeaa3c2 1138fi
351f379b
JR
1139
1140%depmod %{kernel_release}
1141
8a2af12a 1142%if %{without vserver}
9ed61a9a 1143%banner -e -a kernel <<EOF
8a2af12a 1144
9ed61a9a 1145WARNING: Vserver support is DISABLED in this kernel build!
8a2af12a
JR
1146
1147EOF
1148%endif
1149
4dabe329 1150%posttrans
31a535c1 1151# use posttrans to generate initrd after all dependant module packages (-drm, etc) are installed
5aeaa3c2 1152[ -f /etc/sysconfig/kernel ] && . /etc/sysconfig/kernel
fed5e62c 1153initrd_file=""
5aeaa3c2 1154if [[ "$USE_GENINITRD" != [Nn][Oo] ]]; then
31a535c1 1155 /sbin/geninitrd -f --initrdfs=initramfs %{initrd_dir}/initrd-%{kernel_release}.gz %{kernel_release} || :
fed5e62c 1156 initrd_file="initrd-%{kernel_release}.gz"
5aeaa3c2 1157fi
fed5e62c
JK
1158
1159# if dracut is present then generate full-featured initramfs
1160if [[ "$USE_DRACUT" != [Nn][Oo] ]] && [ -x /sbin/dracut ]; then
1161 /sbin/dracut --force --quiet /boot/initramfs-%{kernel_release}.img %{kernel_release}
5a5ad91b 1162 [ -n "$initrd_file" ] || initrd_file="initramfs-%{kernel_release}.img"
fed5e62c
JK
1163fi
1164
5aeaa3c2
JR
1165if [[ "$CREATE_SYMLINKS" != [Nn][Oo] ]]; then
1166 mv -f %{initrd_dir}/initrd{,.old} 2> /dev/null
5a5ad91b
ER
1167 if [ -n "$initrd_file" ] ; then
1168 ln -sf "$initrd_file" %{initrd_dir}/initrd
1169 fi
b400362c 1170%if 0%{?alt_kernel:1}
5aeaa3c2 1171 mv -f %{initrd_dir}/initrd%{_alt_kernel}{,.old} 2> /dev/null
5a5ad91b
ER
1172 if [ -n "$initrd_file" ] ; then
1173 ln -sf "$initrd_file" %{initrd_dir}/initrd%{_alt_kernel}
1174 fi
b400362c 1175%endif
5aeaa3c2 1176fi
351f379b 1177
4dabe329 1178# update boot loaders when old package files are gone from filesystem
c5de1ad5 1179if [ -x /sbin/update-grub -a -f /etc/sysconfig/grub ]; then
4dabe329
ER
1180 if [ "$(. /etc/sysconfig/grub; echo ${UPDATE_GRUB:-no})" = "yes" ]; then
1181 /sbin/update-grub >/dev/null
c5de1ad5
ER
1182 fi
1183fi
351f379b
JR
1184if [ -x /sbin/new-kernel-pkg ]; then
1185 /sbin/new-kernel-pkg --initrdfile=%{initrd_dir}/initrd-%{kernel_release}.gz --install %{kernel_release} --banner "PLD Linux (%{pld_release})%{?alt_kernel: / %{alt_kernel}}"
0bb27755
ER
1186fi
1187if [ -x /sbin/rc-boot ]; then
351f379b 1188 /sbin/rc-boot 1>&2 || :
a5585a68 1189fi
f06ac035
JK
1190if [ -x /sbin/efi-boot-update ]; then
1191 /sbin/efi-boot-update --auto || :
1192fi
a5585a68 1193
351f379b 1194%post vmlinux
5aeaa3c2
JR
1195[ -f /etc/sysconfig/kernel ] && . /etc/sysconfig/kernel
1196if [[ "$CREATE_SYMLINKS" != [Nn][Oo] ]]; then
1197 mv -f /boot/vmlinux{,.old} 2> /dev/null
1198 ln -sf vmlinux-%{kernel_release} /boot/vmlinux
b400362c 1199%if 0%{?alt_kernel:1}
5aeaa3c2
JR
1200 mv -f /boot/vmlinux-%{alt_kernel}{,.old} 2> /dev/null
1201 ln -sf vmlinux-%{kernel_release} /boot/vmlinux-%{alt_kernel}
b400362c 1202%endif
5aeaa3c2 1203fi
351f379b 1204
351f379b
JR
1205%post drm
1206%depmod %{kernel_release}
a5585a68 1207
351f379b
JR
1208%postun drm
1209%depmod %{kernel_release}
a5585a68 1210
55e054be
JR
1211%post ide
1212%depmod %{kernel_release}
1213
1214%postun ide
1215%depmod %{kernel_release}
1216
351f379b
JR
1217%post pcmcia
1218%depmod %{kernel_release}
a5585a68 1219
351f379b
JR
1220%postun pcmcia
1221%depmod %{kernel_release}
a5585a68 1222
351f379b
JR
1223%post sound-alsa
1224%depmod %{kernel_release}
a5585a68 1225
351f379b
JR
1226%postun sound-alsa
1227%depmod %{kernel_release}
a5585a68 1228
351f379b
JR
1229%post sound-oss
1230%depmod %{kernel_release}
a5585a68 1231
351f379b
JR
1232%postun sound-oss
1233%depmod %{kernel_release}
a5585a68
AM
1234
1235%post headers
e865f3ec 1236ln -snf %{basename:%{_kernelsrcdir}} %{_prefix}/src/linux%{versuffix}%{_alt_kernel}
a5585a68
AM
1237
1238%postun headers
351f379b 1239if [ "$1" = "0" ]; then
e865f3ec
JR
1240 if [ -L %{_prefix}/src/linux%{versuffix}%{_alt_kernel} ]; then
1241 if [ "$(readlink %{_prefix}/src/linux%{versuffix}%{_alt_kernel})" = "linux%{versuffix}%{_alt_kernel}-%{version}" ]; then
1242 rm -f %{_prefix}/src/linux%{versuffix}%{_alt_kernel}
a5585a68
AM
1243 fi
1244 fi
1245fi
1246
351f379b
JR
1247%triggerin module-build -- %{name} = %{epoch}:%{version}-%{release}
1248ln -sfn %{_kernelsrcdir} /lib/modules/%{kernel_release}/build
1249ln -sfn %{_kernelsrcdir} /lib/modules/%{kernel_release}/source
1250
1251%triggerun module-build -- %{name} = %{epoch}:%{version}-%{release}
1252if [ "$1" = 0 ]; then
1253 rm -f /lib/modules/%{kernel_release}/{build,source}
1254fi
1255
a5585a68
AM
1256%files
1257%defattr(644,root,root,755)
11f5dae8 1258%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/kernel
a5585a68 1259%ifarch sparc sparc64
351f379b 1260/boot/vmlinux.aout-%{kernel_release}
a5585a68
AM
1261%endif
1262%ifarch ia64
351f379b
JR
1263/boot/efi/vmlinuz-%{kernel_release}
1264%endif
1265/boot/vmlinuz-%{kernel_release}
1266/boot/System.map-%{kernel_release}
d9faffc5 1267/boot/config-%{kernel_release}
351f379b 1268%ghost %{initrd_dir}/initrd-%{kernel_release}.gz
1a30aaa8 1269%ghost %{initrd_dir}/initramfs-%{kernel_release}.img
ae1c66e5 1270/lib/firmware/%{kernel_release}
351f379b
JR
1271
1272%dir /lib/modules/%{kernel_release}
1273%dir /lib/modules/%{kernel_release}/kernel
351f379b 1274/lib/modules/%{kernel_release}/kernel/arch
351f379b
JR
1275/lib/modules/%{kernel_release}/kernel/crypto
1276/lib/modules/%{kernel_release}/kernel/drivers
101ae904 1277%if %{have_drm}
351f379b
JR
1278%exclude /lib/modules/%{kernel_release}/kernel/drivers/gpu
1279%endif
55e054be 1280%if %{have_ide}
56f1b194 1281%exclude /lib/modules/%{kernel_release}/kernel/drivers/ide/*
55e054be 1282%endif
351f379b 1283/lib/modules/%{kernel_release}/kernel/fs
351f379b 1284/lib/modules/%{kernel_release}/kernel/kernel
351f379b
JR
1285/lib/modules/%{kernel_release}/kernel/lib
1286/lib/modules/%{kernel_release}/kernel/net
fecce547 1287/lib/modules/%{kernel_release}/kernel/mm
101ae904 1288%if %{have_sound}
351f379b
JR
1289%dir /lib/modules/%{kernel_release}/kernel/sound
1290/lib/modules/%{kernel_release}/kernel/sound/ac97_bus.ko*
1291/lib/modules/%{kernel_release}/kernel/sound/sound*.ko*
1292%ifnarch sparc
2ba6f0dd
AM
1293%exclude /lib/modules/%{kernel_release}/kernel/drivers/media/pci/cx88/cx88-alsa.ko*
1294%exclude /lib/modules/%{kernel_release}/kernel/drivers/media/usb/em28xx/em28xx-alsa.ko*
1295%exclude /lib/modules/%{kernel_release}/kernel/drivers/media/pci/saa7134/saa7134-alsa.ko*
351f379b
JR
1296%endif
1297%endif
1298%dir /lib/modules/%{kernel_release}/misc
101ae904 1299%if %{have_pcmcia}
351f379b
JR
1300%exclude /lib/modules/%{kernel_release}/kernel/drivers/pcmcia/[!p]*
1301%exclude /lib/modules/%{kernel_release}/kernel/drivers/pcmcia/pd6729.ko*
1302%exclude /lib/modules/%{kernel_release}/kernel/drivers/*/pcmcia
1303%if %{without rescuecd}
1304%exclude /lib/modules/%{kernel_release}/kernel/drivers/ata/pata_pcmcia.ko*
1305%exclude /lib/modules/%{kernel_release}/kernel/drivers/bluetooth/*_cs.ko*
1306%exclude /lib/modules/%{kernel_release}/kernel/drivers/isdn/hardware/avm/avm_cs.ko*
1307%exclude /lib/modules/%{kernel_release}/kernel/drivers/isdn/hardware/avm/b1pcmcia.ko*
351f379b
JR
1308%exclude /lib/modules/%{kernel_release}/kernel/drivers/usb/gadget/g_midi.ko*
1309%endif
1310%exclude /lib/modules/%{kernel_release}/kernel/drivers/ide/ide-cs.ko*
1311%exclude /lib/modules/%{kernel_release}/kernel/drivers/net/wireless/*_cs.ko*
1312%exclude /lib/modules/%{kernel_release}/kernel/drivers/net/wireless/b43
1313%exclude /lib/modules/%{kernel_release}/kernel/drivers/net/wireless/hostap/hostap_cs.ko*
1314%exclude /lib/modules/%{kernel_release}/kernel/drivers/net/wireless/libertas/*_cs.ko*
1315%exclude /lib/modules/%{kernel_release}/kernel/drivers/parport/parport_cs.ko*
7eafdf33 1316%exclude /lib/modules/%{kernel_release}/kernel/drivers/tty/serial/8250/serial_cs.ko*
351f379b
JR
1317%exclude /lib/modules/%{kernel_release}/kernel/drivers/usb/host/sl811_cs.ko*
1318%endif
101ae904 1319%if %{with myown}
1320/lib/modules/%{kernel_release}/kernel/sound
1321%endif
30812fb8 1322/lib/modules/%{kernel_release}/kernel/security
6d54bd67
ER
1323
1324%dir %{_sysconfdir}/modprobe.d/%{kernel_release}
1325
1326# provided by build
1327/lib/modules/%{kernel_release}/modules.order
8ee3ac38 1328/lib/modules/%{kernel_release}/modules.builtin*
6d54bd67
ER
1329
1330# rest modules.* are ghost (regenerated by post depmod -a invocation)
1331%ghost /lib/modules/%{kernel_release}/modules.alias
1332%ghost /lib/modules/%{kernel_release}/modules.alias.bin
6d54bd67
ER
1333%ghost /lib/modules/%{kernel_release}/modules.dep
1334%ghost /lib/modules/%{kernel_release}/modules.dep.bin
8ee3ac38 1335%ghost /lib/modules/%{kernel_release}/modules.devname
8ee3ac38 1336%ghost /lib/modules/%{kernel_release}/modules.softdep
6d54bd67
ER
1337%ghost /lib/modules/%{kernel_release}/modules.symbols
1338%ghost /lib/modules/%{kernel_release}/modules.symbols.bin
6d54bd67 1339
351f379b
JR
1340# symlinks pointing to kernelsrcdir
1341%ghost /lib/modules/%{kernel_release}/build
1342%ghost /lib/modules/%{kernel_release}/source
351f379b 1343
351f379b
JR
1344%ifarch alpha %{ix86} %{x8664} ppc ppc64 sparc sparc64
1345%files vmlinux
a5585a68 1346%defattr(644,root,root,755)
351f379b 1347/boot/vmlinux-%{kernel_release}
a5585a68
AM
1348%endif
1349
101ae904 1350%if %{have_drm}
351f379b 1351%files drm
a5585a68 1352%defattr(644,root,root,755)
351f379b 1353/lib/modules/%{kernel_release}/kernel/drivers/gpu
a5585a68
AM
1354%endif
1355
55e054be
JR
1356%if %{have_ide}
1357%files ide
1358%defattr(644,root,root,755)
56f1b194 1359/lib/modules/%{kernel_release}/kernel/drivers/ide/*
2226c439
JR
1360%if %{have_pcmcia}
1361%exclude /lib/modules/%{kernel_release}/kernel/drivers/ide/ide-cs.ko*
1362%endif
55e054be
JR
1363%endif
1364
101ae904 1365%if %{have_pcmcia}
351f379b 1366%files pcmcia
a5585a68 1367%defattr(644,root,root,755)
351f379b
JR
1368/lib/modules/%{kernel_release}/kernel/drivers/pcmcia/*ko*
1369/lib/modules/%{kernel_release}/kernel/drivers/*/pcmcia
1370%exclude /lib/modules/%{kernel_release}/kernel/drivers/pcmcia/pcmcia*ko*
1371%if %{without rescuecd}
1372/lib/modules/%{kernel_release}/kernel/drivers/bluetooth/*_cs.ko*
1373/lib/modules/%{kernel_release}/kernel/drivers/isdn/hardware/avm/avm_cs.ko*
1374/lib/modules/%{kernel_release}/kernel/drivers/isdn/hardware/avm/b1pcmcia.ko*
351f379b 1375/lib/modules/%{kernel_release}/kernel/drivers/ata/pata_pcmcia.ko*
07100052 1376%endif
351f379b
JR
1377/lib/modules/%{kernel_release}/kernel/drivers/ide/ide-cs.ko*
1378/lib/modules/%{kernel_release}/kernel/drivers/net/wireless/*_cs.ko*
1379/lib/modules/%{kernel_release}/kernel/drivers/net/wireless/b43
1380/lib/modules/%{kernel_release}/kernel/drivers/net/wireless/hostap/hostap_cs.ko*
1381/lib/modules/%{kernel_release}/kernel/drivers/net/wireless/libertas/*_cs.ko*
1382/lib/modules/%{kernel_release}/kernel/drivers/parport/parport_cs.ko*
7eafdf33 1383/lib/modules/%{kernel_release}/kernel/drivers/tty/serial/8250/serial_cs.ko*
351f379b
JR
1384/lib/modules/%{kernel_release}/kernel/drivers/usb/host/sl811_cs.ko*
1385%endif
1386
101ae904 1387%if %{have_sound}
351f379b 1388%files sound-alsa
a5585a68 1389%defattr(644,root,root,755)
351f379b
JR
1390/lib/modules/%{kernel_release}/kernel/sound
1391%exclude %dir /lib/modules/%{kernel_release}/kernel/sound
1392%exclude /lib/modules/%{kernel_release}/kernel/sound/ac97_bus.ko*
1393%exclude /lib/modules/%{kernel_release}/kernel/sound/sound*.ko*
1394%if %{have_oss}
1395%exclude /lib/modules/%{kernel_release}/kernel/sound/oss
a5585a68 1396%endif
351f379b
JR
1397%ifnarch sparc
1398/lib/modules/%{kernel_release}/kernel/drivers/usb/gadget/g_midi.ko*
2ba6f0dd
AM
1399/lib/modules/%{kernel_release}/kernel/drivers/media/pci/cx88/cx88-alsa.ko*
1400/lib/modules/%{kernel_release}/kernel/drivers/media/usb/em28xx/em28xx-alsa.ko*
1401/lib/modules/%{kernel_release}/kernel/drivers/media/pci/saa7134/saa7134-alsa.ko*
a5585a68
AM
1402%endif
1403
101ae904 1404%if %{have_oss}
351f379b 1405%files sound-oss
a5585a68 1406%defattr(644,root,root,755)
351f379b 1407/lib/modules/%{kernel_release}/kernel/sound/oss
a5585a68 1408%endif
a5585a68
AM
1409%endif
1410
fecce547 1411%files headers -f files.headers_exclude_kbuild
a5585a68 1412%defattr(644,root,root,755)
30f08736 1413%dir %{_kernelsrcdir}
351f379b
JR
1414%{_kernelsrcdir}/include
1415%dir %{_kernelsrcdir}/arch
1416%dir %{_kernelsrcdir}/arch/[!K]*
1417%{_kernelsrcdir}/arch/*/include
1418%dir %{_kernelsrcdir}/security
1419%dir %{_kernelsrcdir}/security/selinux
1420%{_kernelsrcdir}/security/selinux/include
29564a2e
JR
1421%{_kernelsrcdir}/.config
1422%{_kernelsrcdir}/Module.symvers
351f379b 1423
fecce547 1424%files module-build -f files.mb_include_modulebuild_and_dirs
a5585a68 1425%defattr(644,root,root,755)
351f379b
JR
1426%ifarch ppc ppc64
1427%{_kernelsrcdir}/arch/powerpc/lib/crtsavres.*
1428%endif
fecce547 1429%exclude %dir %{_kernelsrcdir}/arch/um
351f379b
JR
1430%{_kernelsrcdir}/arch/*/kernel/asm-offsets*
1431%{_kernelsrcdir}/arch/*/kernel/sigframe*.h
1432%{_kernelsrcdir}/drivers/lguest/lg.h
2ba6f0dd 1433%{_kernelsrcdir}/drivers/media/pci/bt8xx/bttv.h
351f379b 1434%{_kernelsrcdir}/kernel/bounds.c
4217a9ad
JR
1435%{_kernelsrcdir}/scripts/basic/*.c
1436%attr(755,root,root) %{_kernelsrcdir}/scripts/kconfig/*.sh
1437%{_kernelsrcdir}/scripts/kconfig/*.in
1438%{_kernelsrcdir}/scripts/kconfig/*_shipped
1439%{_kernelsrcdir}/scripts/kconfig/*.pl
1440%{_kernelsrcdir}/scripts/kconfig/*.glade
1441%{_kernelsrcdir}/scripts/kconfig/*.gperf
1442%{_kernelsrcdir}/scripts/kconfig/*.cc
1443%{_kernelsrcdir}/scripts/kconfig/*.y
1444%{_kernelsrcdir}/scripts/kconfig/*.l
1445%{_kernelsrcdir}/scripts/kconfig/[c-k]*.c
1446%{_kernelsrcdir}/scripts/kconfig/[c-k]*.h
1447%{_kernelsrcdir}/scripts/kconfig/l*.h
1448%{_kernelsrcdir}/scripts/kconfig/[m-u]*.c
1449%{_kernelsrcdir}/scripts/kconfig/[m-u]*.h
1450%{_kernelsrcdir}/scripts/kconfig/lxdialog
1451%{_kernelsrcdir}/scripts/mod/*.c
4442a07d 1452%{_kernelsrcdir}/scripts/mod/modpost.h
29564a2e 1453%attr(755,root,root) %{_kernelsrcdir}/scripts/mkcompile_h
351f379b 1454%{_kernelsrcdir}/scripts/mkmakefile
960d2e94 1455%{_kernelsrcdir}/scripts/module-common.lds
29564a2e 1456%attr(755,root,root) %{_kernelsrcdir}/scripts/setlocalversion
351f379b 1457%{_kernelsrcdir}/scripts/*.c
29564a2e 1458%attr(755,root,root) %{_kernelsrcdir}/scripts/*.sh
9d6d5869 1459%{_kernelsrcdir}/scripts/selinux/genheaders/*.c
c78e408d 1460%{_kernelsrcdir}/scripts/selinux/mdp/*.c
fecce547 1461%exclude %dir %{_kernelsrcdir}/security
1462%exclude %dir %{_kernelsrcdir}/security/selinux
a5585a68 1463
1848fd38 1464%if %{with doc}
a5585a68
AM
1465%files doc
1466%defattr(644,root,root,755)
d3a69071
ER
1467%dir %{_docdir}/%{name}-%{version}
1468
1469%{_docdir}/%{name}-%{version}/[!jkz]*
1470%{_docdir}/%{name}-%{version}/[jkz]*.txt
1471%{_docdir}/%{name}-%{version}/kbuild
1472%{_docdir}/%{name}-%{version}/kdump
1473%lang(ja) %{_docdir}/%{name}-%{version}/ja_JP
1474%lang(ko) %{_docdir}/%{name}-%{version}/ko_KR
1475%lang(zh_CN) %{_docdir}/%{name}-%{version}/zh_CN
1848fd38 1476%endif
a5585a68
AM
1477
1478%if %{with source}
fecce547 1479%files source -f files.source_exclude_modulebuild_and_dirs
a5585a68 1480%defattr(644,root,root,755)
351f379b
JR
1481%{_kernelsrcdir}/arch/*/[!Mik]*
1482%{_kernelsrcdir}/arch/*/kernel/[!M]*
351f379b
JR
1483%{_kernelsrcdir}/arch/ia64/install.sh
1484%{_kernelsrcdir}/arch/m68k/ifpsp060/[!M]*
1485%{_kernelsrcdir}/arch/m68k/ifpsp060/MISC
fecce547 1486%{_kernelsrcdir}/arch/m68k/install.sh
351f379b
JR
1487%{_kernelsrcdir}/arch/parisc/install.sh
1488%{_kernelsrcdir}/arch/x86/ia32/[!M]*
1489%{_kernelsrcdir}/arch/ia64/kvm
1490%{_kernelsrcdir}/arch/powerpc/kvm
1491%ifarch ppc ppc64
1492%exclude %{_kernelsrcdir}/arch/powerpc/lib/crtsavres.*
1493%endif
4442a07d 1494%{_kernelsrcdir}/arch/arm/kvm
392086de 1495%{_kernelsrcdir}/arch/arm64/kvm
7770d33f 1496%{_kernelsrcdir}/arch/mips/kvm
351f379b
JR
1497%{_kernelsrcdir}/arch/s390/kvm
1498%{_kernelsrcdir}/arch/x86/kvm
1499%exclude %{_kernelsrcdir}/arch/*/kernel/asm-offsets*
1500%exclude %{_kernelsrcdir}/arch/*/kernel/sigframe*.h
1501%exclude %{_kernelsrcdir}/drivers/lguest/lg.h
2ba6f0dd 1502%exclude %{_kernelsrcdir}/drivers/media/pci/bt8xx/bttv.h
351f379b
JR
1503%{_kernelsrcdir}/block
1504%{_kernelsrcdir}/crypto
1505%{_kernelsrcdir}/drivers
1506%{_kernelsrcdir}/firmware
1507%{_kernelsrcdir}/fs
351f379b
JR
1508%{_kernelsrcdir}/init
1509%{_kernelsrcdir}/ipc
1510%{_kernelsrcdir}/kernel
1511%exclude %{_kernelsrcdir}/kernel/bounds.c
1512%{_kernelsrcdir}/lib
1513%{_kernelsrcdir}/mm
1514%{_kernelsrcdir}/net
1515%{_kernelsrcdir}/virt
1516%{_kernelsrcdir}/samples
1517%{_kernelsrcdir}/scripts/*
1518%exclude %{_kernelsrcdir}/scripts/Kbuild.include
1519%exclude %{_kernelsrcdir}/scripts/Makefile*
1520%exclude %{_kernelsrcdir}/scripts/basic
1521%exclude %{_kernelsrcdir}/scripts/kconfig
960d2e94 1522%exclude %{_kernelsrcdir}/scripts/mkcompile_h
351f379b
JR
1523%exclude %{_kernelsrcdir}/scripts/mkmakefile
1524%exclude %{_kernelsrcdir}/scripts/mod
960d2e94 1525%exclude %{_kernelsrcdir}/scripts/module-common.lds
351f379b
JR
1526%exclude %{_kernelsrcdir}/scripts/setlocalversion
1527%exclude %{_kernelsrcdir}/scripts/*.c
1528%exclude %{_kernelsrcdir}/scripts/*.sh
960d2e94 1529%exclude %dir %{_kernelsrcdir}/scripts/selinux
1530%exclude %{_kernelsrcdir}/scripts/selinux/Makefile
c78e408d
PZ
1531%exclude %dir %{_kernelsrcdir}/scripts/selinux/genheaders
1532%exclude %{_kernelsrcdir}/scripts/selinux/genheaders/Makefile
1533%exclude %{_kernelsrcdir}/scripts/selinux/genheaders/*.c
960d2e94 1534%exclude %dir %{_kernelsrcdir}/scripts/selinux/mdp
1535%exclude %{_kernelsrcdir}/scripts/selinux/mdp/Makefile
1536%exclude %{_kernelsrcdir}/scripts/selinux/mdp/*.c
351f379b
JR
1537%{_kernelsrcdir}/sound
1538%{_kernelsrcdir}/security
1539%exclude %{_kernelsrcdir}/security/selinux/include
94a92871 1540%{_kernelsrcdir}/tools/*
351f379b
JR
1541%{_kernelsrcdir}/usr
1542%{_kernelsrcdir}/COPYING
1543%{_kernelsrcdir}/CREDITS
1544%{_kernelsrcdir}/MAINTAINERS
1545%{_kernelsrcdir}/README
1546%{_kernelsrcdir}/REPORTING-BUGS
a5585a68 1547%endif
This page took 0.601659 seconds and 4 git commands to generate.