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