]> git.pld-linux.org Git - packages/kernel.git/blob - kernel.spec
- addedd Linux-ABI support. Bcond, default disabled.
[packages/kernel.git] / kernel.spec
1 # TODO:
2 #       - test pax stuff (btw. tested ok in softmode)
3 #       - prepare config for non SEGMEXEC capable archs (ie not x86/32bit)
4 #       - patch scripts/Makefile.xen not to require bash
5 #       - make PAE usage configurable when Xen is on
6 #               ALL
7 #   - #vserver: try to get a 2.2.x kernel patch or if you like development
8 #     features a 2.3.x one instead of the long discontinued 2.1.x you are using
9 #
10 # WARNING: Kernels from 2.6.16.X series not work under OldWorldMac
11 #
12 # Conditional build:
13 %bcond_without  smp             # don't build SMP kernel
14 %bcond_without  up              # don't build UP kernel
15 %bcond_without  source          # don't build kernel-source package
16 %bcond_without  pcmcia          # don't build pcmcia
17
18 %bcond_with     grsec_full      # build full grsecurity
19 %bcond_with     pax             # build PaX and full grsecurity
20 %bcond_with     verbose         # verbose build (V=1)
21 %bcond_with     xen0            # added Xen0 support
22 %bcond_with     xenU            # added XenU support
23 %bcond_without  grsecurity      # don't build grsecurity at all
24 %bcond_without  grsec_minimal   # build only minimal subset (proc,link,fifo,shm)
25
26 %bcond_without  bootsplash      # build with bootsplash instead of fbsplash
27 %bcond_with     vesafb_tng      # vesafb-tng, vesafb replacement from gentoo
28 %bcond_with     pae             # build PAE (HIGHMEM64G) support on uniprocessor
29 %bcond_with     nfsroot         # build with root on NFS support
30 %bcond_with     reiserfs4       # build with ReiserFS 4 support
31 %bcond_with     ext2compiled    # compile ext2 into kernel to be able to boot from ext2 rootfs
32 %bcond_with     abi             # build ABI support only ix86 !!
33
34 %{?debug:%define with_verbose 1}
35
36 %if %{without grsecurity}
37 %undefine       with_grsec_full
38 %undefine       with_grsec_minimal
39 %undefine       with_pax
40 %endif
41
42 %if %{with pax}
43 %undefine       with_grsec_minimal
44 %undefine       with_grsec_full
45 %define         with_grsecurity         1
46 %endif
47
48 %if %{with grsec_full}
49 %undefine       with_grsec_minimal
50 %define         with_grsecurity         1
51 %endif
52
53 %if %{with grsec_minimal}
54 %undefine       with_grsec_full
55 %undefine       with_pax
56 %define         with_grsecurity         1
57 %endif
58
59 %ifarch sparc
60 # sparc32 is missing important updates from 2.5 cycle - won't build.
61 %undefine       with_smp
62 %endif
63
64 %ifarch ia64
65 # broken
66 %undefine       with_up
67 %endif
68
69 %define         have_drm        1
70 %define         have_oss        1
71 %define         have_sound      1
72
73 %ifarch %{ix86} alpha ppc
74 %define         have_isa        1
75 %else
76 %define         have_isa        0
77 %endif
78
79 %ifarch sparc sparc64
80 %undefine       with_pcmcia
81 %define         have_drm        0
82 %define         have_oss        0
83 %endif
84
85 %ifnarch %{ix86}
86 %undefine       abi
87 %endif
88
89 %if %{with xen0}
90 %define         xen     xen0
91 %define         dashxen \-xen0
92 %define         pae     1
93 %else
94 %if %{with xenU}
95 %define         xen     xenU
96 %define         dashxen \-xenU
97 %define         pae     1
98 %else
99 %define         xen     %{nil}
100 %define         dashxen %{nil}
101 %endif
102 %endif
103
104 ## Programs required by kernel to work.
105 %define         _binutils_ver           2.12.1
106 %define         _util_linux_ver         2.10o
107 %define         _module_init_tool_ver   0.9.10
108 %define         _e2fsprogs_ver          1.29
109 %define         _jfsutils_ver           1.1.3
110 %define         _reiserfsprogs_ver      3.6.3
111 %define         _reiser4progs_ver       1.0.0
112 %define         _xfsprogs_ver           2.6.0
113 %define         _pcmcia_cs_ver          3.1.21
114 %define         _pcmciautils_ver        004
115 %define         _quota_tools_ver        3.09
116 %define         _ppp_ver                1:2.4.0
117 %define         _isdn4k_utils_ver       3.1pre1
118 %define         _nfs_utils_ver          1.0.5
119 %define         _procps_ver             3.2.0
120 %define         _oprofile_ver           0.9
121 %define         _udev_ver               071
122 %define         _mkvmlinuz_ver          1.3
123
124 %define         netfilter_snap          20060504
125
126 %define         _enable_debug_packages                  0
127
128 %define         squashfs_version        3.1
129 %define         suspend_version         2.2.5
130
131 %define         xen_version             3.0.2
132
133 %define         __alt_kernel    %{?with_pax:pax}%{?with_grsec_full:grsecurity}%{?with_xen0:xen0}%{?with_xenU:xenU}
134 %if "%{__alt_kernel}" != ""
135 %define         alt_kernel      %{__alt_kernel}
136 %endif
137
138 # Our Kernel ABI, increase this when you want the out of source modules being rebuilt
139 # Usually same as %{_rel}
140 %define         KABI            9
141
142 # kernel release (used in filesystem and eventually in uname -r)
143 # modules will be looked from /lib/modules/%{kernel_release}%{?smp}
144 # _localversion is just that without version for "> localversion"
145 %define         _localversion %{KABI}%{xen}
146 %define         kernel_release %{version}%{?alt_kernel:_%{alt_kernel}}-%{_localversion}
147
148 %define         _basever        2.6.16
149 %define         _postver        .60
150 %define         _rel            9
151 Summary:        The Linux kernel (the core of the Linux operating system)
152 Summary(de.UTF-8):      Der Linux-Kernel (Kern des Linux-Betriebssystems)
153 Summary(et.UTF-8):      Linuxi kernel (ehk operatsioonisüsteemi tuum)
154 Summary(fr.UTF-8):      Le Kernel-Linux (La partie centrale du systeme)
155 Summary(pl.UTF-8):      JÄ…dro Linuksa
156 Name:           kernel%{_alt_kernel}
157 Version:        %{_basever}%{_postver}
158 Release:        %{_rel}%{?with_ext2compiled:ext2}
159 Epoch:          3
160 License:        GPL v2
161 Group:          Base/Kernel
162 Source0:        http://www.kernel.org/pub/linux/kernel/v2.6/linux-%{_basever}.tar.bz2
163 # Source0-md5:  9a91b2719949ff0856b40bc467fd47be
164 Source1:        kernel-autoconf.h
165 Source2:        kernel-config.h
166 Source3:        http://www.kernel.org/pub/linux/kernel/v2.6/patch-%{version}.bz2
167 # Source3-md5:  be03a1889d7c89f208a18b55870e3a6f
168
169 Source5:        kernel-ppclibs.Makefile
170 Source7:        kernel-module-build.pl
171
172 Source10:       http://suspend2.net/downloads/all/suspend2-%{suspend_version}-for-2.6.16.9.tar.bz2
173 # Source10-md5: 34345b1f7ad1505f6b264427a21e8a04
174 Source12:       ftp://ftp.namesys.com/pub/reiser4-for-2.6/2.6.16/reiser4-for-2.6.16-5.patch.gz
175 # Source12-md5: 6ad22d084e12257781f205ec248e4f64
176
177 Source20:       kernel-i386.config
178 Source21:       kernel-i386-smp.config
179 Source22:       kernel-x86_64.config
180 Source23:       kernel-x86_64-smp.config
181 Source24:       kernel-sparc.config
182 Source25:       kernel-sparc-smp.config
183 Source26:       kernel-sparc64.config
184 Source27:       kernel-sparc64-smp.config
185 Source28:       kernel-alpha.config
186 Source29:       kernel-alpha-smp.config
187 Source30:       kernel-ppc.config
188 Source31:       kernel-ppc-smp.config
189 Source32:       kernel-ia64.config
190 Source33:       kernel-ia64-smp.config
191
192 Source40:       kernel-netfilter.config
193 Source41:       kernel-squashfs.config
194 Source42:       kernel-suspend2.config
195 Source43:       kernel-vserver.config
196 Source44:       kernel-vesafb-tng.config
197 Source45:       kernel-grsec.config
198 Source46:       kernel-xen0.config
199 Source47:       kernel-xenU.config
200 Source48:       kernel-xen-extra.config
201 Source49:       kernel-grsec+pax.config
202 Source50:       kernel-openswan.config
203 Source51:       kernel-abi.config
204 ###
205 #       Patches
206 ###
207
208 #
209 # PATA ports on SATA Promise controller; patch based on:
210 # http://cvs.fedora.redhat.com/viewcvs/*checkout*/rpms/kernel/devel/linux-2.6-sata-promise-pata-ports.patch
211 #
212 Patch1:         linux-2.6-sata-promise-pata-ports.patch
213
214 # tahoe9XX http://tahoe.pl/drivers/tahoe9xx-2.6.11.5.patch
215 Patch2:         tahoe9xx-2.6.11.5.patch
216
217 #       ftp://ftp.openbios.org/pub/bootsplash/kernel/bootsplash-3.1.6-2.6.15.diff
218 Patch3:         bootsplash-3.1.6-2.6.15.diff
219 #       http://dev.gentoo.org/~spock/projects/gensplash/archive/fbsplash-0.9.2-r5-2.6.16.patch
220 Patch4:         fbsplash-0.9.2-r5-2.6.16.patch
221 Patch5:         linux-2.6-vesafb-tng.patch
222
223 # directly from http://mesh.dl.sourceforge.net/sourceforge/squashfs/squashfs3.1.tar.gz
224 #               from linux-2.6.16
225 Patch6:         squashfs%{squashfs_version}-patch
226
227 Patch7:         linux-alpha-isa.patch
228 Patch8:         linux-fbcon-margins.patch
229 Patch9:         linux-static-dev.patch
230
231 # netfilter snap
232 ## submitted
233
234 ## base
235 Patch10:        pom-ng-IPV4OPTSSTRIP-%{netfilter_snap}.patch
236 Patch11:        pom-ng-connlimit-%{netfilter_snap}.patch
237 Patch12:        pom-ng-expire-%{netfilter_snap}.patch
238 Patch13:        pom-ng-fuzzy-%{netfilter_snap}.patch
239 Patch14:        pom-ng-ipv4options-%{netfilter_snap}.patch
240 Patch15:        pom-ng-nth-%{netfilter_snap}.patch
241 Patch16:        pom-ng-osf-%{netfilter_snap}.patch
242 Patch17:        pom-ng-psd-%{netfilter_snap}.patch
243 Patch18:        pom-ng-quota-%{netfilter_snap}.patch
244 Patch19:        pom-ng-random-%{netfilter_snap}.patch
245 Patch20:        pom-ng-set-%{netfilter_snap}.patch
246 Patch21:        pom-ng-time-%{netfilter_snap}.patch
247 Patch22:        pom-ng-u32-%{netfilter_snap}.patch
248
249 ## extra
250 Patch30:        pom-ng-ACCOUNT-%{netfilter_snap}.patch
251 Patch31:        pom-ng-IPMARK-%{netfilter_snap}.patch
252 Patch32:        pom-ng-ROUTE-%{netfilter_snap}.patch
253 Patch33:        pom-ng-TARPIT-%{netfilter_snap}.patch
254 Patch34:        pom-ng-XOR-%{netfilter_snap}.patch
255 Patch35:        pom-ng-account-%{netfilter_snap}.patch
256 Patch36:        ipp2p-0.8.2.patch
257 Patch37:        pom-ng-rpc-%{netfilter_snap}.patch
258 Patch38:        pom-ng-unclean-%{netfilter_snap}.patch
259
260 ###
261 #       End netfilter
262 ###
263
264 # from http://ace-host.stuart.id.au/russell/files/debian/sarge/kernel-patch-linuxabi/kernel-patch-linuxabi_20060404.tar.gz
265 Patch40:        linuxabi-2.6.16-0.patch
266
267 # derived from http://dl.sourceforge.net/l7-filter/netfilter-layer7-v2.2.tar.gz
268 Patch49:        kernel-2.6.13-2.6.16-layer7-2.2.patch
269
270 # from http://www.linuximq.net/patchs/linux-2.6.16-imq2.diff
271 Patch50:        linux-2.6.16-imq2.diff
272
273 # from http://bluetooth-alsa.sourceforge.net/sco-mtu.patch
274 Patch51:        sco-mtu.patch
275
276 # esfq
277 # from http://fatooh.org/esfq-2.6/current/esfq-kernel.patch
278 Patch53:        esfq-kernel.patch
279
280 Patch54:        linux-iforce-trust_ffrm.patch
281 # by Baggins request:
282 # derived from ftp://ftp.cmf.nrl.navy.mil/pub/chas/linux-atm/vbr/vbr-kernel-diffs
283 Patch55:        linux-2.6-atm-vbr.patch
284 Patch56:        linux-2.6-atmdd.patch
285
286 Patch57:        linux-2.6-cpuset_virtualization.patch
287
288 # Derived from http://www.skd.de/e_en/products/adapters/pci_64/sk-98xx_v20/software/linux/driver/install-8_31.tar.bz2
289 Patch60:        linux-2.6-sk98lin-8.31.2.3.patch
290
291 Patch70:        linux-2.6-suspend2-avoid-redef.patch
292 Patch71:        linux-2.6-suspend2-page.patch
293 Patch72:        suspend2-2.2.5-for-2.6.16.37-fix.patch
294
295 Patch80:        kernel-ahci-sb600.patch
296
297 Patch81:        linux-2.6-md.patch
298 Patch82:        linux-3w-9xxx.patch
299
300 # From http://www.broadcom.com/support/ethernet_nic/driver-sla.php?driver=570x-Linux
301 Patch83:        linux-tg3-3.81c.patch
302
303 # IPSEC KLIPS
304 Patch90:        http://www.openswan.org/download/openswan-2.4.9.kernel-2.6-klips.patch.gz
305 Patch91:        http://www.openswan.org/download/openswan-2.4.9.kernel-2.6-natt.patch.gz
306 Patch92:        linux-asm_segment_h.patch
307
308 # vserver from: http://vserver.13thfloor.at/Experimental/patch-2.6.16-vs2.1.1-rc15.diff
309 Patch100:       linux-2.6-vs2.1.patch
310 Patch101:       linux-2.6-vs2.1-suspend2.patch
311 Patch102:       linux-2.6-vs2.1-128IPs.patch
312 Patch103:       linux-vcontext-selinux.patch
313 Patch104:       kernel-CVE-2008-0163.patch
314
315 # from http://www.cl.cam.ac.uk/Research/SRG/netos/xen/downloads/xen-3.0.2-src.tgz
316 Patch120:       xen-3.0-2.6.16.patch
317 Patch121:       linux-xen-page_alloc.patch
318
319 # from  http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/iw266_we20-6.diff
320 Patch140:       linux-2.6.16-we20-6.patch
321
322 Patch200:       linux-2.6-ppc-ICE-hacks.patch
323 Patch201:       linux-2.6-x86_64-stack-protector.patch
324 Patch202:       linux-2.6-unwind-through-signal-frames.patch
325
326 # Wake-On-Lan patch for nVidia nForce ethernet driver forcedeth
327 Patch250:       linux-2.6.16-forcedeth-WON.patch
328 Patch251:       linux-nvidia.patch
329
330 # From ALSA 1.0.13 for nVidia
331 Patch252:       linux-alsa-hda.patch
332
333 # add tty ioctl to figure physical device of the console. used by showconsole.spec (blogd)
334 Patch256:       kernel-TIOCGDEV.patch
335
336 Patch1000:      linux-2.6-grsec-minimal.patch
337 Patch1001:      linux-2.6-grsec-wrong-deref.patch
338
339 Patch1200:      linux-2.6-apparmor.patch
340 Patch1201:      linux-2.6-apparmor-caps.patch
341
342 # grsecurity snap for 2.6.16.14
343 # based on http://www.grsecurity.net/~spender/grsecurity-2.1.9-2.6.16.14-200605060936.patch
344 Patch9999:      grsecurity-2.1.9-2.6.16.14.patch
345 Patch10000:     linux-2.6-grsec-caps.patch
346
347 URL:            http://www.kernel.org/
348 %if %{with xen0} || %{with xenU}
349 BuildRequires:  bash
350 %endif
351 BuildRequires:  binutils >= 3:2.14.90.0.7
352 %ifarch sparc sparc64
353 BuildRequires:  elftoaout
354 %endif
355 BuildRequires:  /sbin/depmod
356 BuildRequires:  gcc >= 5:3.2
357 # for hostname command
358 BuildRequires:  net-tools
359 BuildRequires:  perl-base
360 BuildRequires:  rpmbuild(macros) >= 1.217
361 Autoreqprov:    no
362 Requires(post): coreutils
363 Requires(post): geninitrd >= 2.57
364 Requires(post): module-init-tools >= 0.9.9
365 Requires:       /sbin/depmod
366 Requires:       coreutils
367 Requires:       geninitrd >= 2.57
368 Requires:       module-init-tools >= 0.9.9
369 Provides:       %{name}(netfilter) = %{netfilter_snap}
370 Provides:       %{name}(vermagic) = %{kernel_release}
371 Provides:       %{name}-up = %{epoch}:%{version}-%{release}
372 %if %{with xen0}
373 Provides:       kernel(xen0) = %{xen_version}
374 %endif
375 Obsoletes:      kernel-misc-fuse
376 Obsoletes:      kernel-modules
377 Obsoletes:      kernel-net-hostap
378 Obsoletes:      kernel-net-ieee80211
379 Obsoletes:      kernel-net-ipp2p
380 Conflicts:      e2fsprogs < %{_e2fsprogs_ver}
381 Conflicts:      isdn4k-utils < %{_isdn4k_utils_ver}
382 Conflicts:      jfsutils < %{_jfsutils_ver}
383 Conflicts:      module-init-tool < %{_module_init_tool_ver}
384 Conflicts:      nfs-utils < %{_nfs_utils_ver}
385 Conflicts:      oprofile < %{_oprofile_ver}
386 Conflicts:      ppp < %{_ppp_ver}
387 Conflicts:      procps < %{_procps_ver}
388 Conflicts:      quota-tools < %{_quota_tools_ver}
389 %if %{with reiserfs4}
390 Conflicts:      reiser4progs < %{_reiser4progs_ver}
391 %endif
392 Conflicts:      reiserfsprogs < %{_reiserfsprogs_ver}
393 Conflicts:      udev < %{_udev_ver}
394 Conflicts:      util-linux < %{_util_linux_ver}
395 Conflicts:      xfsprogs < %{_xfsprogs_ver}
396 %if %{with xen0} || %{with xenU}
397 ExclusiveArch:  %{ix86} %{x8664}
398 ExcludeArch:    i386 i486 i586
399 %else
400 ExclusiveArch:  %{ix86} alpha %{x8664} ia64 ppc ppc64 sparc sparc64
401 %endif
402 ExclusiveOS:    Linux
403 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
404
405 # No ELF objects there to strip (skips processing 27k files)
406 %define         _noautostrip    .*%{_kernelsrcdir}/.*
407 %define         _noautochrpath  .*%{_kernelsrcdir}/.*
408
409 %ifarch ia64
410 %define         initrd_dir      /boot/efi
411 %else
412 %define         initrd_dir      /boot
413 %endif
414
415 %define         _kernelsrcdir   /usr/src/linux%{_alt_kernel}-%{version}
416
417 %if "%{_target_base_arch}" != "%{_arch}"
418         %define CrossOpts ARCH=%{_target_base_arch} CROSS_COMPILE=%{_target_cpu}-pld-linux-
419         %define DepMod /bin/true
420
421         %if "%{_arch}" == "sparc" && "%{_target_base_arch}" == "sparc64"
422         %define CrossOpts ARCH=%{_target_base_arch} CROSS_COMPILE=%{_target_cpu}-pld-linux- LD=%{__ld} AS=%{__as} NM=%{__nm} AR=%{__ar} RANLIB=%{__ranlib} STRIP=%{__strip}
423         %define DepMod /sbin/depmod
424         %endif
425
426         %if "%{_arch}" == "x86_64" && "%{_target_base_arch}" == "i386"
427         %define CrossOpts ARCH=%{_target_base_arch}
428         %define DepMod /sbin/depmod
429         %endif
430
431 %else
432         %define CrossOpts CC="%{__cc}"
433         %define DepMod /sbin/depmod
434 %endif
435
436 %description
437 This package contains the Linux kernel that is used to boot and run
438 your system. It contains few device drivers for specific hardware.
439 Most hardware is instead supported by modules loaded after booting.
440
441 Netfilter module dated: %{netfilter_snap}
442 %{?with_grsec_full:Grsecurity full support - enabled}
443 %{?with_pax:PaX support - enabled}
444 %{?with_xen0:Xen 0 - enabled}
445 %{?with_xenU:Xen U - enabled}
446 %{?with_vesafb_tng:VesaFB New generation - enabled}
447 %{?with_nfsroot:Root on NFS - enabled}
448
449 %description -l de.UTF-8
450 Das Kernel-Paket enthält den Linux-Kernel (vmlinuz), den Kern des
451 Linux-Betriebssystems. Der Kernel ist für grundliegende
452 Systemfunktionen verantwortlich: Speicherreservierung,
453 Prozeß-Management, Geräte Ein- und Ausgaben, usw.
454
455 Netfilter module dated: %{netfilter_snap}
456 %{?with_grsec_full:Grsecurity full support - enabled}
457 %{?with_pax:PaX support - enabled}
458 %{?with_xen0:Xen 0 - enabled}
459 %{?with_xenU:Xen U - enabled}
460 %{?with_vesafb_tng:VesaFB New generation - enabled}
461 %{?with_nfsroot:Root on NFS - enabled}
462
463 %description -l fr.UTF-8
464 Le package kernel contient le kernel linux (vmlinuz), la partie
465 centrale d'un système d'exploitation Linux. Le noyau traite les
466 fonctions basiques d'un système d'exploitation: allocation mémoire,
467 allocation de process, entrée/sortie de peripheriques, etc.
468
469 Netfilter module dated: %{netfilter_snap}
470 %{?with_grsec_full:Grsecurity full support - enabled}
471 %{?with_pax:PaX support - enabled}
472 %{?with_xen0:Xen 0 - enabled}
473 %{?with_xenU:Xen U - enabled}
474 %{?with_vesafb_tng:VesaFB New generation - enabled}
475 %{?with_nfsroot:Root on NFS - enabled}
476
477 %description -l pl.UTF-8
478 Pakiet zawiera jÄ…dro Linuksa niezbÄ™dne do prawidÅ‚owego dziaÅ‚ania
479 Twojego komputera. Zawiera w sobie sterowniki do sprzÄ™tu znajdujÄ…cego
480 siÄ™ w komputerze, takiego jak sterowniki dysków itp.
481
482 Netfilter module dated: %{netfilter_snap}
483 %{?with_grsec_full:Grsecurity full support - enabled}
484 %{?with_pax:PaX support - enabled}
485 %{?with_xen0:Xen 0 - enabled}
486 %{?with_xenU:Xen U - enabled}
487 %{?with_vesafb_tng:VesaFB New generation - enabled}
488 %{?with_nfsroot:Root on NFS - enabled}
489 %{?with_abi:Linux ABI support - enabled}
490
491 %package vmlinux
492 Summary:        vmlinux - uncompressed kernel image
493 Summary(pl.UTF-8):      vmlinux - rozpakowany obraz jÄ…dra
494 Group:          Base/Kernel
495
496 %description vmlinux
497 vmlinux - uncompressed kernel image.
498
499 %description vmlinux -l pl.UTF-8
500 vmlinux - rozpakowany obraz jÄ…dra.
501
502 %package drm
503 Summary:        DRM kernel modules
504 Summary(pl.UTF-8):      Sterowniki DRM
505 Group:          Base/Kernel
506 Requires(postun):       %{name}-up = %{epoch}:%{version}-%{release}
507 Requires:       %{name}-up = %{epoch}:%{version}-%{release}
508 Autoreqprov:    no
509
510 %description drm
511 DRM kernel modules.
512
513 %description drm -l pl.UTF-8
514 Sterowniki DRM.
515
516 %package pcmcia
517 Summary:        PCMCIA modules
518 Summary(pl.UTF-8):      ModuÅ‚y PCMCIA
519 Group:          Base/Kernel
520 Requires(postun):       %{name}-up = %{epoch}:%{version}-%{release}
521 Requires:       %{name}-up = %{epoch}:%{version}-%{release}
522 Conflicts:      pcmcia-cs < %{_pcmcia_cs_ver}
523 Conflicts:      pcmciautils < %{_pcmciautils_ver}
524 Autoreqprov:    no
525
526 %description pcmcia
527 PCMCIA modules.
528
529 %description pcmcia -l pl.UTF-8
530 ModuÅ‚y PCMCIA.
531
532 %package libs
533 Summary:        Libraries for preparing bootable kernel on PowerPCs
534 Summary(pl.UTF-8):      Biblioteki do przygotowania bootowalnego jÄ…dra dla PowerPC
535 Group:          Base/Kernel
536 Requires:       %{name}-up = %{epoch}:%{version}-%{release}
537 Requires:       mkvmlinuz >= %{_mkvmlinuz_ver}
538 Autoreqprov:    no
539
540 %description libs
541 Libraries for preparing bootable kernel on PowerPCs. Script called
542 mkvmlinuz may be useful for this.
543
544 %description libs -l pl.UTF-8
545 Biblioteki do przygotowania bootowalnego jÄ…dra dla PowerPC. Skrypt
546 mkvmlinuz może być do tego przydatny.
547
548 %package sound-alsa
549 Summary:        ALSA kernel modules
550 Summary(pl.UTF-8):      Sterowniki dźwiÄ™ku ALSA
551 Group:          Base/Kernel
552 Requires(postun):       %{name}-up = %{epoch}:%{version}-%{release}
553 Requires:       %{name}-up = %{epoch}:%{version}-%{release}
554 Autoreqprov:    no
555
556 %description sound-alsa
557 ALSA (Advanced Linux Sound Architecture) sound drivers.
558
559 %description sound-alsa -l pl.UTF-8
560 Sterowniki dźwiÄ™ku ALSA (Advanced Linux Sound Architecture).
561
562 %package sound-oss
563 Summary:        OSS kernel modules
564 Summary(pl.UTF-8):      Sterowniki dźwiÄ™ku OSS
565 Group:          Base/Kernel
566 Requires(postun):       %{name}-up = %{epoch}:%{version}-%{release}
567 Requires:       %{name}-up = %{epoch}:%{version}-%{release}
568 Autoreqprov:    no
569
570 %description sound-oss
571 OSS (Open Sound System) drivers.
572
573 %description sound-oss -l pl.UTF-8
574 Sterowniki dźwiÄ™ku OSS (Open Sound System).
575
576 %package smp
577 Summary:        Kernel version %{version} compiled for SMP machines
578 Summary(de.UTF-8):      Kernel version %{version} für Multiprozessor-Maschinen
579 Summary(fr.UTF-8):      Kernel version %{version} compiler pour les machine Multi-Processeur
580 Summary(pl.UTF-8):      JÄ…dro Linuksa w wersji %{version} dla maszyn wieloprocesorowych
581 Group:          Base/Kernel
582 Requires(post): coreutils
583 Requires(post): geninitrd >= 2.57
584 Requires(post): module-init-tools >= 0.9.9
585 Requires:       /sbin/depmod
586 Requires:       coreutils
587 Requires:       geninitrd >= 2.26
588 Requires:       module-init-tools >= 0.9.9
589 Provides:       %{name}(netfilter) = %{netfilter_snap}
590 Provides:       %{name}-smp(vermagic) = %{kernel_release}
591 %if %{with xen0}
592 Provides:       kernel(xen0) = %{xen_version}
593 %endif
594 Obsoletes:      kernel-smp-misc-fuse
595 Obsoletes:      kernel-smp-net-hostap
596 Obsoletes:      kernel-smp-net-ieee80211
597 Obsoletes:      kernel-smp-net-ipp2p
598 Conflicts:      e2fsprogs < %{_e2fsprogs_ver}
599 Conflicts:      isdn4k-utils < %{_isdn4k_utils_ver}
600 Conflicts:      jfsutils < %{_jfsutils_ver}
601 Conflicts:      module-init-tool < %{_module_init_tool_ver}
602 Conflicts:      nfs-utils < %{_nfs_utils_ver}
603 Conflicts:      oprofile < %{_oprofile_ver}
604 Conflicts:      ppp < %{_ppp_ver}
605 Conflicts:      procps < %{_procps_ver}
606 Conflicts:      quota-tools < %{_quota_tools_ver}
607 %if %{with reiserfs4}
608 Conflicts:      reiser4progs < %{_reiser4progs_ver}
609 %endif
610 Conflicts:      reiserfsprogs < %{_reiserfsprogs_ver}
611 Conflicts:      util-linux < %{_util_linux_ver}
612 Conflicts:      xfsprogs < %{_xfsprogs_ver}
613 Autoreqprov:    no
614
615 %description smp
616 This package includes a SMP version of the Linux %{version} kernel. It
617 is required only on machines with two or more CPUs, although it should
618 work fine on single-CPU boxes.
619
620 Netfilter module dated: %{netfilter_snap}
621 %{?with_grsec_full:Grsecurity full support - enabled}
622 %{?with_pax:PaX support - enabled}
623 %{?with_xen0:Xen 0 - enabled}
624 %{?with_xenU:Xen U - enabled}
625 %{?with_vesafb_tng:VesaFB New generation - enabled}
626 %{?with_nfsroot:Root on NFS - enabled}
627
628 %description smp -l de.UTF-8
629 Dieses Paket enthält eine SMP (Multiprozessor)-Version von
630 Linux-Kernel %{version}. Es wird für Maschinen mit zwei oder mehr
631 Prozessoren gebraucht, sollte aber auch auf Computern mit nur einer
632 CPU laufen.
633
634 Netfilter module dated: %{netfilter_snap}
635 %{?with_grsec_full:Grsecurity full support - enabled}
636 %{?with_pax:PaX support - enabled}
637 %{?with_xen0:Xen 0 - enabled}
638 %{?with_xenU:Xen U - enabled}
639 %{?with_vesafb_tng:VesaFB New generation - enabled}
640 %{?with_nfsroot:Root on NFS - enabled}
641 %{?with_abi:Linux ABI support - enabled}
642
643 %description smp -l fr.UTF-8
644 Ce package inclu une version SMP du noyau de Linux version {version}.
645 Il et nécessaire seulement pour les machine avec deux processeurs ou
646 plus, il peut quand même fonctionner pour les système mono-processeur.
647
648 Netfilter module dated: %{netfilter_snap}
649 %{?with_grsec_full:Grsecurity full support - enabled}
650 %{?with_pax:PaX support - enabled}
651 %{?with_xen0:Xen 0 - enabled}
652 %{?with_xenU:Xen U - enabled}
653 %{?with_vesafb_tng:VesaFB New generation - enabled}
654 %{?with_nfsroot:Root on NFS - enabled}
655 %{?with_abi:Linux ABI support - enabled}
656
657 %description smp -l pl.UTF-8
658 Pakiet zawiera jÄ…dro SMP Linuksa w wersji %{version}. Jest ono
659 wymagane przez komputery zawierajÄ…ce dwa lub wiÄ™cej procesorów.
660 Powinno również dobrze dziaÅ‚ać na maszynach z jednym procesorem.
661
662 Netfilter module dated: %{netfilter_snap}
663 %{?with_grsec_full:Grsecurity full support - enabled}
664 %{?with_pax:PaX support - enabled}
665 %{?with_xen0:Xen 0 - enabled}
666 %{?with_xenU:Xen U - enabled}
667 %{?with_vesafb_tng:VesaFB New generation - enabled}
668 %{?with_nfsroot:Root on NFS - enabled}
669 %{?with_abi:Linux ABI support - enabled}
670
671 %package smp-vmlinux
672 Summary:        vmlinux - uncompressed SMP kernel image
673 Summary(pl.UTF-8):      vmlinux - rozpakowany obraz jÄ…dra SMP
674 Group:          Base/Kernel
675
676 %description smp-vmlinux
677 vmlinux - uncompressed SMP kernel image.
678
679 %description smp-vmlinux -l pl.UTF-8
680 vmlinux - rozpakowany obraz jÄ…dra SMP.
681
682 %package smp-drm
683 Summary:        DRM SMP kernel modules
684 Summary(pl.UTF-8):      Sterowniki DRM dla maszyn wieloprocesorowych
685 Group:          Base/Kernel
686 Requires(postun):       %{name}-smp = %{epoch}:%{version}-%{release}
687 Requires:       %{name}-smp = %{epoch}:%{version}-%{release}
688 Autoreqprov:    no
689
690 %description smp-drm
691 DRM SMP kernel modules.
692
693 %description smp-drm -l pl.UTF-8
694 Sterowniki DRM dla maszyn wieloprocesorowych.
695
696 %package smp-pcmcia
697 Summary:        PCMCIA modules for SMP kernel
698 Summary(pl.UTF-8):      ModuÅ‚y PCMCIA dla maszyn SMP
699 Group:          Base/Kernel
700 Requires(postun):       %{name}-smp = %{epoch}:%{version}-%{release}
701 Requires:       %{name}-smp = %{epoch}:%{version}-%{release}
702 Conflicts:      pcmcia-cs < %{_pcmcia_cs_ver}
703 Conflicts:      pcmciautils < %{_pcmciautils_ver}
704 Autoreqprov:    no
705
706 %description smp-pcmcia
707 PCMCIA modules for SMP kernel.
708
709 %description smp-pcmcia -l pl.UTF-8
710 ModuÅ‚y PCMCIA dla maszyn SMP.
711
712 %package smp-libs
713 Summary:        Libraries for preparing bootable SMP kernel on PowerPCs
714 Summary(pl.UTF-8):      Biblioteki do przygotowania bootowalnego jÄ…dra dla wieloprocesorowych PowerPC
715 Group:          Base/Kernel
716 Requires:       %{name}-smp = %{epoch}:%{version}-%{release}
717 Requires:       mkvmlinuz >= %{_mkvmlinuz_ver}
718 Autoreqprov:    no
719
720 %description smp-libs
721 Libraries for preparing bootable SMP kernel on PowerPCs. Script called
722 mkvmlinuz may be useful for this.
723
724 %description smp-libs -l pl.UTF-8
725 Biblioteki do przygotowania bootowalnego jÄ…dra dla wieloprocesorowych
726 PowerPC. Skrypt mkvmlinuz może być do tego przydatny.
727
728 %package smp-sound-alsa
729 Summary:        ALSA SMP kernel modules
730 Summary(pl.UTF-8):      Sterowniki dźwiÄ™ku ALSA dla maszyn wieloprocesorowych
731 Group:          Base/Kernel
732 Requires(postun):       %{name}-smp = %{epoch}:%{version}-%{release}
733 Requires:       %{name}-smp = %{epoch}:%{version}-%{release}
734 Autoreqprov:    no
735
736 %description smp-sound-alsa
737 ALSA (Advanced Linux Sound Architecture) SMP sound drivers.
738
739 %description smp-sound-alsa -l pl.UTF-8
740 Sterowniki dźwiÄ™ku ALSA (Advanced Linux Sound Architecture) dla maszyn
741 wieloprocesorowych.
742
743 %package smp-sound-oss
744 Summary:        OSS SMP kernel modules
745 Summary(pl.UTF-8):      Sterowniki dźwiÄ™ku OSS dla maszyn wieloprocesorowych
746 Group:          Base/Kernel
747 Requires(postun):       %{name}-smp = %{epoch}:%{version}-%{release}
748 Requires:       %{name}-smp = %{epoch}:%{version}-%{release}
749 Autoreqprov:    no
750
751 %description smp-sound-oss
752 OSS (Open Sound System) SMP sound drivers.
753
754 %description smp-sound-oss -l pl.UTF-8
755 Sterowniki OSS (Open Sound System) dla maszyn wieloprocesorowych.
756
757 %package headers
758 Summary:        Header files for the Linux kernel
759 Summary(pl.UTF-8):      Pliki nagłówkowe jÄ…dra Linuksa
760 Group:          Development/Building
761 Provides:       %{name}-headers(netfilter) = %{netfilter_snap}
762 Autoreqprov:    no
763
764 %description headers
765 These are the C header files for the Linux kernel, which define
766 structures and constants that are needed when rebuilding the kernel or
767 building kernel modules.
768
769 %description headers -l pl.UTF-8
770 Pakiet zawiera pliki nagłówkowe jÄ…dra, niezbÄ™dne do rekompilacji jÄ…dra
771 oraz budowania modułów jÄ…dra.
772
773 %package module-build
774 Summary:        Development files for building kernel modules
775 Summary(pl.UTF-8):      Pliki sÅ‚użące do budowania modułów jÄ…dra
776 Group:          Development/Building
777 Requires:       %{name}-headers = %{epoch}:%{version}-%{release}
778 Conflicts:      rpmbuild(macros) < 1.321
779 Autoreqprov:    no
780
781 %description module-build
782 Development files from kernel source tree needed to build Linux kernel
783 modules from external packages.
784
785 %description module-build -l pl.UTF-8
786 Pliki ze drzewa ÅºródeÅ‚ jÄ…dra potrzebne do budowania modułów jÄ…dra
787 Linuksa z zewnÄ™trznych pakietów.
788
789 %package source
790 Summary:        Kernel source tree
791 Summary(pl.UTF-8):      Kod ÅºródÅ‚owy jÄ…dra Linuksa
792 Group:          Development/Building
793 Requires:       %{name}-module-build = %{epoch}:%{version}-%{release}
794 Autoreqprov:    no
795
796 %description source
797 This is the source code for the Linux kernel. You can build a custom
798 kernel that is better tuned to your particular hardware.
799
800 %description source -l de.UTF-8
801 Das Kernel-Source-Paket enthält den source code (C/Assembler-Code) des
802 Linux-Kernels. Die Source-Dateien werden gebraucht, um viele
803 C-Programme zu compilieren, da sie auf Konstanten zurückgreifen, die
804 im Kernel-Source definiert sind. Die Source-Dateien können auch
805 benutzt werden, um einen Kernel zu compilieren, der besser auf Ihre
806 Hardware ausgerichtet ist.
807
808 %description source -l fr.UTF-8
809 Le package pour le kernel-source contient le code source pour le noyau
810 linux. Ces sources sont nécessaires pour compiler la plupart des
811 programmes C, car il dépend de constantes définies dans le code
812 source. Les sources peuvent Ãªtre aussi utilisée pour compiler un noyau
813 personnalisé pour avoir de meilleures performances sur des matériels
814 particuliers.
815
816 %description source -l pl.UTF-8
817 Pakiet zawiera kod ÅºródÅ‚owy jÄ…dra systemu.
818
819 %package doc
820 Summary:        Kernel documentation
821 Summary(pl.UTF-8):      Dokumentacja do jÄ…dra Linuksa
822 Group:          Documentation
823 Autoreqprov:    no
824
825 %description doc
826 This is the documentation for the Linux kernel, as found in
827 /usr/src/linux/Documentation directory.
828
829 %description doc -l pl.UTF-8
830 Pakiet zawiera dokumentacjÄ™ do jÄ…dra Linuksa pochodzÄ…cÄ… z katalogu
831 /usr/src/linux/Documentation.
832
833 %prep
834 %setup -q -n linux-%{_basever} -a10
835 %{__bzip2} -dc %{SOURCE3} | patch -p1 -s
836
837 %ifarch ppc
838 install %{SOURCE5} Makefile.ppclibs
839 %endif
840
841 %patch1 -p1
842
843 %patch72 -p0
844 for i in suspend2-%{suspend_version}-for-2.6.16.9/[0-9]*; do
845 patch -p1 -s < $i
846 done
847 rm -rf suspend2-%{suspend_version}-for-2.6.16.9
848
849 %patch70 -p1
850 %patch71 -p1
851
852 # reiserfs4
853 %if %{with reiserfs4}
854 %{__gzip} -dc %{SOURCE12} | %{__patch} -s -p1
855 %endif
856
857 %patch2 -p1
858
859 %patch8 -p1
860 %if %{with bootsplash}
861 %patch3 -p1
862 %else
863 %patch4 -p1
864 %endif
865
866 %ifarch %{ix86}
867 %{?with_vesafb_tng:%patch5 -p1}
868 %endif
869
870 %patch6 -p1
871
872 %patch7 -p1
873 %patch9 -p1
874
875 ## netfilter
876 # submitted
877
878 # base
879 %patch10 -p1
880 %patch11 -p1
881 %patch12 -p1
882 %patch13 -p1
883 %patch14 -p1
884 %patch15 -p1
885 %patch16 -p1
886 %patch17 -p1
887 %patch18 -p1
888 %patch19 -p1
889 %patch20 -p1
890 %patch21 -p1
891 %patch22 -p1
892
893 ## extra
894 %patch30 -p1
895 %patch31 -p1
896 %patch32 -p1
897 %patch33 -p1
898 %patch34 -p1
899 %patch35 -p1
900 %patch36 -p1
901 %patch37 -p1
902 %patch38 -p1
903
904 ##
905 # end of netfilter
906
907 %if %{with abi}
908 %patch40 -p1
909 %endif
910
911 %patch49 -p1
912
913 %patch50 -p1
914
915 %patch51 -p1
916
917 %patch53 -p1
918
919 %patch54 -p1
920
921 %patch55 -p1
922 %patch56 -p1
923
924
925 %ifarch %{ix86} %{x8664} ia64
926 %patch57 -p1
927 %endif
928
929 %patch60 -p1
930
931 %patch80 -p1
932
933 %patch81 -p1
934 %patch82 -p1
935 %ifnarch sparc64
936 %patch83 -p1
937 %endif
938
939 %patch90 -p1
940 %patch91 -p1
941 %patch92 -p1
942
943 %patch100 -p1
944 %patch101 -p1
945 %patch102 -p1
946 %patch103 -p1
947 %patch104 -p1
948
949 %if %{with xen0} || %{with xenU}
950 %ifarch %{ix86} %{x8664} ia64
951 %patch120 -p1
952 %patch121 -p1
953 %endif
954 %endif
955
956 %patch140 -p1
957
958 %ifarch ppc ppc64
959 %patch200 -p1
960 %endif
961 %ifarch %{x8664}
962 %patch201 -p1
963 %endif
964 %ifarch ppc ppc64 %{ix86} %{x8664}
965 %patch202 -p1
966 %endif
967
968 %patch250 -p1
969 %patch251 -p1
970
971 %patch252 -p1
972 %patch256 -p1
973
974 # security patches
975
976 %patch1200 -p1
977 %patch1201 -p1
978
979 %if %{with grsec_minimal}
980 %patch1000 -p1
981 %endif
982 %if %{with grsec_full}
983 %patch9999 -p1
984 %patch10000 -p1
985 %endif
986
987 %if %{with pax}
988 %patch9999 -p1
989 %patch10000 -p1
990 %endif
991
992 %if %{with grsecurity}
993 %patch1001 -p1
994 %endif
995
996 # Fix EXTRAVERSION in main Makefile
997 sed -i 's#EXTRAVERSION =.*#EXTRAVERSION = %{_postver}%{?alt_kernel:_%{alt_kernel}}#g' Makefile
998
999 # on sparc this line causes CONFIG_INPUT=m (instead of =y), thus breaking build
1000 sed -i -e '/select INPUT/d' net/bluetooth/hidp/Kconfig
1001
1002 # cleanup backups after patching
1003 find '(' -name '*~' -o -name '*.orig' -o -name '.gitignore' ')' -print0 | xargs -0 -r -l512 rm -f
1004
1005 %build
1006 TuneUpConfigForIX86 () {
1007 %ifarch %{ix86}
1008         pae=
1009         [ "$2" = "yes" ] && pae=yes
1010         %if %{with pae}
1011         pae=yes
1012         %endif
1013         %ifnarch i386
1014         sed -i 's:CONFIG_M386=y:# CONFIG_M386 is not set:' $1
1015         %endif
1016         %ifarch i486
1017         sed -i 's:# CONFIG_M486 is not set:CONFIG_M486=y:' $1
1018         %endif
1019         %ifarch i586
1020         sed -i 's:# CONFIG_M586 is not set:CONFIG_M586=y:' $1
1021         %endif
1022         %ifarch i686
1023         sed -i 's:# CONFIG_M686 is not set:CONFIG_M686=y:' $1
1024         %endif
1025         %ifarch pentium3
1026         sed -i 's:# CONFIG_MPENTIUMIII is not set:CONFIG_MPENTIUMIII=y:' $1
1027         %endif
1028         %ifarch pentium4
1029         sed -i 's:# CONFIG_MPENTIUM4 is not set:CONFIG_MPENTIUM4=y:' $1
1030         %endif
1031         %ifarch athlon
1032         sed -i 's:# CONFIG_MK7 is not set:CONFIG_MK7=y:' $1
1033         %endif
1034         %ifarch i686 athlon pentium3 pentium4
1035         if [ "$pae" = "yes" ]; then
1036                 sed -i "s:CONFIG_HIGHMEM4G=y:# CONFIG_HIGHMEM4G is not set:" $1
1037                 sed -i "s:# CONFIG_HIGHMEM64G is not set:CONFIG_HIGHMEM64G=y\nCONFIG_X86_PAE=y:" $1
1038         fi
1039         sed -i 's:CONFIG_MATH_EMULATION=y:# CONFIG_MATH_EMULATION is not set:' $1
1040         %endif
1041         return 0
1042 %endif
1043 }
1044
1045 BuildConfig() {
1046         %{?debug:set -x}
1047         # is this a special kernel we want to build?
1048         smp=
1049         [ "$1" = "smp" -o "$2" = "smp" ] && smp=yes
1050         if [ "$smp" = "yes" ]; then
1051                 Config="%{_target_base_arch}-smp"
1052         else
1053                 Config="%{_target_base_arch}"
1054         fi
1055         KernelVer=%{kernel_release}$1
1056
1057         echo "Building config file [using $Config.conf] for KERNEL $1..."
1058         cat $RPM_SOURCE_DIR/kernel-$Config.config > arch/%{_target_base_arch}/defconfig
1059
1060         TuneUpConfigForIX86 arch/%{_target_base_arch}/defconfig "$smp"
1061
1062 %ifarch ppc ppc64
1063         if [ "$smp" = "yes" ]; then
1064                 install %{SOURCE31} arch/%{_target_base_arch}/defconfig
1065         else
1066                 install %{SOURCE30} arch/%{_target_base_arch}/defconfig
1067         fi
1068 %endif
1069
1070 %ifarch ppc64
1071         sed -i "s:# CONFIG_PPC64 is not set:CONFIG_PPC64=y:" arch/%{_target_base_arch}/defconfig
1072 %endif
1073
1074         # netfilter
1075         cat %{SOURCE40} >> arch/%{_target_base_arch}/defconfig
1076         # squashfs
1077         cat %{SOURCE41} >> arch/%{_target_base_arch}/defconfig
1078         # suspend2
1079         cat %{SOURCE42} >> arch/%{_target_base_arch}/defconfig
1080 %ifarch ppc ppc64
1081         sed -i "s:CONFIG_SUSPEND2=y:# CONFIG_SUSPEND2 is not set:" arch/%{_target_base_arch}/defconfig
1082 %endif
1083         # vserver
1084         cat %{SOURCE43} >> arch/%{_target_base_arch}/defconfig
1085         # vesafb-tng
1086         cat %{SOURCE44} >> arch/%{_target_base_arch}/defconfig
1087
1088 %if %{with grsecurity}
1089         %if %{with pax}
1090                 cat %{SOURCE49} >> arch/%{_target_base_arch}/defconfig
1091         %else
1092                 cat %{SOURCE45} >> arch/%{_target_base_arch}/defconfig
1093         %endif
1094 %endif
1095
1096         # IPSEC KLIPS
1097         cat %{SOURCE50} >> arch/%{_target_base_arch}/defconfig
1098
1099 %if %{with abi}
1100         cat %{SOURCE51} >> arch/%{_target_base_arch}/defconfig
1101 %endif
1102
1103 %if %{with xen0} || %{with xenU}
1104         sed -i "s:CONFIG_X86_PC=y:# CONFIG_X86_PC is not set:" arch/%{_target_base_arch}/defconfig
1105         sed -i "s:CONFIG_RIO=[ym]:# CONFIG_RIO is not set:" arch/%{_target_base_arch}/defconfig
1106
1107         # framebuffer devices generally don't work with xen
1108         # and kernel will crash on boot if vesafb-tng is compiled in (even if off by default)
1109         sed -i "s:CONFIG_FB=y:# CONFIG_FB is not set:" arch/%{_target_base_arch}/defconfig
1110
1111         cat %{SOURCE48} >> arch/%{_target_base_arch}/defconfig
1112 %endif
1113
1114 %if %{with xen0}
1115         cat %{SOURCE46} >> arch/%{_target_base_arch}/defconfig
1116 %endif
1117
1118 %if %{with xenU}
1119         cat %{SOURCE47} >> arch/%{_target_base_arch}/defconfig
1120 %endif
1121
1122         # fbsplash
1123         echo "CONFIG_FB_SPLASH=y" >> arch/%{_target_base_arch}/defconfig
1124         # bootsplash
1125         echo "CONFIG_BOOTSPLASH=y" >> arch/%{_target_base_arch}/defconfig
1126
1127 %if %{with nfsroot}
1128         sed -i "s:CONFIG_NFS_FS=m:CONFIG_NFS_FS=y:" arch/%{_target_base_arch}/defconfig
1129         echo "CONFIG_ROOT_NFS=y" >> arch/%{_target_base_arch}/defconfig
1130 %endif
1131
1132 %if %{with ext2compiled}
1133         sed -i 's,CONFIG_EXT2_FS=m,CONFIG_EXT2_FS=y,' arch/%{_target_base_arch}/defconfig
1134 %endif
1135
1136 %{?debug:sed -i "s:# CONFIG_DEBUG_SLAB is not set:CONFIG_DEBUG_SLAB=y:" arch/%{_target_base_arch}/defconfig}
1137 %{?debug:sed -i "s:# CONFIG_DEBUG_PREEMPT is not set:CONFIG_DEBUG_PREEMPT=y:" arch/%{_target_base_arch}/defconfig}
1138 %{?debug:sed -i "s:# CONFIG_RT_DEADLOCK_DETECT is not set:CONFIG_RT_DEADLOCK_DETECT=y:" arch/%{_target_base_arch}/defconfig}
1139
1140         if [ "$smp" = "yes" ]; then
1141                 sed -e 's:CONFIG_LOCALVERSION="":CONFIG_LOCALVERSION="smp":'    \
1142                         -i arch/%{_target_base_arch}/defconfig
1143         fi
1144
1145         ln -sf arch/%{_target_base_arch}/defconfig .config
1146         install -d $KERNEL_INSTALL_DIR%{_kernelsrcdir}/include/linux
1147         rm -f include/linux/autoconf.h
1148         %{__make} %CrossOpts include/linux/autoconf.h
1149         if [ "$smp" = "yes" ]; then
1150                 install include/linux/autoconf.h \
1151                         $KERNEL_INSTALL_DIR%{_kernelsrcdir}/include/linux/autoconf-smp.h
1152                 install .config \
1153                         $KERNEL_INSTALL_DIR%{_kernelsrcdir}/config-smp
1154         else
1155                 install include/linux/autoconf.h \
1156                         $KERNEL_INSTALL_DIR%{_kernelsrcdir}/include/linux/autoconf-up.h
1157                 install .config \
1158                         $KERNEL_INSTALL_DIR%{_kernelsrcdir}/config-up
1159         fi
1160 }
1161
1162 BuildKernel() {
1163         %{?debug:set -x}
1164         echo "Building kernel${1:+ $1}..."
1165         %{__make} %CrossOpts mrproper \
1166                 RCS_FIND_IGNORE='-name build-done -prune -o'
1167         ln -sf arch/%{_target_base_arch}/defconfig .config
1168
1169 %ifarch sparc
1170         sparc32 %{__make} clean \
1171                 RCS_FIND_IGNORE='-name build-done -prune -o'
1172 %else
1173         %{__make} %CrossOpts clean \
1174                 RCS_FIND_IGNORE='-name build-done -prune -o'
1175 %endif
1176         %{__make} %CrossOpts include/linux/version.h \
1177                 %{?with_verbose:V=1}
1178
1179 # make does vmlinux, modules and bzImage at once
1180 %ifarch sparc sparc64
1181 %ifarch sparc64
1182         %{__make} %CrossOpts image \
1183                 %{?with_verbose:V=1}
1184
1185         %{__make} %CrossOpts modules \
1186                 %{?with_verbose:V=1}
1187 %else
1188         sparc32 %{__make} \
1189                 %{?with_verbose:V=1}
1190 %endif
1191 %else
1192         %{__make} %CrossOpts \
1193 %if %{with xen0} || %{with xenU}
1194                 SHELL=/bin/bash \
1195 %endif
1196                 %{?with_verbose:V=1}
1197 %endif
1198 }
1199
1200 PreInstallKernel() {
1201         smp=
1202         [ "$1" = "smp" -o "$2" = "smp" ] && smp=yes
1203         if [ "$smp" = "yes" ]; then
1204                 Config="%{_target_base_arch}-smp"
1205         else
1206                 Config="%{_target_base_arch}"
1207         fi
1208         KernelVer=%{kernel_release}$1
1209
1210         mkdir -p $KERNEL_INSTALL_DIR/boot
1211         install System.map $KERNEL_INSTALL_DIR/boot/System.map-$KernelVer
1212 %ifarch %{ix86} %{x8664}
1213 %if %{with xen0} || %{with xenU}
1214         install vmlinuz $KERNEL_INSTALL_DIR/boot/vmlinuz-$KernelVer
1215 %else
1216         install arch/%{_target_base_arch}/boot/bzImage $KERNEL_INSTALL_DIR/boot/vmlinuz-$KernelVer
1217 %endif
1218         install vmlinux $KERNEL_INSTALL_DIR/boot/vmlinux-$KernelVer
1219 %endif
1220 %ifarch alpha sparc sparc64
1221         gzip -cfv vmlinux > vmlinuz
1222         install vmlinux $KERNEL_INSTALL_DIR/boot/vmlinux-$KernelVer
1223         install vmlinuz $KERNEL_INSTALL_DIR/boot/vmlinuz-$KernelVer
1224 %ifarch sparc
1225         elftoaout arch/sparc/boot/image -o vmlinux.aout
1226         install vmlinux.aout $KERNEL_INSTALL_DIR/boot/vmlinux.aout-$KernelVer
1227 %endif
1228 %ifarch sparc64
1229         elftoaout arch/sparc64/boot/image -o vmlinux.aout
1230         install vmlinux.aout $KERNEL_INSTALL_DIR/boot/vmlinux.aout-$KernelVer
1231 %endif
1232 %endif
1233 %ifarch ppc ppc64
1234         install vmlinux $KERNEL_INSTALL_DIR/boot/vmlinux-$KernelVer
1235         install vmlinux $KERNEL_INSTALL_DIR/boot/vmlinuz-$KernelVer
1236 %endif
1237 %ifarch ppc-broken
1238         %{__make} -f Makefile.ppclibs install \
1239                 DESTDIR=$KERNEL_INSTALL_DIR/boot/libs-$KernelVer
1240 %endif
1241 %ifarch ia64
1242         gzip -cfv vmlinux > vmlinuz
1243         install -d $KERNEL_INSTALL_DIR/boot/efi
1244         install vmlinuz $KERNEL_INSTALL_DIR/boot/efi/vmlinuz-$KernelVer
1245         ln -sf efi/vmlinuz-$KernelVer $KERNEL_INSTALL_DIR/boot/vmlinuz-$KernelVer
1246 %endif
1247         %{__make} %CrossOpts modules_install \
1248                 %{?with_verbose:V=1} \
1249                 DEPMOD=%DepMod \
1250                 INSTALL_MOD_PATH=$KERNEL_INSTALL_DIR \
1251                 KERNELRELEASE=$KernelVer
1252
1253         if [ "$smp" = "yes" ]; then
1254                 install Module.symvers \
1255                         $KERNEL_INSTALL_DIR%{_kernelsrcdir}/Module.symvers-smp
1256         else
1257                 install Module.symvers \
1258                         $KERNEL_INSTALL_DIR%{_kernelsrcdir}/Module.symvers-up
1259         fi
1260
1261         echo "CHECKING DEPENDENCIES FOR KERNEL MODULES"
1262         if [ %DepMod = /sbin/depmod ]; then
1263                 /sbin/depmod --basedir $KERNEL_INSTALL_DIR -ae -F $KERNEL_INSTALL_DIR/boot/System.map-$KernelVer -r $KernelVer || :
1264         else
1265                 touch $KERNEL_INSTALL_DIR/lib/modules/$KernelVer/modules.dep
1266         fi
1267         echo "KERNEL RELEASE $KernelVer DONE"
1268 }
1269
1270 KERNEL_BUILD_DIR=`pwd`
1271 echo "-%{_localversion}" > localversion
1272
1273 #install -m 644 %{SOURCE50} FAQ-pl
1274
1275 # UP KERNEL
1276 KERNEL_INSTALL_DIR="$KERNEL_BUILD_DIR/build-done/kernel-UP"
1277 rm -rf $KERNEL_INSTALL_DIR
1278 BuildConfig
1279 %if %{with up}
1280 BuildKernel
1281 PreInstallKernel
1282 %endif
1283
1284 # SMP KERNEL
1285 KERNEL_INSTALL_DIR="$KERNEL_BUILD_DIR/build-done/kernel-SMP"
1286 rm -rf $KERNEL_INSTALL_DIR
1287 BuildConfig smp
1288 %if %{with smp}
1289 BuildKernel smp
1290 PreInstallKernel smp
1291 %endif
1292
1293 %install
1294 rm -rf $RPM_BUILD_ROOT
1295 install -d $RPM_BUILD_ROOT
1296
1297 umask 022
1298 # test if we can hardlink -- %{_builddir} and $RPM_BUILD_ROOT on same partition
1299 if cp -al COPYING $RPM_BUILD_ROOT/COPYING 2>/dev/null; then
1300         l=l
1301         rm -f $RPM_BUILD_ROOT/COPYING
1302 fi
1303
1304 export DEPMOD=%DepMod
1305
1306 install -d $RPM_BUILD_ROOT%{_kernelsrcdir}
1307 install -d $RPM_BUILD_ROOT%{_sysconfdir}/modprobe.d/%{kernel_release}{,smp}
1308
1309 KERNEL_BUILD_DIR=`pwd`
1310
1311 %if %{with up} || %{with smp}
1312 cp -a$l $KERNEL_BUILD_DIR/build-done/kernel-*/* $RPM_BUILD_ROOT
1313 %endif
1314
1315 for i in "" smp ; do
1316         if [ -e  $RPM_BUILD_ROOT/lib/modules/%{kernel_release}$i ] ; then
1317                 rm -f $RPM_BUILD_ROOT/lib/modules/%{kernel_release}$i/build
1318                 ln -sf %{_kernelsrcdir} \
1319                         $RPM_BUILD_ROOT/lib/modules/%{kernel_release}$i/build
1320                 install -d $RPM_BUILD_ROOT/lib/modules/%{kernel_release}$i/{cluster,misc}
1321         fi
1322 done
1323
1324 find . -maxdepth 1 ! -name "build-done" ! -name "." -exec cp -a$l "{}" "$RPM_BUILD_ROOT%{_kernelsrcdir}/" ";"
1325
1326 cd $RPM_BUILD_ROOT%{_kernelsrcdir}
1327
1328 %{__make} %CrossOpts mrproper \
1329         RCS_FIND_IGNORE='-name build-done -prune -o'
1330
1331 if [ -e $KERNEL_BUILD_DIR/build-done/kernel-UP%{_kernelsrcdir}/include/linux/autoconf-up.h ]; then
1332 install $KERNEL_BUILD_DIR/build-done/kernel-UP%{_kernelsrcdir}/include/linux/autoconf-up.h \
1333         $RPM_BUILD_ROOT%{_kernelsrcdir}/include/linux
1334 install $KERNEL_BUILD_DIR/build-done/kernel-UP%{_kernelsrcdir}/config-up \
1335         $RPM_BUILD_ROOT%{_kernelsrcdir}
1336 fi
1337
1338 if [ -e $KERNEL_BUILD_DIR/build-done/kernel-SMP%{_kernelsrcdir}/include/linux/autoconf-smp.h ]; then
1339 install $KERNEL_BUILD_DIR/build-done/kernel-SMP%{_kernelsrcdir}/include/linux/autoconf-smp.h \
1340         $RPM_BUILD_ROOT%{_kernelsrcdir}/include/linux
1341 install $KERNEL_BUILD_DIR/build-done/kernel-SMP%{_kernelsrcdir}/config-smp \
1342         $RPM_BUILD_ROOT%{_kernelsrcdir}
1343 fi
1344
1345 %if %{with up} || %{with smp}
1346 # UP or SMP
1347 install $KERNEL_BUILD_DIR/build-done/kernel-*%{_kernelsrcdir}/include/linux/* \
1348         $RPM_BUILD_ROOT%{_kernelsrcdir}/include/linux
1349 %endif
1350
1351 %{__make} %CrossOpts mrproper
1352 %{__make} %CrossOpts include/linux/version.h
1353 install %{SOURCE1} $RPM_BUILD_ROOT%{_kernelsrcdir}/include/linux/autoconf.h
1354 install %{SOURCE2} $RPM_BUILD_ROOT%{_kernelsrcdir}/include/linux/config.h
1355
1356 # collect module-build files and directories
1357 perl %{SOURCE7} %{_kernelsrcdir} $KERNEL_BUILD_DIR
1358
1359 %if %{with up} || %{with smp}
1360 # ghosted initrd
1361 touch $RPM_BUILD_ROOT/boot/initrd-%{kernel_release}{,smp}.gz
1362 install -d $RPM_BUILD_ROOT/lib/modules/%{kernel_release}{,smp}
1363 rm -f $RPM_BUILD_ROOT/lib/modules/%{kernel_release}{,smp}/{build,source}
1364 touch $RPM_BUILD_ROOT/lib/modules/%{kernel_release}{,smp}/{build,source}
1365 %endif
1366
1367 %clean
1368 rm -rf $RPM_BUILD_ROOT
1369
1370 %preun
1371 if [ -x /sbin/new-kernel-pkg ]; then
1372         /sbin/new-kernel-pkg --remove %{kernel_release}
1373 fi
1374
1375 %post
1376 %ifarch ia64
1377 mv -f /boot/efi/vmlinuz%{dashxen} /boot/efi/vmlinuz%{dashxen}.old 2> /dev/null > /dev/null
1378 %endif
1379 mv -f /boot/vmlinuz%{dashxen} /boot/vmlinuz%{dashxen}.old 2> /dev/null > /dev/null
1380 mv -f /boot/System.map%{dashxen} /boot/System.map%{dashxen}.old 2> /dev/null > /dev/null
1381 %ifarch ia64
1382 ln -sf vmlinuz-%{kernel_release} /boot/efi/vmlinuz%{dashxen}
1383 %endif
1384 ln -sf vmlinuz-%{kernel_release} /boot/vmlinuz%{dashxen}
1385 ln -sf System.map-%{kernel_release} /boot/System.map%{dashxen}
1386
1387 %depmod %{kernel_release}
1388
1389 %if %{without xenU}
1390 /sbin/geninitrd -f --initrdfs=rom %{initrd_dir}/initrd-%{kernel_release}.gz %{kernel_release}
1391 mv -f %{initrd_dir}/initrd%{dashxen} %{initrd_dir}/initrd%{dashxen}.old 2> /dev/null > /dev/null
1392 ln -sf initrd-%{kernel_release}.gz %{initrd_dir}/initrd%{dashxen}
1393
1394 if [ -x /sbin/new-kernel-pkg ]; then
1395         if [ -f /etc/pld-release ]; then
1396                 title=$(sed 's/^[0-9.]\+ //' < /etc/pld-release)
1397         else
1398                 title='PLD Linux'
1399         fi
1400
1401         ext='%{?with_pax:pax}%{?with_grsec_full:grsecurity}%{?with_xen0:Xen0}%{?with_xenU:XenU}'
1402         if [ "$ext" ]; then
1403                 title="$title $ext"
1404         fi
1405
1406         /sbin/new-kernel-pkg --initrdfile=%{initrd_dir}/initrd-%{kernel_release}.gz --install %{kernel_release} --banner "$title"
1407 elif [ -x /sbin/rc-boot ]; then
1408         /sbin/rc-boot 1>&2 || :
1409 fi
1410 %endif
1411
1412 %post vmlinux
1413 mv -f /boot/vmlinux%{dashxen} /boot/vmlinux%{dashxen}.old 2> /dev/null > /dev/null
1414 ln -sf vmlinux-%{kernel_release} /boot/vmlinux%{dashxen}
1415
1416 %post libs
1417 %{_sbindir}/mkvmlinuz /boot/zImage-%{version}-%{release} %{version}-%{release}
1418
1419 %post drm
1420 %depmod %{kernel_release}
1421
1422 %postun drm
1423 %depmod %{kernel_release}
1424
1425 %post pcmcia
1426 %depmod %{kernel_release}
1427
1428 %postun pcmcia
1429 %depmod %{kernel_release}
1430
1431 %post sound-alsa
1432 %depmod %{kernel_release}
1433
1434 %postun sound-alsa
1435 %depmod %{kernel_release}
1436
1437 %post sound-oss
1438 %depmod %{kernel_release}
1439
1440 %postun sound-oss
1441 %depmod %{kernel_release}
1442
1443 %preun smp
1444 if [ -x /sbin/new-kernel-pkg ]; then
1445         /sbin/new-kernel-pkg --remove %{kernel_release}smp
1446 fi
1447
1448 %post smp
1449 %ifarch ia64
1450 mv -f /boot/efi/vmlinuz /boot/efi/vmlinuz.old 2> /dev/null > /dev/null
1451 %endif
1452 mv -f /boot/vmlinuz%{dashxen} /boot/vmlinuz%{dashxen}.old 2> /dev/null > /dev/null
1453 mv -f /boot/System.map%{dashxen} /boot/System.map%{dashxen}.old 2> /dev/null > /dev/null
1454 %ifarch ia64
1455 ln -sf vmlinuz-%{version}-%{release}smp /boot/efi/vmlinuz
1456 %endif
1457 ln -sf vmlinuz-%{kernel_release}smp /boot/vmlinuz%{dashxen}
1458 ln -sf System.map-%{kernel_release}smp /boot/System.map%{dashxen}
1459
1460 %depmod %{kernel_release}smp
1461
1462 %if %{without xenU}
1463 /sbin/geninitrd -f --initrdfs=rom %{initrd_dir}/initrd-%{kernel_release}smp.gz %{kernel_release}smp
1464 mv -f %{initrd_dir}/initrd%{dashxen} %{initrd_dir}/initrd%{dashxen}.old 2> /dev/null > /dev/null
1465 ln -sf initrd-%{kernel_release}smp.gz %{initrd_dir}/initrd%{dashxen}
1466
1467 if [ -x /sbin/new-kernel-pkg ]; then
1468         if [ -f /etc/pld-release ]; then
1469                 title=$(sed 's/^[0-9.]\+ //' < /etc/pld-release)
1470         else
1471                 title='PLD Linux'
1472         fi
1473
1474         ext='%{?with_pax:pax}%{?with_grsec_full:grsecurity}%{?with_xen0:Xen0}%{?with_xenU:XenU}'
1475         if [ "$ext" ]; then
1476                 title="$title $ext"
1477         fi
1478
1479         /sbin/new-kernel-pkg --initrdfile=%{initrd_dir}/initrd-%{kernel_release}smp.gz --install %{kernel_release}smp --banner "$title"
1480 elif [ -x /sbin/rc-boot ]; then
1481         /sbin/rc-boot 1>&2 || :
1482 fi
1483 %endif
1484
1485 %post smp-vmlinux
1486 mv -f /boot/vmlinux%{dashxen} /boot/vmlinux%{dashxen}.old 2> /dev/null > /dev/null
1487 ln -sf vmlinux-%{kernel_release}smp /boot/vmlinux%{dashxen}
1488
1489 %post smp-libs
1490 %{_sbindir}/mkvmlinuz /boot/zImage-%{version}-%{release}smp %{version}-%{release}smp
1491
1492 %post smp-drm
1493 %depmod %{kernel_release}smp
1494
1495 %postun smp-drm
1496 %depmod %{kernel_release}smp
1497
1498 %post smp-pcmcia
1499 %depmod %{kernel_release}smp
1500
1501 %postun smp-pcmcia
1502 %depmod %{kernel_release}smp
1503
1504 %post smp-sound-alsa
1505 %depmod %{kernel_release}smp
1506
1507 %postun smp-sound-alsa
1508 %depmod %{kernel_release}smp
1509
1510 %post smp-sound-oss
1511 %depmod %{kernel_release}smp
1512
1513 %postun smp-sound-oss
1514 %depmod %{kernel_release}smp
1515
1516 %post headers
1517 ln -snf %{basename:%{_kernelsrcdir}} %{_prefix}/src/linux%{_alt_kernel}
1518
1519 %postun headers
1520 if [ "$1" = "0" ]; then
1521         if [ -L %{_prefix}/src/linux%{_alt_kernel} ]; then
1522                 if [ "$(readlink %{_prefix}/src/linux%{_alt_kernel})" = "linux%{_alt_kernel}-%{version}" ]; then
1523                         rm -f %{_prefix}/src/linux%{_alt_kernel}
1524                 fi
1525         fi
1526 fi
1527
1528 %triggerin module-build -- %{name} = %{epoch}:%{version}-%{release}
1529 ln -sfn %{_kernelsrcdir} /lib/modules/%{kernel_release}/build
1530 ln -sfn %{_kernelsrcdir} /lib/modules/%{kernel_release}/source
1531
1532 %triggerun module-build -- %{name} = %{epoch}:%{version}-%{release}
1533 if [ "$1" = 0 ]; then
1534         rm -f /lib/modules/%{kernel_release}/{build,source}
1535 fi
1536
1537 %triggerin module-build -- %{name}-smp = %{epoch}:%{version}-%{release}
1538 ln -sfn %{_kernelsrcdir} /lib/modules/%{kernel_release}smp/build
1539 ln -sfn %{_kernelsrcdir} /lib/modules/%{kernel_release}smp/source
1540
1541 %triggerun module-build -- %{name}-smp = %{epoch}:%{version}-%{release}
1542 if [ "$1" = 0 ]; then
1543         rm -f /lib/modules/%{kernel_release}smp/{build,source}
1544 fi
1545
1546 %if %{with up}
1547 %files
1548 %defattr(644,root,root,755)
1549 #doc FAQ-pl
1550 %ifarch sparc sparc64
1551 /boot/vmlinux.aout-%{kernel_release}
1552 %endif
1553 %ifarch ia64
1554 /boot/efi/vmlinuz-%{kernel_release}
1555 %endif
1556 /boot/vmlinuz-%{kernel_release}
1557 /boot/System.map-%{kernel_release}
1558 %ghost /boot/initrd-%{kernel_release}.gz
1559 %dir /lib/modules/%{kernel_release}
1560 %dir /lib/modules/%{kernel_release}/kernel
1561 %ifnarch sparc
1562 /lib/modules/%{kernel_release}/kernel/arch
1563 %endif
1564 /lib/modules/%{kernel_release}/kernel/crypto
1565 /lib/modules/%{kernel_release}/kernel/drivers
1566 %if %{have_drm}
1567 %exclude /lib/modules/%{kernel_release}/kernel/drivers/char/drm
1568 %endif
1569 %if %{have_oss} && %{have_isa} && %{without xen0} && %{without xenU}
1570 %exclude /lib/modules/%{kernel_release}/kernel/drivers/media/radio/miropcm20.ko*
1571 %endif
1572 /lib/modules/%{kernel_release}/kernel/fs
1573 /lib/modules/%{kernel_release}/kernel/kernel
1574 /lib/modules/%{kernel_release}/kernel/lib
1575 /lib/modules/%{kernel_release}/kernel/net
1576 /lib/modules/%{kernel_release}/kernel/security
1577 %if %{have_sound}
1578 %dir /lib/modules/%{kernel_release}/kernel/sound
1579 /lib/modules/%{kernel_release}/kernel/sound/soundcore.*
1580 %endif
1581 %dir /lib/modules/%{kernel_release}/misc
1582 %if %{with pcmcia}
1583 %exclude /lib/modules/%{kernel_release}/kernel/drivers/pcmcia
1584 %exclude /lib/modules/%{kernel_release}/kernel/drivers/*/pcmcia
1585 %exclude /lib/modules/%{kernel_release}/kernel/drivers/bluetooth/*_cs.ko*
1586 %exclude /lib/modules/%{kernel_release}/kernel/drivers/ide/legacy/ide-cs.ko*
1587 %exclude /lib/modules/%{kernel_release}/kernel/drivers/isdn/hardware/avm/avm_cs.ko*
1588 %exclude /lib/modules/%{kernel_release}/kernel/drivers/net/wireless/*_cs.ko*
1589 %exclude /lib/modules/%{kernel_release}/kernel/drivers/net/wireless/hostap/hostap_cs.ko*
1590 %exclude /lib/modules/%{kernel_release}/kernel/drivers/parport/parport_cs.ko*
1591 %exclude /lib/modules/%{kernel_release}/kernel/drivers/serial/serial_cs.ko*
1592 %exclude /lib/modules/%{kernel_release}/kernel/drivers/telephony/ixj_pcmcia.ko*
1593 %exclude /lib/modules/%{kernel_release}/kernel/drivers/usb/host/sl811_cs.ko*
1594 %endif
1595 %ghost /lib/modules/%{kernel_release}/modules.*
1596 # symlinks pointing to kernelsrcdir
1597 %ghost /lib/modules/%{kernel_release}/build
1598 %ghost /lib/modules/%{kernel_release}/source
1599 %dir %{_sysconfdir}/modprobe.d/%{kernel_release}
1600
1601 %ifarch alpha %{ix86} %{x8664} ppc ppc64 sparc sparc64
1602 %files vmlinux
1603 %defattr(644,root,root,755)
1604 /boot/vmlinux-%{kernel_release}
1605 %endif
1606
1607 %if %{have_drm}
1608 %files drm
1609 %defattr(644,root,root,755)
1610 /lib/modules/%{kernel_release}/kernel/drivers/char/drm
1611 %endif
1612
1613 %if %{with pcmcia}
1614 %files pcmcia
1615 %defattr(644,root,root,755)
1616 /lib/modules/%{kernel_release}/kernel/drivers/pcmcia
1617 /lib/modules/%{kernel_release}/kernel/drivers/*/pcmcia
1618 /lib/modules/%{kernel_release}/kernel/drivers/bluetooth/*_cs.ko*
1619 /lib/modules/%{kernel_release}/kernel/drivers/ide/legacy/ide-cs.ko*
1620 /lib/modules/%{kernel_release}/kernel/drivers/isdn/hardware/avm/avm_cs.ko*
1621 /lib/modules/%{kernel_release}/kernel/drivers/net/wireless/*_cs.ko*
1622 /lib/modules/%{kernel_release}/kernel/drivers/net/wireless/hostap/hostap_cs.ko*
1623 /lib/modules/%{kernel_release}/kernel/drivers/parport/parport_cs.ko*
1624 /lib/modules/%{kernel_release}/kernel/drivers/serial/serial_cs.ko*
1625 /lib/modules/%{kernel_release}/kernel/drivers/telephony/ixj_pcmcia.ko*
1626 /lib/modules/%{kernel_release}/kernel/drivers/usb/host/sl811_cs.ko*
1627 %endif
1628
1629 %ifarch ppc-broken
1630 %if "%{_arch}" == "ppc"
1631 %files libs
1632 %defattr(644,root,root,755)
1633 %dir /boot/libs-%{kernel_release}
1634 /boot/libs-%{kernel_release}/common
1635 /boot/libs-%{kernel_release}/kernel
1636 /boot/libs-%{kernel_release}/lib
1637 /boot/libs-%{kernel_release}/of1275
1638 /boot/libs-%{kernel_release}/openfirmware
1639 /boot/libs-%{kernel_release}/simple
1640 %dir /boot/libs-%{kernel_release}/utils
1641 %attr(755,root,root) /boot/libs-%{kernel_release}/utils/*
1642 /boot/libs-%{kernel_release}/ld.script
1643 %endif
1644 %endif
1645
1646 %if %{have_sound}
1647 %files sound-alsa
1648 %defattr(644,root,root,755)
1649 /lib/modules/%{kernel_release}/kernel/sound
1650 %exclude %dir /lib/modules/%{kernel_release}/kernel/sound
1651 %exclude /lib/modules/%{kernel_release}/kernel/sound/soundcore.*
1652 %if %{have_oss}
1653 %exclude /lib/modules/%{kernel_release}/kernel/sound/oss
1654 %endif
1655
1656 %if %{have_oss}
1657 %files sound-oss
1658 %defattr(644,root,root,755)
1659 /lib/modules/%{kernel_release}/kernel/sound/oss
1660 %if %{have_isa} && %{without xen0} && %{without xenU}
1661 /lib/modules/%{kernel_release}/kernel/drivers/media/radio/miropcm20.ko*
1662 %endif
1663 %endif
1664 %endif                  # %%{have_sound}
1665 %endif                  # %%{with up}
1666
1667 %if %{with smp}
1668 %files smp
1669 %defattr(644,root,root,755)
1670 #doc FAQ-pl
1671 %ifarch ia64
1672 /boot/efi/vmlinuz-%{kernel_release}smp
1673 %endif
1674 /boot/vmlinuz-%{kernel_release}smp
1675 /boot/System.map-%{kernel_release}smp
1676 %ghost /boot/initrd-%{kernel_release}smp.gz
1677 %dir /lib/modules/%{kernel_release}smp
1678 %dir /lib/modules/%{kernel_release}smp/kernel
1679 %ifnarch sparc
1680 /lib/modules/%{kernel_release}smp/kernel/arch
1681 %endif
1682 /lib/modules/%{kernel_release}smp/kernel/crypto
1683 /lib/modules/%{kernel_release}smp/kernel/drivers
1684 %if %{have_drm}
1685 %exclude /lib/modules/%{kernel_release}smp/kernel/drivers/char/drm
1686 %endif
1687 %if %{have_oss} && %{have_isa} && %{without xen0} && %{without xenU}
1688 %exclude /lib/modules/%{kernel_release}smp/kernel/drivers/media/radio/miropcm20.ko*
1689 %endif
1690 /lib/modules/%{kernel_release}smp/kernel/fs
1691 /lib/modules/%{kernel_release}smp/kernel/kernel
1692 /lib/modules/%{kernel_release}smp/kernel/lib
1693 /lib/modules/%{kernel_release}smp/kernel/net
1694 /lib/modules/%{kernel_release}smp/kernel/security
1695 %if %{have_sound}
1696 %dir /lib/modules/%{kernel_release}smp/kernel/sound
1697 /lib/modules/%{kernel_release}smp/kernel/sound/soundcore.*
1698 %endif
1699 %dir /lib/modules/%{kernel_release}smp/misc
1700 %if %{with pcmcia}
1701 %exclude /lib/modules/%{kernel_release}smp/kernel/drivers/pcmcia
1702 %exclude /lib/modules/%{kernel_release}smp/kernel/drivers/*/pcmcia
1703 %exclude /lib/modules/%{kernel_release}smp/kernel/drivers/bluetooth/*_cs.ko*
1704 %exclude /lib/modules/%{kernel_release}smp/kernel/drivers/ide/legacy/ide-cs.ko*
1705 %exclude /lib/modules/%{kernel_release}smp/kernel/drivers/isdn/hardware/avm/avm_cs.ko*
1706 %exclude /lib/modules/%{kernel_release}smp/kernel/drivers/net/wireless/*_cs.ko*
1707 %exclude /lib/modules/%{kernel_release}smp/kernel/drivers/net/wireless/hostap/hostap_cs.ko*
1708 %exclude /lib/modules/%{kernel_release}smp/kernel/drivers/parport/parport_cs.ko*
1709 %exclude /lib/modules/%{kernel_release}smp/kernel/drivers/serial/serial_cs.ko*
1710 %exclude /lib/modules/%{kernel_release}smp/kernel/drivers/telephony/ixj_pcmcia.ko*
1711 %exclude /lib/modules/%{kernel_release}smp/kernel/drivers/usb/host/sl811_cs.ko*
1712 %endif
1713 %ghost /lib/modules/%{kernel_release}smp/modules.*
1714 # symlinks pointing to kernelsrcdir
1715 %ghost /lib/modules/%{kernel_release}smp/build
1716 %ghost /lib/modules/%{kernel_release}smp/source
1717 %dir %{_sysconfdir}/modprobe.d/%{kernel_release}smp
1718
1719 %ifarch alpha %{ix86} %{x8664} ppc ppc64 sparc sparc64
1720 %files smp-vmlinux
1721 %defattr(644,root,root,755)
1722 /boot/vmlinux-%{kernel_release}smp
1723 %endif
1724
1725 %if %{have_drm}
1726 %files smp-drm
1727 %defattr(644,root,root,755)
1728 /lib/modules/%{kernel_release}smp/kernel/drivers/char/drm
1729 %endif
1730
1731 %if %{with pcmcia}
1732 %files smp-pcmcia
1733 %defattr(644,root,root,755)
1734 /lib/modules/%{kernel_release}smp/kernel/drivers/pcmcia
1735 /lib/modules/%{kernel_release}smp/kernel/drivers/*/pcmcia
1736 /lib/modules/%{kernel_release}smp/kernel/drivers/bluetooth/*_cs.ko*
1737 /lib/modules/%{kernel_release}smp/kernel/drivers/ide/legacy/ide-cs.ko*
1738 /lib/modules/%{kernel_release}smp/kernel/drivers/isdn/hardware/avm/avm_cs.ko*
1739 /lib/modules/%{kernel_release}smp/kernel/drivers/net/wireless/*_cs.ko*
1740 /lib/modules/%{kernel_release}smp/kernel/drivers/net/wireless/hostap/hostap_cs.ko*
1741 /lib/modules/%{kernel_release}smp/kernel/drivers/parport/parport_cs.ko*
1742 /lib/modules/%{kernel_release}smp/kernel/drivers/serial/serial_cs.ko*
1743 /lib/modules/%{kernel_release}smp/kernel/drivers/telephony/ixj_pcmcia.ko*
1744 /lib/modules/%{kernel_release}smp/kernel/drivers/usb/host/sl811_cs.ko*
1745 %endif
1746
1747 %ifarch ppc-broken
1748 %if "%{_arch}" == "ppc"
1749 %files smp-libs
1750 %defattr(644,root,root,755)
1751 %dir /boot/libs-%{kernel_release}smp
1752 /boot/libs-%{kernel_release}smp/common
1753 /boot/libs-%{kernel_release}smp/kernel
1754 /boot/libs-%{kernel_release}smp/lib
1755 /boot/libs-%{kernel_release}smp/of1275
1756 /boot/libs-%{kernel_release}smp/openfirmware
1757 /boot/libs-%{kernel_release}smp/simple
1758 %dir /boot/libs-%{kernel_release}smp/utils
1759 %attr(755,root,root) /boot/libs-%{kernel_release}smp/utils/*
1760 /boot/libs-%{kernel_release}smp/ld.script
1761 %endif
1762 %endif
1763
1764 %if %{have_sound}
1765 %files smp-sound-alsa
1766 %defattr(644,root,root,755)
1767 /lib/modules/%{kernel_release}smp/kernel/sound
1768 %exclude %dir /lib/modules/%{kernel_release}smp/kernel/sound
1769 %exclude /lib/modules/%{kernel_release}smp/kernel/sound/soundcore.*
1770 %if %{have_oss}
1771 %exclude /lib/modules/%{kernel_release}smp/kernel/sound/oss
1772 %endif
1773
1774 %if %{have_oss}
1775 %files smp-sound-oss
1776 %defattr(644,root,root,755)
1777 /lib/modules/%{kernel_release}smp/kernel/sound/oss
1778 %if %{have_isa} && %{without xen0} && %{without xenU}
1779 /lib/modules/%{kernel_release}smp/kernel/drivers/media/radio/miropcm20.ko*
1780 %endif
1781 %endif
1782 %endif                  # %%{have_sound}
1783 %endif                  # %%{with smp}
1784
1785 %files headers
1786 %defattr(644,root,root,755)
1787 %dir %{_kernelsrcdir}
1788 %{_kernelsrcdir}/include
1789 %if %{with smp}
1790 %{_kernelsrcdir}/config-smp
1791 %{_kernelsrcdir}/Module.symvers-smp
1792 %endif
1793 %{_kernelsrcdir}/config-up
1794 %{?with_up:%{_kernelsrcdir}/Module.symvers-up}
1795
1796 %files module-build -f aux_files
1797 %defattr(644,root,root,755)
1798 %{_kernelsrcdir}/Kbuild
1799 %{_kernelsrcdir}/localversion
1800 %{_kernelsrcdir}/arch/*/kernel/asm-offsets.*
1801 %{_kernelsrcdir}/arch/*/kernel/sigframe.h
1802 %dir %{_kernelsrcdir}/scripts
1803 %dir %{_kernelsrcdir}/scripts/kconfig
1804 %{_kernelsrcdir}/scripts/Kbuild.include
1805 %{_kernelsrcdir}/scripts/Makefile*
1806 %{_kernelsrcdir}/scripts/basic
1807 %{_kernelsrcdir}/scripts/mkmakefile
1808 %{_kernelsrcdir}/scripts/mod
1809 %{_kernelsrcdir}/scripts/setlocalversion
1810 %{_kernelsrcdir}/scripts/*.c
1811 %{_kernelsrcdir}/scripts/*.sh
1812 %{_kernelsrcdir}/scripts/kconfig/*
1813
1814 %files doc
1815 %defattr(644,root,root,755)
1816 %{_kernelsrcdir}/Documentation
1817
1818 %if %{with source}
1819 %files source -f aux_files_exc
1820 %defattr(644,root,root,755)
1821 %{_kernelsrcdir}/arch/*/[!Mk]*
1822 %{_kernelsrcdir}/arch/*/kernel/[!M]*
1823 %exclude %{_kernelsrcdir}/arch/*/kernel/asm-offsets.*
1824 %exclude %{_kernelsrcdir}/arch/*/kernel/sigframe.h
1825 %if %{with abi}
1826 %{_kernelsrcdir}/abi
1827 %endif /* abi */
1828 %{_kernelsrcdir}/block
1829 %{_kernelsrcdir}/crypto
1830 %{_kernelsrcdir}/drivers
1831 %{_kernelsrcdir}/fs
1832 %if %{with grsecurity}
1833 %{_kernelsrcdir}/grsecurity
1834 %endif
1835 %{_kernelsrcdir}/init
1836 %{_kernelsrcdir}/ipc
1837 %{_kernelsrcdir}/kernel
1838 %{_kernelsrcdir}/lib
1839 %{_kernelsrcdir}/mm
1840 %{_kernelsrcdir}/net
1841 %{_kernelsrcdir}/scripts/*
1842 %exclude %{_kernelsrcdir}/scripts/Kbuild.include
1843 %exclude %{_kernelsrcdir}/scripts/Makefile*
1844 %exclude %{_kernelsrcdir}/scripts/basic
1845 %exclude %{_kernelsrcdir}/scripts/kconfig
1846 %exclude %{_kernelsrcdir}/scripts/mkmakefile
1847 %exclude %{_kernelsrcdir}/scripts/mod
1848 %exclude %{_kernelsrcdir}/scripts/setlocalversion
1849 %exclude %{_kernelsrcdir}/scripts/*.c
1850 %exclude %{_kernelsrcdir}/scripts/*.sh
1851 %{_kernelsrcdir}/sound
1852 %{_kernelsrcdir}/security
1853 %{_kernelsrcdir}/usr
1854 %{_kernelsrcdir}/COPYING
1855 %{_kernelsrcdir}/CREDITS
1856 %{_kernelsrcdir}/MAINTAINERS
1857 %{_kernelsrcdir}/README
1858 %{_kernelsrcdir}/REPORTING-BUGS
1859 %endif
This page took 0.161155 seconds and 3 git commands to generate.