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}.xz
33 # Source1-md5: aa652fb1c0da330e4e200877a9bc9d22
36 Source2: kernel-module-build.pl
39 Source10: kernel-vanilla-x86.config
40 Source11: kernel-vanilla-x86_64.config
42 URL: http://www.kernel.org/
43 BuildRequires: binutils >= 3:2.18
44 BuildRequires: /sbin/depmod
45 BuildRequires: gcc >= 5:3.2
46 BuildRequires: xz >= 1:4.999.7
48 BuildRequires: hostname
50 BuildRequires: perl-base
51 BuildRequires: rpm >= 4.5-74
52 BuildRequires: rpmbuild(macros) >= 1.652
53 Requires(post): coreutils
54 Requires(post): dracut
55 Requires(post): kmod >= 12-2
56 Requires: /sbin/depmod
59 Requires: kmod >= 12-2
61 Requires: cpuinfo(pae)
65 Suggests: linux-firmware
66 Provides: %{name}(netfilter) = 20070806
67 Provides: %{name}(vermagic) = %{kernel_release}
68 Obsoletes: kernel%{_alt_kernel}-char-lirc-ene0100
69 Obsoletes: kernel%{_alt_kernel}-char-lirc-it87
70 Obsoletes: kernel%{_alt_kernel}-char-lirc-ite8709
71 Obsoletes: kernel%{_alt_kernel}-char-lirc-mceusb
72 Obsoletes: kernel%{_alt_kernel}-char-lirc-streamzap
73 Obsoletes: kernel%{_alt_kernel}-isdn-mISDN
74 Obsoletes: kernel-firmware
75 Obsoletes: kernel-misc-acer_acpi
76 Obsoletes: kernel-misc-fuse
77 Obsoletes: kernel-misc-uvc
78 Obsoletes: kernel-modules
79 Obsoletes: kernel-net-ar81
80 Obsoletes: kernel-net-hostap
81 Obsoletes: kernel-net-ieee80211
82 Obsoletes: kernel-net-ipp2p
83 Obsoletes: kernel-net-rt61
85 Conflicts: e2fsprogs < 1.29
86 Conflicts: isdn4k-utils < 3.1pre1
87 Conflicts: jfsutils < 1.1.3
88 Conflicts: linux-firmware < 20120720
89 Conflicts: lvm2 < 2.02.40
90 Conflicts: module-init-tools < 3.16
91 Conflicts: nfs-utils < 1.0.5
92 Conflicts: oprofile < 0.9
93 Conflicts: ppp < 1:2.4.0
94 Conflicts: procps < 3.2.0
95 Conflicts: quota-tools < 3.09
96 Conflicts: reiserfsprogs < 3.6.3
97 Conflicts: rpm < 4.4.2-0.2
98 Conflicts: udev < 1:081
99 Conflicts: util-linux < 2.10o
100 Conflicts: xfsprogs < 2.6.0
101 ExclusiveArch: i686 x86_64
103 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
106 %define target_arch_dir x86
108 %define target_arch_dir %{_target_base_arch}
111 %define defconfig arch/%{target_arch_dir}/defconfig
113 # No ELF objects there to strip (skips processing 27k files)
114 %define _noautostrip \\(.*%{_kernelsrcdir}/.*\\|.*/vmlinux.*\\)
115 %define _noautochrpath .*%{_kernelsrcdir}/.*
116 %define _enable_debug_packages 0
118 %define initrd_dir /boot
120 %define topdir %{_builddir}/%{name}-%{version}
121 %define srcdir %{topdir}/linux-%{basever}
122 %define objdir %{topdir}/%{targetobj}
123 %define targetobj %{_target_base_arch}-gcc-%(%{kgcc} -dumpversion)
125 %define _kernelsrcdir /usr/src/linux%{_alt_kernel}-%{version}
127 %if "%{_target_base_arch}" != "%{_host_base_arch}"
128 %define CrossOpts ARCH=%{_target_base_arch} CROSS_COMPILE=%{_target_cpu}-tld-linux-
129 %define DepMod /bin/true
131 %if "%{_host_base_arch}" == "x86_64" && "%{_target_base_arch}" == "i386"
132 %define CrossOpts ARCH=%{_target_base_arch} CC="%{__cc}"
133 %define DepMod /sbin/depmod
137 %define CrossOpts ARCH=%{_target_base_arch} CC="%{__cc}"
138 %define DepMod /sbin/depmod
140 %define MakeOpts %{CrossOpts} HOSTCC="%{__cc}"
143 This package contains the Linux kernel that is used to boot and run
144 your system. It contains few device drivers for specific hardware.
145 Most hardware is instead supported by modules loaded after booting.
147 %description -l de.UTF-8
148 Das Kernel-Paket enthält den Linux-Kernel (vmlinuz), den Kern des
149 Linux-Betriebssystems. Der Kernel ist für grundliegende
150 Systemfunktionen verantwortlich: Speicherreservierung,
151 Prozeß-Management, Geräte Ein- und Ausgaben, usw.
153 %description -l fr.UTF-8
154 Le package kernel contient le kernel linux (vmlinuz), la partie
155 centrale d'un système d'exploitation Linux. Le noyau traite les
156 fonctions basiques d'un système d'exploitation: allocation mémoire,
157 allocation de process, entrée/sortie de peripheriques, etc.
159 %description -l pl.UTF-8
160 Pakiet zawiera jądro Linuksa niezbędne do prawidłowego działania
161 Twojego komputera. Zawiera w sobie sterowniki do sprzętu znajdującego
162 się w komputerze, takiego jak sterowniki dysków itp.
165 Summary: vmlinux - uncompressed kernel image
166 Summary(de.UTF-8): vmlinux - dekompressiertes Kernel Bild
167 Summary(pl.UTF-8): vmlinux - rozpakowany obraz jądra
169 Obsoletes: kernel-smp-vmlinux
172 vmlinux - uncompressed kernel image.
174 %description vmlinux -l de.UTF-8
175 vmlinux - dekompressiertes Kernel Bild.
177 %description vmlinux -l pl.UTF-8
178 vmlinux - rozpakowany obraz jądra.
181 Summary: DRM kernel modules
182 Summary(de.UTF-8): DRM Kernel Treiber
183 Summary(pl.UTF-8): Sterowniki DRM
185 Requires(postun): %{name} = %{epoch}:%{version}-%{release}
186 Requires: %{name} = %{epoch}:%{version}-%{release}
187 Obsoletes: kernel-smp-drm
193 %description drm -l de.UTF-8
196 %description drm -l pl.UTF-8
200 Summary: PCMCIA modules
201 Summary(de.UTF-8): PCMCIA Module
202 Summary(pl.UTF-8): Moduły PCMCIA
204 Requires(postun): %{name} = %{epoch}:%{version}-%{release}
205 Requires: %{name} = %{epoch}:%{version}-%{release}
206 Obsoletes: kernel-smp-pcmcia
207 Conflicts: pcmcia-cs < 3.1.21
208 Conflicts: pcmciautils < 004
214 %description pcmcia -l de.UTF-8
217 %description pcmcia -l pl.UTF-8
221 Summary: ALSA kernel modules
222 Summary(de.UTF-8): ALSA Kernel Module
223 Summary(pl.UTF-8): Sterowniki dźwięku ALSA
225 Requires(postun): %{name} = %{epoch}:%{version}-%{release}
226 Requires: %{name} = %{epoch}:%{version}-%{release}
227 Obsoletes: kernel-smp-sound-alsa
230 %description sound-alsa
231 ALSA (Advanced Linux Sound Architecture) sound drivers.
233 %description sound-alsa -l de.UTF-8
234 ALSA (Advanced Linux Sound Architecture) Sound-Treiber.
236 %description sound-alsa -l pl.UTF-8
237 Sterowniki dźwięku ALSA (Advanced Linux Sound Architecture).
240 Summary: OSS kernel modules
241 Summary(de.UTF-8): OSS Kernel Module
242 Summary(pl.UTF-8): Sterowniki dźwięku OSS
244 Requires(postun): %{name} = %{epoch}:%{version}-%{release}
245 Requires: %{name} = %{epoch}:%{version}-%{release}
246 Obsoletes: kernel-smp-sound-oss
249 %description sound-oss
250 OSS (Open Sound System) drivers.
252 %description sound-oss -l de.UTF-8
253 OSS (Open Sound System) Treiber.
255 %description sound-oss -l pl.UTF-8
256 Sterowniki dźwięku OSS (Open Sound System).
259 Summary: Header files for the Linux kernel
260 Summary(de.UTF-8): Header Dateien für den Linux-Kernel
261 Summary(pl.UTF-8): Pliki nagłówkowe jądra Linuksa
262 Group: Development/Building
263 Provides: %{name}-headers(netfilter) = 20070806
267 These are the C header files for the Linux kernel, which define
268 structures and constants that are needed when rebuilding the kernel or
269 building kernel modules.
271 %description headers -l de.UTF-8
272 Dies sind die C Header Dateien für den Linux-Kernel, die definierte
273 Strukturen und Konstante beinhalten, die beim rekompilieren des
274 Kernels oder bei Kernel Modul kompilationen gebraucht werden.
276 %description headers -l pl.UTF-8
277 Pakiet zawiera pliki nagłówkowe jądra, niezbędne do rekompilacji jądra
278 oraz budowania modułów jądra.
280 %package module-build
281 Summary: Development files for building kernel modules
282 Summary(de.UTF-8): Development Dateien die beim Kernel Modul kompilationen gebraucht werden
283 Summary(pl.UTF-8): Pliki służące do budowania modułów jądra
284 Group: Development/Building
285 Requires: %{name}-headers = %{epoch}:%{version}-%{release}
286 Conflicts: rpmbuild(macros) < 1.652
289 %description module-build
290 Development files from kernel source tree needed to build Linux kernel
291 modules from external packages.
293 %description module-build -l de.UTF-8
294 Development Dateien des Linux-Kernels die beim kompilieren externer
295 Kernel Module gebraucht werden.
297 %description module-build -l pl.UTF-8
298 Pliki ze drzewa źródeł jądra potrzebne do budowania modułów jądra
299 Linuksa z zewnętrznych pakietów.
302 Summary: Kernel source tree
303 Summary(de.UTF-8): Der Kernel Quelltext
304 Summary(pl.UTF-8): Kod źródłowy jądra Linuksa
305 Group: Development/Building
306 Requires: %{name}-module-build = %{epoch}:%{version}-%{release}
310 This is the source code for the Linux kernel. You can build a custom
311 kernel that is better tuned to your particular hardware.
313 %description source -l de.UTF-8
314 Das Kernel-Source-Paket enthält den source code (C/Assembler-Code) des
315 Linux-Kernels. Die Source-Dateien werden gebraucht, um viele
316 C-Programme zu kompilieren, da sie auf Konstanten zurückgreifen, die
317 im Kernel-Source definiert sind. Die Source-Dateien können auch
318 benutzt werden, um einen Kernel zu kompilieren, der besser auf Ihre
319 Hardware ausgerichtet ist.
321 %description source -l fr.UTF-8
322 Le package pour le kernel-source contient le code source pour le noyau
323 linux. Ces sources sont nécessaires pour compiler la plupart des
324 programmes C, car il dépend de constantes définies dans le code
325 source. Les sources peuvent être aussi utilisée pour compiler un noyau
326 personnalisé pour avoir de meilleures performances sur des matériels
329 %description source -l pl.UTF-8
330 Pakiet zawiera kod źródłowy jądra systemu.
333 Summary: Kernel documentation
334 Summary(de.UTF-8): Kernel Dokumentation
335 Summary(pl.UTF-8): Dokumentacja do jądra Linuksa
340 This is the documentation for the Linux kernel, as found in
341 /usr/src/linux/Documentation directory.
343 %description doc -l de.UTF-8
344 Dies ist die Kernel Dokumentation wie sie im 'Documentation'
345 Verzeichniss vorgefunden werden kann.
347 %description doc -l pl.UTF-8
348 Pakiet zawiera dokumentację do jądra Linuksa pochodzącą z katalogu
349 /usr/src/linux/Documentation.
353 ln -s %{SOURCE2} kernel-module-build.pl
354 ln -s %{SOURCE3} Makefile
357 %if "%{postver}" != "0"
358 %{__xz} -dc %{SOURCE1} | patch -p1 -s
361 # Fix EXTRAVERSION in main Makefile
362 sed -i 's#EXTRAVERSION =.*#EXTRAVERSION = %{?alt_kernel:-%{alt_kernel}}#g' Makefile
364 # cleanup backups after patching
365 find '(' -name '*~' -o -name '*.orig' -o -name '.gitignore' ')' -print0 | xargs -0 -r -l512 rm -f
369 cat > %{targetobj}.mk <<'EOF'
370 # generated by %{name}.spec
371 KERNELSRC := %{srcdir}
372 KERNELOUTPUT := %{objdir}
374 SRCARCH := %{target_arch_dir}
375 ARCH := %{_target_base_arch}
376 Q := %{!?with_verbose:@}
377 MAKE_OPTS := %{MakeOpts}
378 DEFCONFIG := %{defconfig}
382 install -d arch/%{target_arch_dir}
384 cat %{SOURCE10} > %{defconfig}
387 cat %{SOURCE11} > %{defconfig}
389 sed -i "s:CONFIG_LOCALVERSION=\"\":CONFIG_LOCALVERSION=\"-%{localversion}\":" %{defconfig}
391 ln -sf %{defconfig} .config
395 TARGETOBJ=%{targetobj} \
396 %{?with_verbose:V=1} \
401 TARGETOBJ=%{targetobj} \
402 %{?with_verbose:V=1} \
406 rm -rf $RPM_BUILD_ROOT
407 %{__make} %{MakeOpts} -j1 %{!?with_verbose:-s} modules_install firmware_install \
409 %{?with_verbose:V=1} \
411 INSTALL_MOD_PATH=$RPM_BUILD_ROOT \
412 INSTALL_FW_PATH=$RPM_BUILD_ROOT/lib/firmware/%{kernel_release} \
413 KERNELRELEASE=%{kernel_release}
415 install -d $RPM_BUILD_ROOT/lib/modules/%{kernel_release}/misc
417 # create directories which may be missing, to simplyfy %files
418 install -d $RPM_BUILD_ROOT/lib/modules/%{kernel_release}/kernel/{arch,sound,mm}
420 # rpm obeys filelinkto checks for ghosted symlinks, convert to files
421 rm -f $RPM_BUILD_ROOT/lib/modules/%{kernel_release}/{build,source}
422 touch $RPM_BUILD_ROOT/lib/modules/%{kernel_release}/{build,source}
424 # no point embed content for %ghost files. empty them
432 test -f $RPM_BUILD_ROOT/lib/modules/%{kernel_release}/modules.$a
433 > $RPM_BUILD_ROOT/lib/modules/%{kernel_release}/modules.$a
437 install -d $RPM_BUILD_ROOT/boot
438 cp -a %{objdir}/System.map $RPM_BUILD_ROOT/boot/System.map-%{kernel_release}
439 cp -aL %{objdir}/.config $RPM_BUILD_ROOT/boot/config-%{kernel_release}
440 cp -a %{objdir}/arch/%{target_arch_dir}/boot/bzImage $RPM_BUILD_ROOT/boot/vmlinuz-%{kernel_release}
441 install -p %{objdir}/vmlinux $RPM_BUILD_ROOT/boot/vmlinux-%{kernel_release}
444 touch $RPM_BUILD_ROOT%{initrd_dir}/initramfs-%{kernel_release}.img
446 %if "%{_target_base_arch}" != "%{_host_base_arch}"
447 touch $RPM_BUILD_ROOT/lib/modules/%{kernel_release}/modules.dep
451 install -d $RPM_BUILD_ROOT%{_sysconfdir}/modprobe.d/%{kernel_release}
454 install -d $RPM_BUILD_ROOT%{_kernelsrcdir}
456 # test if we can hardlink -- %{_builddir} and $RPM_BUILD_ROOT on same partition
457 if cp -al %{srcdir}/COPYING $RPM_BUILD_ROOT/COPYING 2>/dev/null; then
459 rm -f $RPM_BUILD_ROOT/COPYING
462 cp -a$l %{srcdir}/* $RPM_BUILD_ROOT%{_kernelsrcdir}
463 cp -a %{objdir}/Module.symvers $RPM_BUILD_ROOT%{_kernelsrcdir}
464 cp -aL %{objdir}/.config $RPM_BUILD_ROOT%{_kernelsrcdir}
465 cp -a %{objdir}/include $RPM_BUILD_ROOT%{_kernelsrcdir}
466 # copy arch/x86/include/generated
467 for dir in $(cd %{objdir} && find arch -name generated -type d); do
468 cp -a %{objdir}/$dir $RPM_BUILD_ROOT%{_kernelsrcdir}/$dir
469 find $RPM_BUILD_ROOT%{_kernelsrcdir}/$dir -name '.*.cmd' -exec rm "{}" ";"
472 # version.h location changed in 3.7, but a lot of external modules don't know about it
473 # add a compatibility symlink
474 ln -s ../generated/uapi/linux/version.h $RPM_BUILD_ROOT%{_kernelsrcdir}/include/linux/version.h
476 # disable this here, causes a lot of build-time problems and our rpm-build disables it anyway
477 %{__sed} -i -e 's|\(CONSTIFY_PLUGIN.*:=.*\)|# \1|' $RPM_BUILD_ROOT%{_kernelsrcdir}/Makefile
479 # collect module-build files and directories
480 # Usage: kernel-module-build.pl $rpmdir $fileoutdir
482 cd $RPM_BUILD_ROOT%{_kernelsrcdir}
483 %{__perl} %{topdir}/kernel-module-build.pl %{_kernelsrcdir} $fileoutdir
486 for f in `find %{objdir}/scripts -type f -print | grep -v "/\.\|\.o$"` ; do
489 echo "%attr(755,root,root) %{_kernelsrcdir}/$ff" >>files.mb_include_modulebuild_and_dirs
491 echo "%{_kernelsrcdir}/$ff" >>files.mb_include_modulebuild_and_dirs
493 echo "%exclude %{_kernelsrcdir}/$ff" >>files.source_exclude_modulebuild_and_dirs
494 cp -a "$f" "$RPM_BUILD_ROOT%{_kernelsrcdir}/$ff"
498 # move to %{_docdir} so we wouldn't depend on any kernel package for dirs
499 install -d $RPM_BUILD_ROOT%{_docdir}
500 mv $RPM_BUILD_ROOT{%{_kernelsrcdir}/Documentation,%{_docdir}/%{name}-%{version}}
502 %{__rm} $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/dontdiff
503 %{__rm} $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/Makefile
504 %{__rm} $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/*/Makefile
505 %{__rm} $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/*/*/Makefile
507 %{__rm} -r $RPM_BUILD_ROOT%{_kernelsrcdir}/Documentation
511 rm -rf $RPM_BUILD_ROOT
514 if [ -x /sbin/new-kernel-pkg ]; then
515 /sbin/new-kernel-pkg --remove %{kernel_release}
519 %depmod %{kernel_release}
523 if [ -x /sbin/dracut ]; then
524 /sbin/dracut --force --quiet /boot/initramfs-%{kernel_release}.img %{kernel_release}
527 if [ -x /sbin/update-grub -a -f /etc/sysconfig/grub ]; then
528 if [ "$(. /etc/sysconfig/grub; echo ${UPDATE_GRUB:-yes})" = "yes" ]; then
529 /sbin/update-grub >/dev/null
534 %depmod %{kernel_release}
537 %depmod %{kernel_release}
540 %depmod %{kernel_release}
543 %depmod %{kernel_release}
546 %depmod %{kernel_release}
549 %depmod %{kernel_release}
552 %depmod %{kernel_release}
555 %depmod %{kernel_release}
558 ln -snf %{basename:%{_kernelsrcdir}} %{_prefix}/src/linux%{_alt_kernel}
561 if [ "$1" = "0" ]; then
562 if [ -L %{_prefix}/src/linux%{_alt_kernel} ]; then
563 if [ "$(readlink %{_prefix}/src/linux%{_alt_kernel})" = "linux%{_alt_kernel}-%{version}" ]; then
564 rm -f %{_prefix}/src/linux%{_alt_kernel}
569 %triggerin module-build -- %{name} = %{epoch}:%{version}-%{release}
570 ln -sfn %{_kernelsrcdir} /lib/modules/%{kernel_release}/build
571 ln -sfn %{_kernelsrcdir} /lib/modules/%{kernel_release}/source
573 %triggerun module-build -- %{name} = %{epoch}:%{version}-%{release}
574 if [ "$1" = 0 ]; then
575 rm -f /lib/modules/%{kernel_release}/{build,source}
579 %defattr(644,root,root,755)
580 /boot/vmlinuz-%{kernel_release}
581 /boot/System.map-%{kernel_release}
582 /boot/config-%{kernel_release}
583 %ghost %{initrd_dir}/initramfs-%{kernel_release}.img
584 /lib/firmware/%{kernel_release}
586 %dir /lib/modules/%{kernel_release}
587 %dir /lib/modules/%{kernel_release}/kernel
588 /lib/modules/%{kernel_release}/kernel/arch
589 /lib/modules/%{kernel_release}/kernel/crypto
590 /lib/modules/%{kernel_release}/kernel/drivers
591 %exclude /lib/modules/%{kernel_release}/kernel/drivers/gpu
592 /lib/modules/%{kernel_release}/kernel/fs
593 /lib/modules/%{kernel_release}/kernel/kernel
594 /lib/modules/%{kernel_release}/kernel/lib
595 /lib/modules/%{kernel_release}/kernel/net
596 /lib/modules/%{kernel_release}/kernel/mm
597 %dir /lib/modules/%{kernel_release}/kernel/sound
598 /lib/modules/%{kernel_release}/kernel/sound/ac97_bus.ko*
599 /lib/modules/%{kernel_release}/kernel/sound/sound*.ko*
600 %exclude /lib/modules/%{kernel_release}/kernel/drivers/media/pci/cx88/cx88-alsa.ko*
601 %exclude /lib/modules/%{kernel_release}/kernel/drivers/media/usb/em28xx/em28xx-alsa.ko*
602 %exclude /lib/modules/%{kernel_release}/kernel/drivers/media/pci/saa7134/saa7134-alsa.ko*
603 %dir /lib/modules/%{kernel_release}/misc
604 %exclude /lib/modules/%{kernel_release}/kernel/drivers/pcmcia/[!p]*
605 %exclude /lib/modules/%{kernel_release}/kernel/drivers/pcmcia/pd6729.ko*
606 %exclude /lib/modules/%{kernel_release}/kernel/drivers/*/pcmcia
607 %exclude /lib/modules/%{kernel_release}/kernel/drivers/ata/pata_pcmcia.ko*
608 %exclude /lib/modules/%{kernel_release}/kernel/drivers/bluetooth/*_cs.ko*
609 %exclude /lib/modules/%{kernel_release}/kernel/drivers/isdn/hardware/avm/avm_cs.ko*
610 %exclude /lib/modules/%{kernel_release}/kernel/drivers/isdn/hardware/avm/b1pcmcia.ko*
611 %exclude /lib/modules/%{kernel_release}/kernel/drivers/usb/gadget/g_midi.ko*
612 %exclude /lib/modules/%{kernel_release}/kernel/drivers/ide/ide-cs.ko*
613 %exclude /lib/modules/%{kernel_release}/kernel/drivers/net/wireless/*_cs.ko*
614 %exclude /lib/modules/%{kernel_release}/kernel/drivers/net/wireless/b43
615 %exclude /lib/modules/%{kernel_release}/kernel/drivers/net/wireless/hostap/hostap_cs.ko*
616 %exclude /lib/modules/%{kernel_release}/kernel/drivers/net/wireless/libertas/*_cs.ko*
617 %exclude /lib/modules/%{kernel_release}/kernel/drivers/parport/parport_cs.ko*
618 %exclude /lib/modules/%{kernel_release}/kernel/drivers/tty/serial/8250/serial_cs.ko*
619 %exclude /lib/modules/%{kernel_release}/kernel/drivers/usb/host/sl811_cs.ko*
620 /lib/modules/%{kernel_release}/kernel/security
622 %dir %{_sysconfdir}/modprobe.d/%{kernel_release}
625 /lib/modules/%{kernel_release}/modules.order
626 /lib/modules/%{kernel_release}/modules.builtin*
628 # rest modules.* are ghost (regenerated by post depmod -a invocation)
629 %ghost /lib/modules/%{kernel_release}/modules.alias
630 %ghost /lib/modules/%{kernel_release}/modules.alias.bin
631 %ghost /lib/modules/%{kernel_release}/modules.dep
632 %ghost /lib/modules/%{kernel_release}/modules.dep.bin
633 %ghost /lib/modules/%{kernel_release}/modules.devname
634 %ghost /lib/modules/%{kernel_release}/modules.softdep
635 %ghost /lib/modules/%{kernel_release}/modules.symbols
636 %ghost /lib/modules/%{kernel_release}/modules.symbols.bin
638 # symlinks pointing to kernelsrcdir
639 %ghost /lib/modules/%{kernel_release}/build
640 %ghost /lib/modules/%{kernel_release}/source
643 %defattr(644,root,root,755)
644 /boot/vmlinux-%{kernel_release}
647 %defattr(644,root,root,755)
648 /lib/modules/%{kernel_release}/kernel/drivers/gpu
651 %defattr(644,root,root,755)
652 /lib/modules/%{kernel_release}/kernel/drivers/pcmcia/*ko*
653 /lib/modules/%{kernel_release}/kernel/drivers/*/pcmcia
654 %exclude /lib/modules/%{kernel_release}/kernel/drivers/pcmcia/pcmcia*ko*
655 /lib/modules/%{kernel_release}/kernel/drivers/bluetooth/*_cs.ko*
656 /lib/modules/%{kernel_release}/kernel/drivers/isdn/hardware/avm/avm_cs.ko*
657 /lib/modules/%{kernel_release}/kernel/drivers/isdn/hardware/avm/b1pcmcia.ko*
658 /lib/modules/%{kernel_release}/kernel/drivers/ata/pata_pcmcia.ko*
659 /lib/modules/%{kernel_release}/kernel/drivers/ide/ide-cs.ko*
660 /lib/modules/%{kernel_release}/kernel/drivers/net/wireless/*_cs.ko*
661 /lib/modules/%{kernel_release}/kernel/drivers/net/wireless/b43
662 /lib/modules/%{kernel_release}/kernel/drivers/net/wireless/hostap/hostap_cs.ko*
663 /lib/modules/%{kernel_release}/kernel/drivers/net/wireless/libertas/*_cs.ko*
664 /lib/modules/%{kernel_release}/kernel/drivers/parport/parport_cs.ko*
665 /lib/modules/%{kernel_release}/kernel/drivers/tty/serial/8250/serial_cs.ko*
666 /lib/modules/%{kernel_release}/kernel/drivers/usb/host/sl811_cs.ko*
669 %defattr(644,root,root,755)
670 /lib/modules/%{kernel_release}/kernel/sound
671 %exclude %dir /lib/modules/%{kernel_release}/kernel/sound
672 %exclude /lib/modules/%{kernel_release}/kernel/sound/ac97_bus.ko*
673 %exclude /lib/modules/%{kernel_release}/kernel/sound/sound*.ko*
674 %exclude /lib/modules/%{kernel_release}/kernel/sound/oss
675 /lib/modules/%{kernel_release}/kernel/drivers/usb/gadget/g_midi.ko*
676 /lib/modules/%{kernel_release}/kernel/drivers/media/pci/cx88/cx88-alsa.ko*
677 /lib/modules/%{kernel_release}/kernel/drivers/media/usb/em28xx/em28xx-alsa.ko*
678 /lib/modules/%{kernel_release}/kernel/drivers/media/pci/saa7134/saa7134-alsa.ko*
681 %defattr(644,root,root,755)
682 /lib/modules/%{kernel_release}/kernel/sound/oss
684 %files headers -f files.headers_exclude_kbuild
685 %defattr(644,root,root,755)
686 %dir %{_kernelsrcdir}
687 %{_kernelsrcdir}/include
688 %dir %{_kernelsrcdir}/arch
689 %dir %{_kernelsrcdir}/arch/[!K]*
690 %{_kernelsrcdir}/arch/*/include
691 %dir %{_kernelsrcdir}/security
692 %dir %{_kernelsrcdir}/security/selinux
693 %{_kernelsrcdir}/security/selinux/include
694 %{_kernelsrcdir}/.config
695 %{_kernelsrcdir}/Module.symvers
697 %files module-build -f files.mb_include_modulebuild_and_dirs
698 %defattr(644,root,root,755)
699 %exclude %dir %{_kernelsrcdir}/arch/um
700 %{_kernelsrcdir}/arch/*/kernel/asm-offsets*
701 %{_kernelsrcdir}/arch/*/kernel/sigframe*.h
702 %{_kernelsrcdir}/drivers/lguest/lg.h
703 %{_kernelsrcdir}/drivers/media/pci/bt8xx/bttv.h
704 %{_kernelsrcdir}/kernel/bounds.c
705 %{_kernelsrcdir}/scripts/basic/*.c
706 %attr(755,root,root) %{_kernelsrcdir}/scripts/kconfig/*.sh
707 %{_kernelsrcdir}/scripts/kconfig/*.in
708 %{_kernelsrcdir}/scripts/kconfig/*_shipped
709 %{_kernelsrcdir}/scripts/kconfig/*.pl
710 %{_kernelsrcdir}/scripts/kconfig/*.glade
711 %{_kernelsrcdir}/scripts/kconfig/*.gperf
712 %{_kernelsrcdir}/scripts/kconfig/*.cc
713 %{_kernelsrcdir}/scripts/kconfig/*.y
714 %{_kernelsrcdir}/scripts/kconfig/*.l
715 %{_kernelsrcdir}/scripts/kconfig/[c-k]*.c
716 %{_kernelsrcdir}/scripts/kconfig/[c-k]*.h
717 %{_kernelsrcdir}/scripts/kconfig/l*.h
718 %{_kernelsrcdir}/scripts/kconfig/[m-u]*.c
719 %{_kernelsrcdir}/scripts/kconfig/[m-u]*.h
720 %{_kernelsrcdir}/scripts/kconfig/lxdialog
721 %{_kernelsrcdir}/scripts/mod/*.c
722 %{_kernelsrcdir}/scripts/mod/modpost.h
723 %attr(755,root,root) %{_kernelsrcdir}/scripts/mkcompile_h
724 %{_kernelsrcdir}/scripts/mkmakefile
725 %{_kernelsrcdir}/scripts/module-common.lds
726 %attr(755,root,root) %{_kernelsrcdir}/scripts/setlocalversion
727 %{_kernelsrcdir}/scripts/*.c
728 %{_kernelsrcdir}/scripts/*.h
729 %attr(755,root,root) %{_kernelsrcdir}/scripts/*.sh
730 %{_kernelsrcdir}/scripts/selinux/genheaders/*.c
731 %{_kernelsrcdir}/scripts/selinux/mdp/*.c
732 %exclude %dir %{_kernelsrcdir}/security
733 %exclude %dir %{_kernelsrcdir}/security/selinux
737 %defattr(644,root,root,755)
738 %dir %{_docdir}/%{name}-%{version}
740 %{_docdir}/%{name}-%{version}/[!jkz]*
741 %{_docdir}/%{name}-%{version}/[jkz]*.txt
742 %{_docdir}/%{name}-%{version}/kbuild
743 %{_docdir}/%{name}-%{version}/kdump
744 %lang(ja) %{_docdir}/%{name}-%{version}/ja_JP
745 %lang(ko) %{_docdir}/%{name}-%{version}/ko_KR
746 %lang(zh_CN) %{_docdir}/%{name}-%{version}/zh_CN
750 %files source -f files.source_exclude_modulebuild_and_dirs
751 %defattr(644,root,root,755)
752 %{_kernelsrcdir}/arch/*/[!Mik]*
753 %{_kernelsrcdir}/arch/*/kernel/[!M]*
754 %{_kernelsrcdir}/arch/ia64/install.sh
755 %{_kernelsrcdir}/arch/m68k/ifpsp060/[!M]*
756 %{_kernelsrcdir}/arch/m68k/ifpsp060/MISC
757 %{_kernelsrcdir}/arch/m68k/install.sh
758 %{_kernelsrcdir}/arch/parisc/install.sh
759 %{_kernelsrcdir}/arch/x86/ia32/[!M]*
760 %{_kernelsrcdir}/arch/arm/kvm
761 %{_kernelsrcdir}/arch/ia64/kvm
762 %{_kernelsrcdir}/arch/mips/kvm
763 %{_kernelsrcdir}/arch/powerpc/kvm
764 %{_kernelsrcdir}/arch/s390/kvm
765 %{_kernelsrcdir}/arch/x86/kvm
766 %exclude %{_kernelsrcdir}/arch/*/kernel/asm-offsets*
767 %exclude %{_kernelsrcdir}/arch/*/kernel/sigframe*.h
768 %exclude %{_kernelsrcdir}/drivers/lguest/lg.h
769 %exclude %{_kernelsrcdir}/drivers/media/pci/bt8xx/bttv.h
770 %{_kernelsrcdir}/block
771 %{_kernelsrcdir}/crypto
772 %{_kernelsrcdir}/drivers
773 %{_kernelsrcdir}/firmware
775 %{_kernelsrcdir}/init
777 %{_kernelsrcdir}/kernel
778 %exclude %{_kernelsrcdir}/kernel/bounds.c
782 %{_kernelsrcdir}/virt
783 %{_kernelsrcdir}/samples
784 %{_kernelsrcdir}/scripts/*
785 %exclude %{_kernelsrcdir}/scripts/Kbuild.include
786 %exclude %{_kernelsrcdir}/scripts/Makefile*
787 %exclude %{_kernelsrcdir}/scripts/basic
788 %exclude %{_kernelsrcdir}/scripts/kconfig
789 %exclude %{_kernelsrcdir}/scripts/mkcompile_h
790 %exclude %{_kernelsrcdir}/scripts/mkmakefile
791 %exclude %{_kernelsrcdir}/scripts/mod
792 %exclude %{_kernelsrcdir}/scripts/module-common.lds
793 %exclude %{_kernelsrcdir}/scripts/setlocalversion
794 %exclude %{_kernelsrcdir}/scripts/*.c
795 %exclude %{_kernelsrcdir}/scripts/*.h
796 %exclude %{_kernelsrcdir}/scripts/*.sh
797 %exclude %dir %{_kernelsrcdir}/scripts/selinux
798 %exclude %{_kernelsrcdir}/scripts/selinux/Makefile
799 %exclude %dir %{_kernelsrcdir}/scripts/selinux/genheaders
800 %exclude %{_kernelsrcdir}/scripts/selinux/genheaders/Makefile
801 %exclude %{_kernelsrcdir}/scripts/selinux/genheaders/*.c
802 %exclude %dir %{_kernelsrcdir}/scripts/selinux/mdp
803 %exclude %{_kernelsrcdir}/scripts/selinux/mdp/Makefile
804 %exclude %{_kernelsrcdir}/scripts/selinux/mdp/*.c
805 %{_kernelsrcdir}/sound
806 %{_kernelsrcdir}/security
807 %exclude %{_kernelsrcdir}/security/selinux/include
808 %{_kernelsrcdir}/tools/*
810 %{_kernelsrcdir}/COPYING
811 %{_kernelsrcdir}/CREDITS
812 %{_kernelsrcdir}/MAINTAINERS
813 %{_kernelsrcdir}/README
814 %{_kernelsrcdir}/REPORTING-BUGS