2 %bcond_without source # don't build kernel-source package
3 %bcond_without doc # don't build kernel-doc package
4 %bcond_with verbose # verbose build (V=1)
10 %define alt_kernel 3.10-vanilla
12 # kernel release (used in filesystem and eventually in uname -r)
13 # modules will be looked from /lib/modules/%{kernel_release}
14 # localversion is just that without version for "> localversion"
15 %define localversion %{rel}
16 %define kernel_release %{version}%{?alt_kernel:-%{alt_kernel}}-%{localversion}
18 Summary: The Linux kernel (the core of the Linux operating system)
19 Summary(de.UTF-8): Der Linux-Kernel (Kern des Linux-Betriebssystems)
20 Summary(et.UTF-8): Linuxi kernel (ehk operatsioonisüsteemi tuum)
21 Summary(fr.UTF-8): Le Kernel-Linux (La partie centrale du systeme)
22 Summary(pl.UTF-8): Jądro Linuksa
23 Name: kernel%{_alt_kernel}
24 Version: %{basever}.%{postver}
29 Source0: http://www.kernel.org/pub/linux/kernel/v3.x/linux-%{basever}.tar.xz
30 # Source0-md5: 4f25cd5bec5f8d5a7d935b3f2ccb8481
31 %if "%{postver}" != "0"
32 Source1: http://www.kernel.org/pub/linux/kernel/v3.x/patch-%{version}.bz2
33 # Source1-md5: 971e2fd4ef7dac62daff8943ddc2e140
36 Source2: kernel.sysconfig
37 Source3: kernel-module-build.pl
40 Source10: kernel-vanilla-x86.config
41 Source11: kernel-vanilla-x86_64.config
43 URL: http://www.kernel.org/
44 BuildRequires: binutils >= 3:2.18
45 BuildRequires: /sbin/depmod
46 BuildRequires: gcc >= 5:3.2
47 BuildRequires: xz >= 1:4.999.7
49 BuildRequires: hostname
51 BuildRequires: perl-base
52 BuildRequires: rpm-build >= 4.5-24
53 BuildRequires: rpmbuild(macros) >= 1.652
54 Requires(post): coreutils
55 Requires(post): geninitrd >= 12639-1
56 Requires(post): kmod >= 12-2
57 Requires: /sbin/depmod
59 Requires: geninitrd >= 12639-1
60 Requires: kmod >= 12-2
62 Requires: cpuinfo(pae)
67 Suggests: linux-firmware
68 Provides: %{name}(netfilter) = 20070806
69 Provides: %{name}(vermagic) = %{kernel_release}
70 Obsoletes: kernel%{_alt_kernel}-char-lirc-ene0100
71 Obsoletes: kernel%{_alt_kernel}-char-lirc-it87
72 Obsoletes: kernel%{_alt_kernel}-char-lirc-ite8709
73 Obsoletes: kernel%{_alt_kernel}-char-lirc-mceusb
74 Obsoletes: kernel%{_alt_kernel}-char-lirc-streamzap
75 Obsoletes: kernel%{_alt_kernel}-isdn-mISDN
76 Obsoletes: kernel-firmware
77 Obsoletes: kernel-misc-acer_acpi
78 Obsoletes: kernel-misc-fuse
79 Obsoletes: kernel-misc-uvc
80 Obsoletes: kernel-modules
81 Obsoletes: kernel-net-ar81
82 Obsoletes: kernel-net-hostap
83 Obsoletes: kernel-net-ieee80211
84 Obsoletes: kernel-net-ipp2p
85 Obsoletes: kernel-net-rt61
87 Conflicts: e2fsprogs < 1.29
88 Conflicts: isdn4k-utils < 3.1pre1
89 Conflicts: jfsutils < 1.1.3
90 Conflicts: linux-firmware < 20120720
91 Conflicts: lvm2 < 2.02.40
92 Conflicts: module-init-tools < 3.16
93 Conflicts: nfs-utils < 1.0.5
94 Conflicts: oprofile < 0.9
95 Conflicts: ppp < 1:2.4.0
96 Conflicts: procps < 3.2.0
97 Conflicts: quota-tools < 3.09
98 Conflicts: reiserfsprogs < 3.6.3
99 Conflicts: rpm < 4.4.2-0.2
100 Conflicts: udev < 1:081
101 Conflicts: util-linux < 2.10o
102 Conflicts: xfsprogs < 2.6.0
103 ExclusiveArch: i686 x86_64
105 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
108 %define target_arch_dir x86
110 %define target_arch_dir %{_target_base_arch}
113 %define defconfig arch/%{target_arch_dir}/defconfig
115 # No ELF objects there to strip (skips processing 27k files)
116 %define _noautostrip \\(.*%{_kernelsrcdir}/.*\\|.*/vmlinux.*\\)
117 %define _noautochrpath .*%{_kernelsrcdir}/.*
118 %define _enable_debug_packages 0
120 %define initrd_dir /boot
122 %define topdir %{_builddir}/%{name}-%{version}
123 %define srcdir %{topdir}/linux-%{basever}
124 %define objdir %{topdir}/%{targetobj}
125 %define targetobj %{_target_base_arch}-gcc-%(%{kgcc} -dumpversion)
127 %define _kernelsrcdir /usr/src/linux%{_alt_kernel}-%{version}
129 %if "%{_target_base_arch}" != "%{_host_base_arch}"
130 %define CrossOpts ARCH=%{_target_base_arch} CROSS_COMPILE=%{_target_cpu}-tld-linux-
131 %define DepMod /bin/true
133 %if "%{_host_base_arch}" == "x86_64" && "%{_target_base_arch}" == "i386"
134 %define CrossOpts ARCH=%{_target_base_arch} CC="%{__cc}"
135 %define DepMod /sbin/depmod
139 %define CrossOpts ARCH=%{_target_base_arch} CC="%{__cc}"
140 %define DepMod /sbin/depmod
142 %define MakeOpts %{CrossOpts} HOSTCC="%{__cc}"
145 This package contains the Linux kernel that is used to boot and run
146 your system. It contains few device drivers for specific hardware.
147 Most hardware is instead supported by modules loaded after booting.
149 %description -l de.UTF-8
150 Das Kernel-Paket enthält den Linux-Kernel (vmlinuz), den Kern des
151 Linux-Betriebssystems. Der Kernel ist für grundliegende
152 Systemfunktionen verantwortlich: Speicherreservierung,
153 Prozeß-Management, Geräte Ein- und Ausgaben, usw.
155 %description -l fr.UTF-8
156 Le package kernel contient le kernel linux (vmlinuz), la partie
157 centrale d'un système d'exploitation Linux. Le noyau traite les
158 fonctions basiques d'un système d'exploitation: allocation mémoire,
159 allocation de process, entrée/sortie de peripheriques, etc.
161 %description -l pl.UTF-8
162 Pakiet zawiera jądro Linuksa niezbędne do prawidłowego działania
163 Twojego komputera. Zawiera w sobie sterowniki do sprzętu znajdującego
164 się w komputerze, takiego jak sterowniki dysków itp.
167 Summary: vmlinux - uncompressed kernel image
168 Summary(de.UTF-8): vmlinux - dekompressiertes Kernel Bild
169 Summary(pl.UTF-8): vmlinux - rozpakowany obraz jądra
171 Obsoletes: kernel-smp-vmlinux
174 vmlinux - uncompressed kernel image.
176 %description vmlinux -l de.UTF-8
177 vmlinux - dekompressiertes Kernel Bild.
179 %description vmlinux -l pl.UTF-8
180 vmlinux - rozpakowany obraz jądra.
183 Summary: DRM kernel modules
184 Summary(de.UTF-8): DRM Kernel Treiber
185 Summary(pl.UTF-8): Sterowniki DRM
187 Requires(postun): %{name} = %{epoch}:%{version}-%{release}
188 Requires: %{name} = %{epoch}:%{version}-%{release}
189 Obsoletes: kernel-smp-drm
195 %description drm -l de.UTF-8
198 %description drm -l pl.UTF-8
202 Summary: PCMCIA modules
203 Summary(de.UTF-8): PCMCIA Module
204 Summary(pl.UTF-8): Moduły PCMCIA
206 Requires(postun): %{name} = %{epoch}:%{version}-%{release}
207 Requires: %{name} = %{epoch}:%{version}-%{release}
208 Obsoletes: kernel-smp-pcmcia
209 Conflicts: pcmcia-cs < 3.1.21
210 Conflicts: pcmciautils < 004
216 %description pcmcia -l de.UTF-8
219 %description pcmcia -l pl.UTF-8
223 Summary: ALSA kernel modules
224 Summary(de.UTF-8): ALSA Kernel Module
225 Summary(pl.UTF-8): Sterowniki dźwięku ALSA
227 Requires(postun): %{name} = %{epoch}:%{version}-%{release}
228 Requires: %{name} = %{epoch}:%{version}-%{release}
229 Obsoletes: kernel-smp-sound-alsa
232 %description sound-alsa
233 ALSA (Advanced Linux Sound Architecture) sound drivers.
235 %description sound-alsa -l de.UTF-8
236 ALSA (Advanced Linux Sound Architecture) Sound-Treiber.
238 %description sound-alsa -l pl.UTF-8
239 Sterowniki dźwięku ALSA (Advanced Linux Sound Architecture).
242 Summary: OSS kernel modules
243 Summary(de.UTF-8): OSS Kernel Module
244 Summary(pl.UTF-8): Sterowniki dźwięku OSS
246 Requires(postun): %{name} = %{epoch}:%{version}-%{release}
247 Requires: %{name} = %{epoch}:%{version}-%{release}
248 Obsoletes: kernel-smp-sound-oss
251 %description sound-oss
252 OSS (Open Sound System) drivers.
254 %description sound-oss -l de.UTF-8
255 OSS (Open Sound System) Treiber.
257 %description sound-oss -l pl.UTF-8
258 Sterowniki dźwięku OSS (Open Sound System).
261 Summary: Header files for the Linux kernel
262 Summary(de.UTF-8): Header Dateien für den Linux-Kernel
263 Summary(pl.UTF-8): Pliki nagłówkowe jądra Linuksa
264 Group: Development/Building
265 Provides: %{name}-headers(netfilter) = 20070806
269 These are the C header files for the Linux kernel, which define
270 structures and constants that are needed when rebuilding the kernel or
271 building kernel modules.
273 %description headers -l de.UTF-8
274 Dies sind die C Header Dateien für den Linux-Kernel, die definierte
275 Strukturen und Konstante beinhalten, die beim rekompilieren des
276 Kernels oder bei Kernel Modul kompilationen gebraucht werden.
278 %description headers -l pl.UTF-8
279 Pakiet zawiera pliki nagłówkowe jądra, niezbędne do rekompilacji jądra
280 oraz budowania modułów jądra.
282 %package module-build
283 Summary: Development files for building kernel modules
284 Summary(de.UTF-8): Development Dateien die beim Kernel Modul kompilationen gebraucht werden
285 Summary(pl.UTF-8): Pliki służące do budowania modułów jądra
286 Group: Development/Building
287 Requires: %{name}-headers = %{epoch}:%{version}-%{release}
288 Conflicts: rpmbuild(macros) < 1.652
291 %description module-build
292 Development files from kernel source tree needed to build Linux kernel
293 modules from external packages.
295 %description module-build -l de.UTF-8
296 Development Dateien des Linux-Kernels die beim kompilieren externer
297 Kernel Module gebraucht werden.
299 %description module-build -l pl.UTF-8
300 Pliki ze drzewa źródeł jądra potrzebne do budowania modułów jądra
301 Linuksa z zewnętrznych pakietów.
304 Summary: Kernel source tree
305 Summary(de.UTF-8): Der Kernel Quelltext
306 Summary(pl.UTF-8): Kod źródłowy jądra Linuksa
307 Group: Development/Building
308 Requires: %{name}-module-build = %{epoch}:%{version}-%{release}
312 This is the source code for the Linux kernel. You can build a custom
313 kernel that is better tuned to your particular hardware.
315 %description source -l de.UTF-8
316 Das Kernel-Source-Paket enthält den source code (C/Assembler-Code) des
317 Linux-Kernels. Die Source-Dateien werden gebraucht, um viele
318 C-Programme zu kompilieren, da sie auf Konstanten zurückgreifen, die
319 im Kernel-Source definiert sind. Die Source-Dateien können auch
320 benutzt werden, um einen Kernel zu kompilieren, der besser auf Ihre
321 Hardware ausgerichtet ist.
323 %description source -l fr.UTF-8
324 Le package pour le kernel-source contient le code source pour le noyau
325 linux. Ces sources sont nécessaires pour compiler la plupart des
326 programmes C, car il dépend de constantes définies dans le code
327 source. Les sources peuvent être aussi utilisée pour compiler un noyau
328 personnalisé pour avoir de meilleures performances sur des matériels
331 %description source -l pl.UTF-8
332 Pakiet zawiera kod źródłowy jądra systemu.
335 Summary: Kernel documentation
336 Summary(de.UTF-8): Kernel Dokumentation
337 Summary(pl.UTF-8): Dokumentacja do jądra Linuksa
342 This is the documentation for the Linux kernel, as found in
343 /usr/src/linux/Documentation directory.
345 %description doc -l de.UTF-8
346 Dies ist die Kernel Dokumentation wie sie im 'Documentation'
347 Verzeichniss vorgefunden werden kann.
349 %description doc -l pl.UTF-8
350 Pakiet zawiera dokumentację do jądra Linuksa pochodzącą z katalogu
351 /usr/src/linux/Documentation.
355 ln -s %{SOURCE3} kernel-module-build.pl
356 ln -s %{SOURCE4} Makefile
359 %if "%{postver}" != "0"
360 %{__bzip2} -dc %{SOURCE1} | patch -p1 -s
363 # Fix EXTRAVERSION in main Makefile
364 sed -i 's#EXTRAVERSION =.*#EXTRAVERSION = %{?alt_kernel:-%{alt_kernel}}#g' Makefile
366 # cleanup backups after patching
367 find '(' -name '*~' -o -name '*.orig' -o -name '.gitignore' ')' -print0 | xargs -0 -r -l512 rm -f
371 cat > %{targetobj}.mk <<'EOF'
372 # generated by %{name}.spec
373 KERNELSRC := %{srcdir}
374 KERNELOUTPUT := %{objdir}
376 SRCARCH := %{target_arch_dir}
377 ARCH := %{_target_base_arch}
378 Q := %{!?with_verbose:@}
379 MAKE_OPTS := %{MakeOpts}
380 DEFCONFIG := %{defconfig}
384 install -d arch/%{target_arch_dir}
386 cat %{SOURCE10} > %{defconfig}
389 cat %{SOURCE11} > %{defconfig}
391 sed -i "s:CONFIG_LOCALVERSION=\"\":CONFIG_LOCALVERSION=\"-%{localversion}\":" %{defconfig}
393 ln -sf %{defconfig} .config
397 TARGETOBJ=%{targetobj} \
398 %{?with_verbose:V=1} \
403 TARGETOBJ=%{targetobj} \
404 %{?with_verbose:V=1} \
408 rm -rf $RPM_BUILD_ROOT
409 %{__make} %{MakeOpts} -j1 %{!?with_verbose:-s} modules_install firmware_install \
411 %{?with_verbose:V=1} \
413 INSTALL_MOD_PATH=$RPM_BUILD_ROOT \
414 INSTALL_FW_PATH=$RPM_BUILD_ROOT/lib/firmware/%{kernel_release} \
415 KERNELRELEASE=%{kernel_release}
417 install -d $RPM_BUILD_ROOT/lib/modules/%{kernel_release}/misc
419 # create directories which may be missing, to simplyfy %files
420 install -d $RPM_BUILD_ROOT/lib/modules/%{kernel_release}/kernel/{arch,sound,mm}
422 # rpm obeys filelinkto checks for ghosted symlinks, convert to files
423 rm -f $RPM_BUILD_ROOT/lib/modules/%{kernel_release}/{build,source}
424 touch $RPM_BUILD_ROOT/lib/modules/%{kernel_release}/{build,source}
426 # no point embed content for %ghost files. empty them
434 test -f $RPM_BUILD_ROOT/lib/modules/%{kernel_release}/modules.$a
435 > $RPM_BUILD_ROOT/lib/modules/%{kernel_release}/modules.$a
439 install -d $RPM_BUILD_ROOT/boot
440 cp -a %{objdir}/System.map $RPM_BUILD_ROOT/boot/System.map-%{kernel_release}
441 cp -aL %{objdir}/.config $RPM_BUILD_ROOT/boot/config-%{kernel_release}
442 cp -a %{objdir}/arch/%{target_arch_dir}/boot/bzImage $RPM_BUILD_ROOT/boot/vmlinuz-%{kernel_release}
443 install -p %{objdir}/vmlinux $RPM_BUILD_ROOT/boot/vmlinux-%{kernel_release}
446 touch $RPM_BUILD_ROOT%{initrd_dir}/initrd-%{kernel_release}.img
447 touch $RPM_BUILD_ROOT%{initrd_dir}/initramfs-%{kernel_release}.img
449 %if "%{_target_base_arch}" != "%{_host_base_arch}"
450 touch $RPM_BUILD_ROOT/lib/modules/%{kernel_release}/modules.dep
454 install -d $RPM_BUILD_ROOT%{_sysconfdir}/modprobe.d/%{kernel_release}
456 install -d $RPM_BUILD_ROOT/etc/sysconfig
457 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/kernel
460 install -d $RPM_BUILD_ROOT%{_kernelsrcdir}
462 # test if we can hardlink -- %{_builddir} and $RPM_BUILD_ROOT on same partition
463 if cp -al %{srcdir}/COPYING $RPM_BUILD_ROOT/COPYING 2>/dev/null; then
465 rm -f $RPM_BUILD_ROOT/COPYING
468 cp -a$l %{srcdir}/* $RPM_BUILD_ROOT%{_kernelsrcdir}
469 cp -a %{objdir}/Module.symvers $RPM_BUILD_ROOT%{_kernelsrcdir}
470 cp -aL %{objdir}/.config $RPM_BUILD_ROOT%{_kernelsrcdir}
471 cp -a %{objdir}/include $RPM_BUILD_ROOT%{_kernelsrcdir}
472 # copy arch/x86/include/generated
473 for dir in $(cd %{objdir} && find arch -name generated -type d); do
474 cp -a %{objdir}/$dir $RPM_BUILD_ROOT%{_kernelsrcdir}/$dir
475 find $RPM_BUILD_ROOT%{_kernelsrcdir}/$dir -name '.*.cmd' -exec rm "{}" ";"
478 # version.h location changed in 3.7, but a lot of external modules don't know about it
479 # add a compatibility symlink
480 ln -s ../generated/uapi/linux/version.h $RPM_BUILD_ROOT%{_kernelsrcdir}/include/linux/version.h
482 # disable this here, causes a lot of build-time problems and our rpm-build disables it anyway
483 %{__sed} -i -e 's|\(CONSTIFY_PLUGIN.*:=.*\)|# \1|' $RPM_BUILD_ROOT%{_kernelsrcdir}/Makefile
485 # collect module-build files and directories
486 # Usage: kernel-module-build.pl $rpmdir $fileoutdir
488 cd $RPM_BUILD_ROOT%{_kernelsrcdir}
489 %{__perl} %{topdir}/kernel-module-build.pl %{_kernelsrcdir} $fileoutdir
492 for f in `find %{objdir}/scripts -type f -print | grep -v "/\.\|\.o$"` ; do
495 echo "%attr(755,root,root) %{_kernelsrcdir}/$ff" >>files.mb_include_modulebuild_and_dirs
497 echo "%{_kernelsrcdir}/$ff" >>files.mb_include_modulebuild_and_dirs
499 echo "%exclude %{_kernelsrcdir}/$ff" >>files.source_exclude_modulebuild_and_dirs
500 cp -a "$f" "$RPM_BUILD_ROOT%{_kernelsrcdir}/$ff"
504 # move to %{_docdir} so we wouldn't depend on any kernel package for dirs
505 install -d $RPM_BUILD_ROOT%{_docdir}
506 mv $RPM_BUILD_ROOT{%{_kernelsrcdir}/Documentation,%{_docdir}/%{name}-%{version}}
508 %{__rm} $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/dontdiff
509 %{__rm} $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/Makefile
510 %{__rm} $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/*/Makefile
511 %{__rm} $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/*/*/Makefile
513 %{__rm} -r $RPM_BUILD_ROOT%{_kernelsrcdir}/Documentation
517 rm -rf $RPM_BUILD_ROOT
520 if [ -x /sbin/new-kernel-pkg ]; then
521 /sbin/new-kernel-pkg --remove %{kernel_release}
525 %depmod %{kernel_release}
528 [ -f /etc/sysconfig/kernel ] && . /etc/sysconfig/kernel
529 if [[ "$USE_GENINITRD" != [Nn][Oo] ]]; then
530 # generate initrd after all dependant modules are installed
531 /sbin/geninitrd -f --initrdfs=initramfs %{initrd_dir}/initrd-%{kernel_release}.img %{kernel_release}
534 # if dracut is present then generate full-featured initramfs
535 if [[ "$USE_DRACUT" != [Nn][Oo] ]] && [ -x /sbin/dracut ]; then
536 /sbin/dracut --force --quiet /boot/initramfs-%{kernel_release}.img %{kernel_release}
539 # update boot loaders
540 [ -x /sbin/update-grub -a -f /etc/sysconfig/grub ] && . /etc/sysconfig/grub
541 if [[ "$UPDATE_GRUB" != [Nn][Oo] ]]; then
544 if [ -x /sbin/new-kernel-pkg ]; then
545 /sbin/new-kernel-pkg --initrdfile=%{initrd_dir}/initrd-%{kernel_release}.img --install %{kernel_release} --banner "TLD Linux%{?alt_kernel: %{alt_kernel}}"
547 if [ -x /sbin/rc-boot ]; then
548 /sbin/rc-boot 1>&2 || :
552 %depmod %{kernel_release}
555 %depmod %{kernel_release}
558 %depmod %{kernel_release}
561 %depmod %{kernel_release}
564 %depmod %{kernel_release}
567 %depmod %{kernel_release}
570 %depmod %{kernel_release}
573 %depmod %{kernel_release}
576 ln -snf %{basename:%{_kernelsrcdir}} %{_prefix}/src/linux%{_alt_kernel}
579 if [ "$1" = "0" ]; then
580 if [ -L %{_prefix}/src/linux%{_alt_kernel} ]; then
581 if [ "$(readlink %{_prefix}/src/linux%{_alt_kernel})" = "linux%{_alt_kernel}-%{version}" ]; then
582 rm -f %{_prefix}/src/linux%{_alt_kernel}
587 %triggerin module-build -- %{name} = %{epoch}:%{version}-%{release}
588 ln -sfn %{_kernelsrcdir} /lib/modules/%{kernel_release}/build
589 ln -sfn %{_kernelsrcdir} /lib/modules/%{kernel_release}/source
591 %triggerun module-build -- %{name} = %{epoch}:%{version}-%{release}
592 if [ "$1" = 0 ]; then
593 rm -f /lib/modules/%{kernel_release}/{build,source}
597 %defattr(644,root,root,755)
598 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/kernel
599 /boot/vmlinuz-%{kernel_release}
600 /boot/System.map-%{kernel_release}
601 /boot/config-%{kernel_release}
602 %ghost %{initrd_dir}/initrd-%{kernel_release}.img
603 %ghost %{initrd_dir}/initramfs-%{kernel_release}.img
604 /lib/firmware/%{kernel_release}
606 %dir /lib/modules/%{kernel_release}
607 %dir /lib/modules/%{kernel_release}/kernel
608 /lib/modules/%{kernel_release}/kernel/arch
609 /lib/modules/%{kernel_release}/kernel/crypto
610 /lib/modules/%{kernel_release}/kernel/drivers
611 %exclude /lib/modules/%{kernel_release}/kernel/drivers/gpu
612 /lib/modules/%{kernel_release}/kernel/fs
613 /lib/modules/%{kernel_release}/kernel/kernel
614 /lib/modules/%{kernel_release}/kernel/lib
615 /lib/modules/%{kernel_release}/kernel/net
616 /lib/modules/%{kernel_release}/kernel/mm
617 %dir /lib/modules/%{kernel_release}/kernel/sound
618 /lib/modules/%{kernel_release}/kernel/sound/ac97_bus.ko*
619 /lib/modules/%{kernel_release}/kernel/sound/sound*.ko*
620 %exclude /lib/modules/%{kernel_release}/kernel/drivers/media/pci/cx88/cx88-alsa.ko*
621 %exclude /lib/modules/%{kernel_release}/kernel/drivers/media/usb/em28xx/em28xx-alsa.ko*
622 %exclude /lib/modules/%{kernel_release}/kernel/drivers/media/pci/saa7134/saa7134-alsa.ko*
623 %dir /lib/modules/%{kernel_release}/misc
624 %exclude /lib/modules/%{kernel_release}/kernel/drivers/pcmcia/[!p]*
625 %exclude /lib/modules/%{kernel_release}/kernel/drivers/pcmcia/pd6729.ko*
626 %exclude /lib/modules/%{kernel_release}/kernel/drivers/*/pcmcia
627 %exclude /lib/modules/%{kernel_release}/kernel/drivers/ata/pata_pcmcia.ko*
628 %exclude /lib/modules/%{kernel_release}/kernel/drivers/bluetooth/*_cs.ko*
629 %exclude /lib/modules/%{kernel_release}/kernel/drivers/isdn/hardware/avm/avm_cs.ko*
630 %exclude /lib/modules/%{kernel_release}/kernel/drivers/isdn/hardware/avm/b1pcmcia.ko*
631 %exclude /lib/modules/%{kernel_release}/kernel/drivers/usb/gadget/g_midi.ko*
632 %exclude /lib/modules/%{kernel_release}/kernel/drivers/ide/ide-cs.ko*
633 %exclude /lib/modules/%{kernel_release}/kernel/drivers/net/wireless/*_cs.ko*
634 %exclude /lib/modules/%{kernel_release}/kernel/drivers/net/wireless/b43
635 %exclude /lib/modules/%{kernel_release}/kernel/drivers/net/wireless/hostap/hostap_cs.ko*
636 %exclude /lib/modules/%{kernel_release}/kernel/drivers/net/wireless/libertas/*_cs.ko*
637 %exclude /lib/modules/%{kernel_release}/kernel/drivers/parport/parport_cs.ko*
638 %exclude /lib/modules/%{kernel_release}/kernel/drivers/tty/serial/8250/serial_cs.ko*
639 %exclude /lib/modules/%{kernel_release}/kernel/drivers/usb/host/sl811_cs.ko*
640 /lib/modules/%{kernel_release}/kernel/security
642 %dir %{_sysconfdir}/modprobe.d/%{kernel_release}
645 /lib/modules/%{kernel_release}/modules.order
646 /lib/modules/%{kernel_release}/modules.builtin*
648 # rest modules.* are ghost (regenerated by post depmod -a invocation)
649 %ghost /lib/modules/%{kernel_release}/modules.alias
650 %ghost /lib/modules/%{kernel_release}/modules.alias.bin
651 %ghost /lib/modules/%{kernel_release}/modules.dep
652 %ghost /lib/modules/%{kernel_release}/modules.dep.bin
653 %ghost /lib/modules/%{kernel_release}/modules.devname
654 %ghost /lib/modules/%{kernel_release}/modules.softdep
655 %ghost /lib/modules/%{kernel_release}/modules.symbols
656 %ghost /lib/modules/%{kernel_release}/modules.symbols.bin
658 # symlinks pointing to kernelsrcdir
659 %ghost /lib/modules/%{kernel_release}/build
660 %ghost /lib/modules/%{kernel_release}/source
663 %defattr(644,root,root,755)
664 /boot/vmlinux-%{kernel_release}
667 %defattr(644,root,root,755)
668 /lib/modules/%{kernel_release}/kernel/drivers/gpu
671 %defattr(644,root,root,755)
672 /lib/modules/%{kernel_release}/kernel/drivers/pcmcia/*ko*
673 /lib/modules/%{kernel_release}/kernel/drivers/*/pcmcia
674 %exclude /lib/modules/%{kernel_release}/kernel/drivers/pcmcia/pcmcia*ko*
675 /lib/modules/%{kernel_release}/kernel/drivers/bluetooth/*_cs.ko*
676 /lib/modules/%{kernel_release}/kernel/drivers/isdn/hardware/avm/avm_cs.ko*
677 /lib/modules/%{kernel_release}/kernel/drivers/isdn/hardware/avm/b1pcmcia.ko*
678 /lib/modules/%{kernel_release}/kernel/drivers/ata/pata_pcmcia.ko*
679 /lib/modules/%{kernel_release}/kernel/drivers/ide/ide-cs.ko*
680 /lib/modules/%{kernel_release}/kernel/drivers/net/wireless/*_cs.ko*
681 /lib/modules/%{kernel_release}/kernel/drivers/net/wireless/b43
682 /lib/modules/%{kernel_release}/kernel/drivers/net/wireless/hostap/hostap_cs.ko*
683 /lib/modules/%{kernel_release}/kernel/drivers/net/wireless/libertas/*_cs.ko*
684 /lib/modules/%{kernel_release}/kernel/drivers/parport/parport_cs.ko*
685 /lib/modules/%{kernel_release}/kernel/drivers/tty/serial/8250/serial_cs.ko*
686 /lib/modules/%{kernel_release}/kernel/drivers/usb/host/sl811_cs.ko*
689 %defattr(644,root,root,755)
690 /lib/modules/%{kernel_release}/kernel/sound
691 %exclude %dir /lib/modules/%{kernel_release}/kernel/sound
692 %exclude /lib/modules/%{kernel_release}/kernel/sound/ac97_bus.ko*
693 %exclude /lib/modules/%{kernel_release}/kernel/sound/sound*.ko*
694 %exclude /lib/modules/%{kernel_release}/kernel/sound/oss
695 /lib/modules/%{kernel_release}/kernel/drivers/usb/gadget/g_midi.ko*
696 /lib/modules/%{kernel_release}/kernel/drivers/media/pci/cx88/cx88-alsa.ko*
697 /lib/modules/%{kernel_release}/kernel/drivers/media/usb/em28xx/em28xx-alsa.ko*
698 /lib/modules/%{kernel_release}/kernel/drivers/media/pci/saa7134/saa7134-alsa.ko*
701 %defattr(644,root,root,755)
702 /lib/modules/%{kernel_release}/kernel/sound/oss
704 %files headers -f files.headers_exclude_kbuild
705 %defattr(644,root,root,755)
706 %dir %{_kernelsrcdir}
707 %{_kernelsrcdir}/include
708 %dir %{_kernelsrcdir}/arch
709 %dir %{_kernelsrcdir}/arch/[!K]*
710 %{_kernelsrcdir}/arch/*/include
711 %dir %{_kernelsrcdir}/security
712 %dir %{_kernelsrcdir}/security/selinux
713 %{_kernelsrcdir}/security/selinux/include
714 %{_kernelsrcdir}/.config
715 %{_kernelsrcdir}/Module.symvers
717 %files module-build -f files.mb_include_modulebuild_and_dirs
718 %defattr(644,root,root,755)
719 %exclude %dir %{_kernelsrcdir}/arch/um
720 %{_kernelsrcdir}/arch/*/kernel/asm-offsets*
721 %{_kernelsrcdir}/arch/*/kernel/sigframe*.h
722 %{_kernelsrcdir}/drivers/lguest/lg.h
723 %{_kernelsrcdir}/drivers/media/pci/bt8xx/bttv.h
724 %{_kernelsrcdir}/kernel/bounds.c
725 %{_kernelsrcdir}/scripts/basic/*.c
726 %attr(755,root,root) %{_kernelsrcdir}/scripts/kconfig/*.sh
727 %{_kernelsrcdir}/scripts/kconfig/*.in
728 %{_kernelsrcdir}/scripts/kconfig/*_shipped
729 %{_kernelsrcdir}/scripts/kconfig/*.pl
730 %{_kernelsrcdir}/scripts/kconfig/*.glade
731 %{_kernelsrcdir}/scripts/kconfig/*.gperf
732 %{_kernelsrcdir}/scripts/kconfig/*.cc
733 %{_kernelsrcdir}/scripts/kconfig/*.y
734 %{_kernelsrcdir}/scripts/kconfig/*.l
735 %{_kernelsrcdir}/scripts/kconfig/[c-k]*.c
736 %{_kernelsrcdir}/scripts/kconfig/[c-k]*.h
737 %{_kernelsrcdir}/scripts/kconfig/l*.h
738 %{_kernelsrcdir}/scripts/kconfig/[m-u]*.c
739 %{_kernelsrcdir}/scripts/kconfig/[m-u]*.h
740 %{_kernelsrcdir}/scripts/kconfig/lxdialog
741 %{_kernelsrcdir}/scripts/mod/*.c
742 %{_kernelsrcdir}/scripts/mod/[^e]*.h
743 %attr(755,root,root) %{_kernelsrcdir}/scripts/mkcompile_h
744 %{_kernelsrcdir}/scripts/mkmakefile
745 %{_kernelsrcdir}/scripts/module-common.lds
746 %attr(755,root,root) %{_kernelsrcdir}/scripts/setlocalversion
747 %{_kernelsrcdir}/scripts/*.c
748 %attr(755,root,root) %{_kernelsrcdir}/scripts/*.sh
749 %{_kernelsrcdir}/scripts/selinux/genheaders/*.c
750 %{_kernelsrcdir}/scripts/selinux/mdp/*.c
751 %exclude %dir %{_kernelsrcdir}/security
752 %exclude %dir %{_kernelsrcdir}/security/selinux
756 %defattr(644,root,root,755)
757 %dir %{_docdir}/%{name}-%{version}
759 %{_docdir}/%{name}-%{version}/[!jkz]*
760 %{_docdir}/%{name}-%{version}/[jkz]*.txt
761 %{_docdir}/%{name}-%{version}/kbuild
762 %{_docdir}/%{name}-%{version}/kdump
763 %lang(ja) %{_docdir}/%{name}-%{version}/ja_JP
764 %lang(ko) %{_docdir}/%{name}-%{version}/ko_KR
765 %lang(zh_CN) %{_docdir}/%{name}-%{version}/zh_CN
769 %files source -f files.source_exclude_modulebuild_and_dirs
770 %defattr(644,root,root,755)
771 %{_kernelsrcdir}/arch/*/[!Mik]*
772 %{_kernelsrcdir}/arch/*/kernel/[!M]*
773 %{_kernelsrcdir}/arch/ia64/install.sh
774 %{_kernelsrcdir}/arch/m68k/ifpsp060/[!M]*
775 %{_kernelsrcdir}/arch/m68k/ifpsp060/MISC
776 %{_kernelsrcdir}/arch/m68k/install.sh
777 %{_kernelsrcdir}/arch/parisc/install.sh
778 %{_kernelsrcdir}/arch/x86/ia32/[!M]*
779 %{_kernelsrcdir}/arch/arm/kvm
780 %{_kernelsrcdir}/arch/ia64/kvm
781 %{_kernelsrcdir}/arch/mips/kvm
782 %{_kernelsrcdir}/arch/powerpc/kvm
783 %{_kernelsrcdir}/arch/s390/kvm
784 %{_kernelsrcdir}/arch/x86/kvm
785 %exclude %{_kernelsrcdir}/arch/*/kernel/asm-offsets*
786 %exclude %{_kernelsrcdir}/arch/*/kernel/sigframe*.h
787 %exclude %{_kernelsrcdir}/drivers/lguest/lg.h
788 %exclude %{_kernelsrcdir}/drivers/media/pci/bt8xx/bttv.h
789 %{_kernelsrcdir}/block
790 %{_kernelsrcdir}/crypto
791 %{_kernelsrcdir}/drivers
792 %{_kernelsrcdir}/firmware
794 %{_kernelsrcdir}/init
796 %{_kernelsrcdir}/kernel
797 %exclude %{_kernelsrcdir}/kernel/bounds.c
801 %{_kernelsrcdir}/virt
802 %{_kernelsrcdir}/samples
803 %{_kernelsrcdir}/scripts/*
804 %exclude %{_kernelsrcdir}/scripts/Kbuild.include
805 %exclude %{_kernelsrcdir}/scripts/Makefile*
806 %exclude %{_kernelsrcdir}/scripts/basic
807 %exclude %{_kernelsrcdir}/scripts/kconfig
808 %exclude %{_kernelsrcdir}/scripts/mkcompile_h
809 %exclude %{_kernelsrcdir}/scripts/mkmakefile
810 %exclude %{_kernelsrcdir}/scripts/mod
811 %exclude %{_kernelsrcdir}/scripts/module-common.lds
812 %exclude %{_kernelsrcdir}/scripts/setlocalversion
813 %exclude %{_kernelsrcdir}/scripts/*.c
814 %exclude %{_kernelsrcdir}/scripts/*.sh
815 %exclude %dir %{_kernelsrcdir}/scripts/selinux
816 %exclude %{_kernelsrcdir}/scripts/selinux/Makefile
817 %exclude %dir %{_kernelsrcdir}/scripts/selinux/genheaders
818 %exclude %{_kernelsrcdir}/scripts/selinux/genheaders/Makefile
819 %exclude %{_kernelsrcdir}/scripts/selinux/genheaders/*.c
820 %exclude %dir %{_kernelsrcdir}/scripts/selinux/mdp
821 %exclude %{_kernelsrcdir}/scripts/selinux/mdp/Makefile
822 %exclude %{_kernelsrcdir}/scripts/selinux/mdp/*.c
823 %{_kernelsrcdir}/sound
824 %{_kernelsrcdir}/security
825 %exclude %{_kernelsrcdir}/security/selinux/include
826 %{_kernelsrcdir}/tools/*
828 %{_kernelsrcdir}/COPYING
829 %{_kernelsrcdir}/CREDITS
830 %{_kernelsrcdir}/MAINTAINERS
831 %{_kernelsrcdir}/README
832 %{_kernelsrcdir}/REPORTING-BUGS