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: b4d0f6f3699ca489163448f8ea149b6c
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 # generate simple initramfs/initrd image
530 if [[ "$USE_GENINITRD" != [Nn][Oo] ]]; then
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 if [ -x /sbin/update-grub -a -f /etc/sysconfig/grub ]; then
541 if [ "$(. /etc/sysconfig/grub; echo ${UPDATE_GRUB:-yes})" = "yes" ]; then
542 /sbin/update-grub >/dev/null
545 if [ -x /sbin/new-kernel-pkg ]; then
546 /sbin/new-kernel-pkg --initrdfile=%{initrd_dir}/initrd-%{kernel_release}.img --install %{kernel_release} --banner "TLD Linux%{?alt_kernel: %{alt_kernel}}"
548 if [ -x /sbin/rc-boot ]; then
549 /sbin/rc-boot 1>&2 || :
553 %depmod %{kernel_release}
556 %depmod %{kernel_release}
559 %depmod %{kernel_release}
562 %depmod %{kernel_release}
565 %depmod %{kernel_release}
568 %depmod %{kernel_release}
571 %depmod %{kernel_release}
574 %depmod %{kernel_release}
577 ln -snf %{basename:%{_kernelsrcdir}} %{_prefix}/src/linux%{_alt_kernel}
580 if [ "$1" = "0" ]; then
581 if [ -L %{_prefix}/src/linux%{_alt_kernel} ]; then
582 if [ "$(readlink %{_prefix}/src/linux%{_alt_kernel})" = "linux%{_alt_kernel}-%{version}" ]; then
583 rm -f %{_prefix}/src/linux%{_alt_kernel}
588 %triggerin module-build -- %{name} = %{epoch}:%{version}-%{release}
589 ln -sfn %{_kernelsrcdir} /lib/modules/%{kernel_release}/build
590 ln -sfn %{_kernelsrcdir} /lib/modules/%{kernel_release}/source
592 %triggerun module-build -- %{name} = %{epoch}:%{version}-%{release}
593 if [ "$1" = 0 ]; then
594 rm -f /lib/modules/%{kernel_release}/{build,source}
598 %defattr(644,root,root,755)
599 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/kernel
600 /boot/vmlinuz-%{kernel_release}
601 /boot/System.map-%{kernel_release}
602 /boot/config-%{kernel_release}
603 %ghost %{initrd_dir}/initrd-%{kernel_release}.img
604 %ghost %{initrd_dir}/initramfs-%{kernel_release}.img
605 /lib/firmware/%{kernel_release}
607 %dir /lib/modules/%{kernel_release}
608 %dir /lib/modules/%{kernel_release}/kernel
609 /lib/modules/%{kernel_release}/kernel/arch
610 /lib/modules/%{kernel_release}/kernel/crypto
611 /lib/modules/%{kernel_release}/kernel/drivers
612 %exclude /lib/modules/%{kernel_release}/kernel/drivers/gpu
613 /lib/modules/%{kernel_release}/kernel/fs
614 /lib/modules/%{kernel_release}/kernel/kernel
615 /lib/modules/%{kernel_release}/kernel/lib
616 /lib/modules/%{kernel_release}/kernel/net
617 /lib/modules/%{kernel_release}/kernel/mm
618 %dir /lib/modules/%{kernel_release}/kernel/sound
619 /lib/modules/%{kernel_release}/kernel/sound/ac97_bus.ko*
620 /lib/modules/%{kernel_release}/kernel/sound/sound*.ko*
621 %exclude /lib/modules/%{kernel_release}/kernel/drivers/media/pci/cx88/cx88-alsa.ko*
622 %exclude /lib/modules/%{kernel_release}/kernel/drivers/media/usb/em28xx/em28xx-alsa.ko*
623 %exclude /lib/modules/%{kernel_release}/kernel/drivers/media/pci/saa7134/saa7134-alsa.ko*
624 %dir /lib/modules/%{kernel_release}/misc
625 %exclude /lib/modules/%{kernel_release}/kernel/drivers/pcmcia/[!p]*
626 %exclude /lib/modules/%{kernel_release}/kernel/drivers/pcmcia/pd6729.ko*
627 %exclude /lib/modules/%{kernel_release}/kernel/drivers/*/pcmcia
628 %exclude /lib/modules/%{kernel_release}/kernel/drivers/ata/pata_pcmcia.ko*
629 %exclude /lib/modules/%{kernel_release}/kernel/drivers/bluetooth/*_cs.ko*
630 %exclude /lib/modules/%{kernel_release}/kernel/drivers/isdn/hardware/avm/avm_cs.ko*
631 %exclude /lib/modules/%{kernel_release}/kernel/drivers/isdn/hardware/avm/b1pcmcia.ko*
632 %exclude /lib/modules/%{kernel_release}/kernel/drivers/usb/gadget/g_midi.ko*
633 %exclude /lib/modules/%{kernel_release}/kernel/drivers/ide/ide-cs.ko*
634 %exclude /lib/modules/%{kernel_release}/kernel/drivers/net/wireless/*_cs.ko*
635 %exclude /lib/modules/%{kernel_release}/kernel/drivers/net/wireless/b43
636 %exclude /lib/modules/%{kernel_release}/kernel/drivers/net/wireless/hostap/hostap_cs.ko*
637 %exclude /lib/modules/%{kernel_release}/kernel/drivers/net/wireless/libertas/*_cs.ko*
638 %exclude /lib/modules/%{kernel_release}/kernel/drivers/parport/parport_cs.ko*
639 %exclude /lib/modules/%{kernel_release}/kernel/drivers/tty/serial/8250/serial_cs.ko*
640 %exclude /lib/modules/%{kernel_release}/kernel/drivers/usb/host/sl811_cs.ko*
641 /lib/modules/%{kernel_release}/kernel/security
643 %dir %{_sysconfdir}/modprobe.d/%{kernel_release}
646 /lib/modules/%{kernel_release}/modules.order
647 /lib/modules/%{kernel_release}/modules.builtin*
649 # rest modules.* are ghost (regenerated by post depmod -a invocation)
650 %ghost /lib/modules/%{kernel_release}/modules.alias
651 %ghost /lib/modules/%{kernel_release}/modules.alias.bin
652 %ghost /lib/modules/%{kernel_release}/modules.dep
653 %ghost /lib/modules/%{kernel_release}/modules.dep.bin
654 %ghost /lib/modules/%{kernel_release}/modules.devname
655 %ghost /lib/modules/%{kernel_release}/modules.softdep
656 %ghost /lib/modules/%{kernel_release}/modules.symbols
657 %ghost /lib/modules/%{kernel_release}/modules.symbols.bin
659 # symlinks pointing to kernelsrcdir
660 %ghost /lib/modules/%{kernel_release}/build
661 %ghost /lib/modules/%{kernel_release}/source
664 %defattr(644,root,root,755)
665 /boot/vmlinux-%{kernel_release}
668 %defattr(644,root,root,755)
669 /lib/modules/%{kernel_release}/kernel/drivers/gpu
672 %defattr(644,root,root,755)
673 /lib/modules/%{kernel_release}/kernel/drivers/pcmcia/*ko*
674 /lib/modules/%{kernel_release}/kernel/drivers/*/pcmcia
675 %exclude /lib/modules/%{kernel_release}/kernel/drivers/pcmcia/pcmcia*ko*
676 /lib/modules/%{kernel_release}/kernel/drivers/bluetooth/*_cs.ko*
677 /lib/modules/%{kernel_release}/kernel/drivers/isdn/hardware/avm/avm_cs.ko*
678 /lib/modules/%{kernel_release}/kernel/drivers/isdn/hardware/avm/b1pcmcia.ko*
679 /lib/modules/%{kernel_release}/kernel/drivers/ata/pata_pcmcia.ko*
680 /lib/modules/%{kernel_release}/kernel/drivers/ide/ide-cs.ko*
681 /lib/modules/%{kernel_release}/kernel/drivers/net/wireless/*_cs.ko*
682 /lib/modules/%{kernel_release}/kernel/drivers/net/wireless/b43
683 /lib/modules/%{kernel_release}/kernel/drivers/net/wireless/hostap/hostap_cs.ko*
684 /lib/modules/%{kernel_release}/kernel/drivers/net/wireless/libertas/*_cs.ko*
685 /lib/modules/%{kernel_release}/kernel/drivers/parport/parport_cs.ko*
686 /lib/modules/%{kernel_release}/kernel/drivers/tty/serial/8250/serial_cs.ko*
687 /lib/modules/%{kernel_release}/kernel/drivers/usb/host/sl811_cs.ko*
690 %defattr(644,root,root,755)
691 /lib/modules/%{kernel_release}/kernel/sound
692 %exclude %dir /lib/modules/%{kernel_release}/kernel/sound
693 %exclude /lib/modules/%{kernel_release}/kernel/sound/ac97_bus.ko*
694 %exclude /lib/modules/%{kernel_release}/kernel/sound/sound*.ko*
695 %exclude /lib/modules/%{kernel_release}/kernel/sound/oss
696 /lib/modules/%{kernel_release}/kernel/drivers/usb/gadget/g_midi.ko*
697 /lib/modules/%{kernel_release}/kernel/drivers/media/pci/cx88/cx88-alsa.ko*
698 /lib/modules/%{kernel_release}/kernel/drivers/media/usb/em28xx/em28xx-alsa.ko*
699 /lib/modules/%{kernel_release}/kernel/drivers/media/pci/saa7134/saa7134-alsa.ko*
702 %defattr(644,root,root,755)
703 /lib/modules/%{kernel_release}/kernel/sound/oss
705 %files headers -f files.headers_exclude_kbuild
706 %defattr(644,root,root,755)
707 %dir %{_kernelsrcdir}
708 %{_kernelsrcdir}/include
709 %dir %{_kernelsrcdir}/arch
710 %dir %{_kernelsrcdir}/arch/[!K]*
711 %{_kernelsrcdir}/arch/*/include
712 %dir %{_kernelsrcdir}/security
713 %dir %{_kernelsrcdir}/security/selinux
714 %{_kernelsrcdir}/security/selinux/include
715 %{_kernelsrcdir}/.config
716 %{_kernelsrcdir}/Module.symvers
718 %files module-build -f files.mb_include_modulebuild_and_dirs
719 %defattr(644,root,root,755)
720 %exclude %dir %{_kernelsrcdir}/arch/um
721 %{_kernelsrcdir}/arch/*/kernel/asm-offsets*
722 %{_kernelsrcdir}/arch/*/kernel/sigframe*.h
723 %{_kernelsrcdir}/drivers/lguest/lg.h
724 %{_kernelsrcdir}/drivers/media/pci/bt8xx/bttv.h
725 %{_kernelsrcdir}/kernel/bounds.c
726 %{_kernelsrcdir}/scripts/basic/*.c
727 %attr(755,root,root) %{_kernelsrcdir}/scripts/kconfig/*.sh
728 %{_kernelsrcdir}/scripts/kconfig/*.in
729 %{_kernelsrcdir}/scripts/kconfig/*_shipped
730 %{_kernelsrcdir}/scripts/kconfig/*.pl
731 %{_kernelsrcdir}/scripts/kconfig/*.glade
732 %{_kernelsrcdir}/scripts/kconfig/*.gperf
733 %{_kernelsrcdir}/scripts/kconfig/*.cc
734 %{_kernelsrcdir}/scripts/kconfig/*.y
735 %{_kernelsrcdir}/scripts/kconfig/*.l
736 %{_kernelsrcdir}/scripts/kconfig/[c-k]*.c
737 %{_kernelsrcdir}/scripts/kconfig/[c-k]*.h
738 %{_kernelsrcdir}/scripts/kconfig/l*.h
739 %{_kernelsrcdir}/scripts/kconfig/[m-u]*.c
740 %{_kernelsrcdir}/scripts/kconfig/[m-u]*.h
741 %{_kernelsrcdir}/scripts/kconfig/lxdialog
742 %{_kernelsrcdir}/scripts/mod/*.c
743 %{_kernelsrcdir}/scripts/mod/[^e]*.h
744 %attr(755,root,root) %{_kernelsrcdir}/scripts/mkcompile_h
745 %{_kernelsrcdir}/scripts/mkmakefile
746 %{_kernelsrcdir}/scripts/module-common.lds
747 %attr(755,root,root) %{_kernelsrcdir}/scripts/setlocalversion
748 %{_kernelsrcdir}/scripts/*.c
749 %attr(755,root,root) %{_kernelsrcdir}/scripts/*.sh
750 %{_kernelsrcdir}/scripts/selinux/genheaders/*.c
751 %{_kernelsrcdir}/scripts/selinux/mdp/*.c
752 %exclude %dir %{_kernelsrcdir}/security
753 %exclude %dir %{_kernelsrcdir}/security/selinux
757 %defattr(644,root,root,755)
758 %dir %{_docdir}/%{name}-%{version}
760 %{_docdir}/%{name}-%{version}/[!jkz]*
761 %{_docdir}/%{name}-%{version}/[jkz]*.txt
762 %{_docdir}/%{name}-%{version}/kbuild
763 %{_docdir}/%{name}-%{version}/kdump
764 %lang(ja) %{_docdir}/%{name}-%{version}/ja_JP
765 %lang(ko) %{_docdir}/%{name}-%{version}/ko_KR
766 %lang(zh_CN) %{_docdir}/%{name}-%{version}/zh_CN
770 %files source -f files.source_exclude_modulebuild_and_dirs
771 %defattr(644,root,root,755)
772 %{_kernelsrcdir}/arch/*/[!Mik]*
773 %{_kernelsrcdir}/arch/*/kernel/[!M]*
774 %{_kernelsrcdir}/arch/ia64/install.sh
775 %{_kernelsrcdir}/arch/m68k/ifpsp060/[!M]*
776 %{_kernelsrcdir}/arch/m68k/ifpsp060/MISC
777 %{_kernelsrcdir}/arch/m68k/install.sh
778 %{_kernelsrcdir}/arch/parisc/install.sh
779 %{_kernelsrcdir}/arch/x86/ia32/[!M]*
780 %{_kernelsrcdir}/arch/arm/kvm
781 %{_kernelsrcdir}/arch/ia64/kvm
782 %{_kernelsrcdir}/arch/mips/kvm
783 %{_kernelsrcdir}/arch/powerpc/kvm
784 %{_kernelsrcdir}/arch/s390/kvm
785 %{_kernelsrcdir}/arch/x86/kvm
786 %exclude %{_kernelsrcdir}/arch/*/kernel/asm-offsets*
787 %exclude %{_kernelsrcdir}/arch/*/kernel/sigframe*.h
788 %exclude %{_kernelsrcdir}/drivers/lguest/lg.h
789 %exclude %{_kernelsrcdir}/drivers/media/pci/bt8xx/bttv.h
790 %{_kernelsrcdir}/block
791 %{_kernelsrcdir}/crypto
792 %{_kernelsrcdir}/drivers
793 %{_kernelsrcdir}/firmware
795 %{_kernelsrcdir}/init
797 %{_kernelsrcdir}/kernel
798 %exclude %{_kernelsrcdir}/kernel/bounds.c
802 %{_kernelsrcdir}/virt
803 %{_kernelsrcdir}/samples
804 %{_kernelsrcdir}/scripts/*
805 %exclude %{_kernelsrcdir}/scripts/Kbuild.include
806 %exclude %{_kernelsrcdir}/scripts/Makefile*
807 %exclude %{_kernelsrcdir}/scripts/basic
808 %exclude %{_kernelsrcdir}/scripts/kconfig
809 %exclude %{_kernelsrcdir}/scripts/mkcompile_h
810 %exclude %{_kernelsrcdir}/scripts/mkmakefile
811 %exclude %{_kernelsrcdir}/scripts/mod
812 %exclude %{_kernelsrcdir}/scripts/module-common.lds
813 %exclude %{_kernelsrcdir}/scripts/setlocalversion
814 %exclude %{_kernelsrcdir}/scripts/*.c
815 %exclude %{_kernelsrcdir}/scripts/*.sh
816 %exclude %dir %{_kernelsrcdir}/scripts/selinux
817 %exclude %{_kernelsrcdir}/scripts/selinux/Makefile
818 %exclude %dir %{_kernelsrcdir}/scripts/selinux/genheaders
819 %exclude %{_kernelsrcdir}/scripts/selinux/genheaders/Makefile
820 %exclude %{_kernelsrcdir}/scripts/selinux/genheaders/*.c
821 %exclude %dir %{_kernelsrcdir}/scripts/selinux/mdp
822 %exclude %{_kernelsrcdir}/scripts/selinux/mdp/Makefile
823 %exclude %{_kernelsrcdir}/scripts/selinux/mdp/*.c
824 %{_kernelsrcdir}/sound
825 %{_kernelsrcdir}/security
826 %exclude %{_kernelsrcdir}/security/selinux/include
827 %{_kernelsrcdir}/tools/*
829 %{_kernelsrcdir}/COPYING
830 %{_kernelsrcdir}/CREDITS
831 %{_kernelsrcdir}/MAINTAINERS
832 %{_kernelsrcdir}/README
833 %{_kernelsrcdir}/REPORTING-BUGS