]> git.pld-linux.org Git - packages/kernel.git/blob - kernel.spec
- use resolvesymlink (prov by rc-scripts) instead of readlink (prov by tetex 1 or...
[packages/kernel.git] / kernel.spec
1 #
2 # If you define the following as 1, only kernel, -headers and -source
3 # packages will be built
4
5 %bcond_without smp      # don't build SMP kernel
6 %bcond_without up       # don't build UP kernel
7 %bcond_without boot     # don't build BOOT kernel
8 %bcond_without source   # don't build source
9 %bcond_without doc      # don't build documentation package
10 %bcond_without grsec    # don't apply grsecurity patch
11 %bcond_without kheaders # build without support for glibc-kernel-headers
12 %bcond_with win4lin     # apply the Win4lin patches
13
14 %define         base_arch %(echo %{_target_cpu} | sed 's/i.86/i386/;s/athlon/i386/;s/amd64/x86_64/')
15 %define         no_install_post_strip   1
16 %define         no_install_post_compress_modules        1
17 #
18 %define         pre_version             %{nil}
19 %define         netfilter_snap          20031121
20 %define         i2c_version             2.8.0
21 Summary:        The Linux kernel (the core of the Linux operating system)
22 Summary(de):    Der Linux-Kernel (Kern des Linux-Betriebssystems)
23 Summary(es):    Núcleo (Kernel) linux genérico
24 Summary(fr):    Le Kernel-Linux (La partie centrale du systeme)
25 Summary(pl):    J±dro Linuksa
26 Summary(pt_BR): Kernel Linux (a parte central do sistema operacional Linux)
27 Name:           kernel
28 Version:        2.4.23
29 Release:        0.5.1
30 License:        GPL
31 Group:          Base/Kernel
32 Source0:        ftp://ftp.kernel.org/pub/linux/kernel/v2.4/linux-%{version}.tar.bz2
33 # Source0-md5:  642af5ab5e1fc63685fde85e9ae601e4
34 Source1:        %{name}-autoconf.h
35 Source2:        %{name}-BuildASM.sh
36 Source3:        http://www.garloff.de/kurt/linux/dc395/dc395-141.tar.gz
37 # Source3-md5:  8ed492197244b6a772270417c66214d3
38 Source7:        http://www10.software.ibm.com/developer/opensource/jfs/project/pub/jfs-2.4-1.1.4.tar.gz
39 # Source7-md5:  ea33c28ca1d3afa448b20f337b615b48
40 Source20:       %{name}-ia32.config
41 Source21:       %{name}-ia32-smp.config
42 Source50:       %{name}-sparc.config
43 Source51:       %{name}-sparc-smp.config
44 Source60:       %{name}-sparc64.config
45 Source61:       %{name}-sparc64-smp.config
46 Source70:       %{name}-alpha.config
47 Source71:       %{name}-alpha-smp.config
48 Source73:       %{name}-ppc.config
49 Source74:       %{name}-ppc-smp.config
50 Source1000:     %{name}-addon.config
51 Source1001:     %{name}-netfilter.config
52 Source1002:     %{name}-grsec.config
53 Source2000:     %{name}-win4lin.config
54
55 # Interesting URLs, patches:
56 # http://www.hardrock.org/kernel/current-updates/
57
58 # New features/updates/backports
59
60 # Essential stuff
61
62 Patch0:         %{name}-pldfblogo.patch
63
64 # from ftp://ftp.kernel.org/pub/linux/kernel/people/hvr/testing/
65 Patch10:        patch-cryptoloop-jari-2.4.22-rc2.0
66 # from ftp://ftp.xs4all.nl/pub/crypto/freeswan/freeswan-*
67 Patch12:        linux-2.4.21-freeswan-2.00.patch.gz
68 Patch15:        linux-2.4.23-sched-O1.patch
69 # http://dl.sourceforge.net/user-mode-linux/uml-patch-2.4.20-6.bz2
70 Patch20:        uml-patch-2.4.20-6-21.bz2
71 Patch21:        linux-2.4.21-uml-o1.patch
72 # http://dl.sourceforge.net/user-mode-linux/host-skas3.patch
73 Patch22:        linux-2.4.20-uml-host-skas3.patch
74 # http://www.kernel.org/pub/linux/kernel/people/jgarzik/libata/ (NOT APPLIED YET)
75 Patch23:        2.4.23-libata1.patch.bz2
76
77 # New filesystems
78
79 # http://linux-xfs.sgi.com/projects/xfs/
80 #Patch25:       linux-2.4.21-core-xfs-1.3.0.patch.gz
81 #Patch26:       linux-xfs-1.3.0pre5.patch.gz
82 Patch25:        linux-2.4.23-xfs-2003-11-11.patch.gz
83 # http://acl.bestbits.at/
84 Patch31:        linux-2.4.21-jfs-acl.patch
85 Patch32:        linux-2.4.22-ea+acl+nfsacl-0.8.60.diff.gz
86 # http://dl.sourceforge.net/linux-ntfs/
87 Patch40:        linux-2.4.22-ntfs-2.1.4c.patch.gz
88 # FC01_davfs_0.2.4.patch
89 Patch50:        linux-2.4.20-davfs-0.2.4.patch.bz2
90 # FC02_davfs__FUNCTION__.patch
91 Patch55:        linux-2.4.20-davfs-_FUNCTION_.patch
92 Patch60:        linux-2.4.22-data-loging+quota.patch
93 Patch61:        linux-2.4.22-acl+xattr.patch
94 # http://dl.sourceforge.net/squashfs/squashfs-1.3.tar.gz
95 Patch65:        squashfs1.3-2.4.21-patch
96 #from http://sci.felk.cvut.cz/nwd/linux/nwd-patch-2.4.19
97 Patch70:        nwd-2.4.21.patch
98 Patch80:        linux-2.4.22-intermezzo-acl.patch
99
100 # Networking
101
102 # new version of netfilter.
103 Patch100:       linux-2.4.23-netfilter-%{netfilter_snap}.patch.gz
104 Patch101:       linux-2.4.23-netfilter-IMQ-target.patch
105 # http://ebtables.sourceforge.net/
106 Patch110:       ebtables-brnf-2_vs_2.4.22.diff.gz
107 # http://trash.net/~kaber/imq/
108 Patch120:       linux-2.4.21-imq-1.diff
109 # ftp://ftp.samba.org/pub/unpacked/ppp/linux/mppe/
110 Patch125:       linux-2.4.18-mppe.patch
111 Patch130:       linux-2.4.22-tun-new-style.patch
112
113 # ATM bugfixes
114 # Patches by Chas Williams <chas@locutus.cmf.nrl.navy.mil>
115 # Included in Chas patch:
116 # http://tulipe.cnam.fr/personne/lizzi/linux/linux-2.3.99-pre6-fore200e-0.2f.tar.gz
117 # http://christophe.lizzi.free.fr/linux/linux-2.4.0-test9-fore200e-0.3.tar.gz
118 # ftp://ftp.cmf.nrl.navy.mil/pub/chas/linux-atm/
119 Patch150:       linux-2.4.21-atm_diffs.patch
120 Patch151:       ftp://ftp.cmf.nrl.navy.mil/pub/chas/linux-atm/vbr/vbr-kernel-diffs
121 Patch152:       linux-2.4.22-fore200e-0.2f.patch
122
123 # New devices/drivers
124
125 # http://people.sistina.com/~thornber/patches/2.4-stable/
126 Patch200:       linux-2.4.23-dm-3.patch
127
128 # EVMS support (http://www.sourceforge.net/projects/evms/)
129 # Disabled due to conflicts with LVM2 and device mapper tools
130 Patch205:       linux-2.4.22-evms-2.1.1.patch
131
132 #from http://dl.sourceforge.net/i810fb/linux-2.4.20-i810fb.diff.bz2
133 Patch210:       linux-2.4.21-I810FB.patch.gz
134
135 # Support for CDRW packet writing
136 Patch215:       %{name}-cdrw-packet.patch
137 Patch216:       %{name}-cd-mrw-2.patch
138 Patch225:       wrr-linux-2.4.9.patch
139 Patch226:       linux-2.4.18-esfq.diff
140 # http://l7-filter.sourceforge.net/
141 Patch227:       layer7-kernel2.4patch-v0.4.1a.patch.gz
142
143 Patch231:       linux-2.4.21-aic7xxx-mmapio.patch
144 Patch235:       linux-2.4.20-audigy.patch.bz2
145 Patch240:       linux-2.4.20-ecc.patch
146 # i2c - version 2.8.0
147 Patch255:       linux-2.4.22-i2c-%{i2c_version}.patch
148 Patch256:       linux-2.4.21-i2c-headers.patch
149 Patch257:       linux-2.4.21-i2c-sparc64.patch
150 Patch265:       linux-2.4.20-e820.patch
151 # Syntax bug
152 Patch270:       dc395-tab.patch
153 # http://www.qlogic.com/
154 Patch275:       linux-2.4.20-qla2x00-v6.04.00-fo.patch.gz
155
156 # TV stuff from http://bytesex.org/
157 Patch301:       20_v4l2-2.4.22.diff.gz
158 Patch302:       30_bt832-2.4.22.diff
159 Patch303:       30_btaudio-2.4.22.diff
160
161 # The following go last as they touch a lot of code
162 # and/or are on bcond and/or are ifarch
163
164 # Win4Lin
165 Patch900:       linux-2.4.20-Win4Lin.PLD.patch.bz2
166 Patch991:       linux-2.4.20-Win4Lin-mki-adapter.patch.bz2
167
168 # Assorted bugfixes
169
170 # jam - http://giga.cps.unizar.es/~magallon/linux/kernel/
171 Patch1000:      jam-04-clone-detached.patch
172 Patch1002:      jam-06-force-inline.patch
173 Patch1003:      jam-07-scsi-error-tmout.patch
174 Patch1006:      jam-10-highpage-init.patch
175 Patch1007:      jam-11-self_exec_id.patch
176 Patch1008:      jam-15-fast-csum-D.patch
177 Patch1009:      jam-21-mem-barriers.patch
178 Patch1010:      jam-30-smptimers-A0.patch
179
180 Patch1102:      linux-2.4.20-lvm-updates.patch
181
182 # IrDA patch for broken IBM Latpops
183 Patch1104:      linux-2.4.21-irda-ibm.patch
184
185 # fix lun probing on multilun RAID chassis
186 Patch1105:      linux-2.4.12-scsi_scan.patch
187 Patch1106:      linux-scsi-debug-bug.patch
188
189 # This patch allows to create more than one sound device using alsa
190 # and devfs with two or more sound cards
191 Patch1111:      linux-sound_core.patch
192
193 # rivafb - fix for text background in 16bpp modes
194 Patch1150:      linux-rivafb16.patch
195 Patch1152:      linux-2.4.20-agp_uninorth.patch
196
197 Patch1201:      linux-2.4.21-cpqfc.patch
198 Patch1203:      linux-2.4.20-amd-golem.patch
199 Patch1205:      linux-53c7,8xx-build.fix
200 Patch1207:      linux-2.4.20-serverworks.patch
201 # this patch adds support for "io" and "irq" options in PCNet32 driver module
202 Patch1209:      linux-2.4.19-pcnet-parms.patch
203
204 # disable some networking printk's
205 Patch1250:      linux-2.4.1-netdebug.patch
206 Patch1251:      linux-2.4.2-raw-ip.patch
207 Patch1252:      linux-2.4.19-netmos_pci_parallel_n_serial.patch
208 Patch1253:      linux-proc_net_dev-counter-fix.patch
209 Patch1254:      kernel-2.4.17-netsyms-export-fix.patch
210 Patch1255:      linux-2.4.20-pre1-nr_frags.patch
211
212 Patch1301:      linux-2.4.18-hpfs.patch
213 Patch1302:      linux-2.4.18-nfs-default-size.patch
214 Patch1303:      linux-2.4.20-irixnfs.patch
215 # Tru64 NFS kludge
216 Patch1304:      linux-2.4.21-tru64nfs.patch
217 Patch1305:      linux-2.4.21-nfs-silly-rename.patch
218
219 Patch1350:      linux-2.4.21-nousb.patch
220 # from http://www.noc.uoa.gr/~avel/page.php?page=nokia&lang=en
221 Patch1354:      linux-2.4.20-Nokia5510.patch
222
223 # raid5 xor fix for PIII/P4, should go away shortly
224 Patch1400:      linux-2.4.0-raid5xor.patch
225 Patch1401:      linux-2.4.0-nonintconfig.patch
226 # Add an ioctl to the block layer so we can be EFI compliant
227 Patch1402:      linux-2.4.2-blkioctl-sector.patch
228 Patch1403:      linux-2.4.3-pcipenalty.patch
229 Patch1404:      linux-2.4.3-rawio.patch
230 Patch1405:      linux-2.4.7-suspend.patch
231 Patch1407:      kernel-Makefile-include-fix.patch
232 Patch1408:      kernel-pswscancode.patch
233 Patch1410:      linux-2.4.18-input-35215.patch
234 Patch1411:      linux-2.4.18-kiobuf.patch
235 Patch1413:      linux-2.4.22-andrea-9980_fix-pausing-6.patch
236 Patch1414:      linux-2.4.21-oopsmeharder.patch
237 Patch1415:      linux-mtd-missing-include-fix-2.4.7-pre6.patch
238 Patch1416:      linux-2.4.21-no-FPU.patch
239 Patch1417:      linux-2.4.22-ac4-ide+sata.patch
240 Patch1418:      linux-2.4.21-hpt372-chicken-egg-hack.patch
241 Patch1419:      linux-2.4.21-agp-num_of_masks.patch
242 # fix spare disk counting for raid 5
243 Patch1420:      linux-raid5-spare-counting.patch
244 Patch1421:      linux-2.4.21-bttv-typo.patch
245 Patch1422:      linux-2.4.21-ipt_TRACE-typo.patch
246
247 Patch2000:      linux-PPC-SMP.patch
248 Patch2001:      linux-2.4-ppc-procesor.patch
249 Patch2002:      kernel-2.4.18-SPARC64-PLD.patch
250 Patch2003:      linux-2.4.20-AXP-avma1_cs.patch
251 Patch2004:      linux-2.4.22-ppc-amd8111e.patch
252
253 Patch3000:      linux-2.4.1-compilefailure.patch
254 Patch3002:      linux-2.4.20-EXPORT_SYMBOL.patch
255 Patch3003:      linux-2.4.20-missing-license-tags.patch
256 Patch3004:      linux-2.4.20-sym53c8xx_old.patch
257 Patch3008:      linux-drm-4.2.0-force-cmpxchg.patch
258 Patch3010:      linux-2.4.21-ipsec-sparc64.patch
259 Patch3011:      linux-2.4.22-gcc33-inline.patch
260 Patch3012:      linux-2.4.22-gcc-ext3.patch
261 Patch3013:      linux-2.4.23-ppc-symbols.patch
262 # Security patches/fixes
263
264 Patch4000:      grsecurity-2.0-rc3-2.4.22-O1.patch
265
266 ExclusiveOS:    Linux
267 URL:            http://www.kernel.org/
268 %ifarch         %{ix86}
269 BuildRequires:  bin86
270 %endif
271 #BuildRequires: %{kgcc_package}
272 BuildRequires:  modutils
273 BuildRequires:  ed
274 PreReq:         modutils
275 PreReq:         geninitrd >= 2.40
276 Requires(post,postun):  fileutils
277 Requires(postun):       awk
278 Provides:       %{name}-up = %{version}-%{release}
279 Provides:       module-info
280 Provides:       i2c = %{i2c_version}
281 Provides:       bttv = 0.7.83
282 Provides:       %{name}(netfilter) = 1.2.9-%{netfilter_snap}
283 Provides:       %{name}(reiserfs) = %{version}
284 Provides:       %{name}(agpgart) = %{version}
285 #Provides:      %{name}(cdrw)
286 #Provides:      %{name}(cdmrw)
287 AutoReqProv:    no
288 Obsoletes:      kernel-modules
289 Conflicts:      iptables < 1.2.9rc1
290 Conflicts:      lvm < 1.0.4
291 Conflicts:      xfsprogs < 2.1.0
292 Conflicts:      reiserfsprogs < 3.6.3
293 Conflicts:      e2fsprogs < 1.25
294 Conflicts:      jfsutils < 1.0.12
295 Conflicts:      util-linux < 2.10o
296 Conflicts:      modutils < 2.4.2
297 Conflicts:      quota < 3.06
298 Conflicts:      linux-atm < 2.4.1
299 Conflicts:      device-mapper < 1.00.05
300 ExclusiveArch:  %{ix86} sparc sparc64 alpha ppc
301 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
302
303 %description
304 This package contains the Linux kernel that is used to boot and run
305 your system. It contains few device drivers for specific hardware.
306 Most hardware is instead supported by modules loaded after booting.
307
308 %description -l de
309 Das Kernel-Paket enthält den Linux-Kernel (vmlinuz), den Kern des
310 Linux-Betriebssystems. Der Kernel ist für grundliegende
311 Systemfunktionen verantwortlich: Speicherreservierung,
312 Prozeß-Management, Geräte Ein- und Ausgaben, usw.
313
314 %description -l es
315 Este paquete contiene núcleo (kernel) Linux que se usa para arranque y
316 funcionamiento de tu sistema. Contiene soporte a pocos hardwares
317 específicos. La mayoría de los hardwares son soportados, vía módulos
318 que se cargan después del arranque.
319
320 %description -l fr
321 Le package kernel contient le kernel linux (vmlinuz), la partie
322 centrale d'un système d'exploitation Linux. Le noyau traite les
323 fonctions basiques d'un système d'exploitation: allocation mémoire,
324 allocation de process, entrée/sortie de peripheriques, etc.
325
326 %description -l pl
327 Pakiet zawiera j±dro Linuksa niezbêdne do prawid³owego dzia³ania
328 Twojego komputera. Zawiera w sobie sterowniki do sprzêtu znajduj±cego
329 siê w komputerze, takich jak karty muzyczne, sterowniki dysków, etc.
330
331 %description -l pt_BR
332 Este pacote contém o kernel Linux que é usado para inicialização
333 e funcionamento de seu sistema. Contém suporte a poucos hardwares
334 específicos. A maioria dos hardwares são suportados via módulos
335 que são carregados após a inicialização.
336
337 %package smp
338 Summary:        Kernel version %{version} compiled for SMP machines
339 Summary(de):    Kernel version %{version} für Multiprozessor-Maschinen
340 Summary(es):    Núcleo (kernel) compilado para máquinas SMP
341 Summary(fr):    Kernel version %{version} compiler pour les machine Multi-Processeur
342 Summary(pl):    J±dro Linuksa %{version} skompilowane dla maszyn wieloprocesorowych
343 Summary(pt_BR): Kernel compilado para máquinas SMP
344 Group:          Base/Kernel
345 PreReq:         modutils
346 PreReq:         geninitrd >= 2.21
347 Requires(post,postun):  fileutils
348 Requires(postun):       awk
349 Provides:       %{name}-smp = %{version}-%{release}
350 Provides:       module-info
351 Provides:       i2c = %{i2c_version}
352 Provides:       bttv = 0.7.83
353 Provides:       %{name}(netfilter) = 1.2.9rc1-%{netfilter_snap}
354 Provides:       %{name}(reiserfs) = %{version}
355 Provides:       %{name}(agpgart) = %{version}
356 #Provides:      %{name}(cdrw)
357 #Provides:      %{name}(cdmrw)
358 AutoReqProv:    no
359 Conflicts:      iptables < 1.2.9rc1
360 Conflicts:      lvm < 1.0.4
361 Conflicts:      xfsprogs < 2.1.0
362 Conflicts:      reiserfsprogs < 3.6.3
363 Conflicts:      e2fsprogs < 1.25
364 Conflicts:      jfsutils < 1.0.12
365 Conflicts:      util-linux < 2.10o
366 Conflicts:      modutils < 2.4.2
367 Conflicts:      quota < 3.06
368 Conflicts:      linux-atm < 2.4.1
369 Conflicts:      device-mapper < 1.00.05
370
371 %description smp
372 This package includes a SMP version of the Linux %{version} kernel. It
373 is required only on machines with two or more CPUs, although it should
374 work fine on single-CPU boxes.
375
376 %description smp -l de
377 Dieses Paket enthält eine SMP (Multiprozessor)-Version von
378 Linux-Kernel %{version}. Es wird für Maschinen mit zwei oder mehr
379 Prozessoren gebraucht, sollte aber auch auf Computern mit nur einer
380 CPU laufen.
381
382 %description smp -l es
383 Núcleo (kernel) compilado para máquinas SMP
384
385 %description smp -l fr
386 Ce package inclu une version SMP du noyau de Linux version %{version}.
387 Il et nécessaire seulement pour les machine avec deux processeurs ou
388 plus, il peut quand même fonctionner pour les système mono-processeur.
389
390 %description smp -l pl
391 Pakiet zawiera j±dro SMP Linuksa w wersji %{version}. Jest ono
392 wymagane przez komputery zawieraj±ce dwa lub wiêcej procesorów.
393 Powinno równie¿ dobrze dzia³aæ na maszynach z jednym procesorem.
394
395 %description smp -l pt_BR
396 Este pacote inclui uma versão SMP do kernel Linux versão %{version}.
397 Ele deve ser utilizado apenas em máquinas com dois ou mais processadores,
398 apesar de trabalhar perfeitamente em máquinas com apenas um processador.
399
400 %package BOOT
401 Summary:        Kernel version %{version} used on the installation boot disks
402 Summary(de):    Kernel version %{version} für Installationsdisketten
403 Summary(es):    Núcleo (kernel) de Linux, utilizado en el disco de instalación
404 Summary(fr):    Kernel version %{version} utiliser pour les disquettes d'installation
405 Summary(pl):    J±dro Linuksa %{version} dla bootkietek instalacyjnych
406 Summary(pt_BR): Kernel Linux utilizado no disco de instalação
407 Group:          Base/Kernel
408 PreReq:         modutils
409 Requires(post,postun):  fileutils
410 Requires(postun):       awk
411 AutoReqProv:    no
412
413 %description BOOT
414 This package includes a trimmed down version of the Linux %{version}
415 kernel. This kernel is used on the installation boot disks only and
416 should not be used for an installed system, as many features in this
417 kernel are turned off because of the size constraints.
418
419 %description BOOT -l de
420 Dieses Paket enthält eine verkleinerte Version vom Linux-Kernel
421 version %{version}. Dieser Kernel wird auf den
422 Installations-Bootdisketten benutzt und sollte nicht auf einem
423 installierten System verwendet werden, da viele Funktionen wegen der
424 Platzprobleme abgeschaltet sind.
425
426 %description BOOT -l es
427 Núcleo (kernel) de Linux, utilizado en el disco de instalación
428
429 %description BOOT -l pl
430 Pakiet zawiera j±dro Linuksa dedykowane dyskietkom startowym i powinno
431 byæ u¿ywane jedynie podczas instalacji systemu. Wiele u¿ytecznych
432 opcji zosta³o wy³±czonych, aby jak najbardziej zmniejszyæ jego
433 rozmiar.
434
435 %description BOOT -l pt_BR
436 Este pacote inclui uma versão minimizada do kernel Linux, criada para
437 ser utilizada *apenas* no disco de instalação, e não deve ser utilizada
438 em máquinas já instaladas, pois várias características do kernel
439 são desabilitadas para diminuir o tamanho final do kernel a ser utilizado.
440
441 %package pcmcia
442 Summary:        PCMCIA modules
443 Summary(pl):    Modu³y PCMCIA
444 Group:          Base/Kernel
445 PreReq:         %{name}-up = %{version}-%{release}
446 Requires(postun):       %{name}-up = %{version}-%{release}
447 Provides:       kernel(pcmcia)
448
449 %description pcmcia
450 Kernel PCMCIA modules.
451
452 %description pcmcia -l pl
453 Modu³y PCMCIA z kernela.
454
455 %package smp-pcmcia
456 Summary:        PCMCIA modules for SMP kernel
457 Summary(pl):    Modu³y PCMCIA dla maszyn SMP
458 Group:          Base/Kernel
459 PreReq:         %{name}-smp = %{version}-%{release}
460 Requires(postun):       %{name}-smp = %{version}-%{release}
461 Provides:       kernel(pcmcia)
462
463 %description smp-pcmcia
464 Kernel PCMCIA modules for SMP kernel.
465
466 %description smp-pcmcia -l pl
467 Modu³y PCMCIA z kernela dla maszyn SMP.
468
469 %package drm
470 Summary:        DRM kernel modules
471 Summary(pl):    Sterowniki DRM
472 Group:          Base/Kernel
473 PreReq:         %{name}-up = %{version}-%{release}
474 Requires(postun):       %{name}-up = %{version}-%{release}
475 Provides:       %{name}-drm = %{drm_xfree_version}
476
477 %description drm
478 DRM kernel modules (%{drm_xfree_version}).
479
480 %description drm -l pl
481 Sterowniki DRM (%{drm_xfree_version}).
482
483 %package smp-drm
484 Summary:        DRM SMP kernel modules
485 Summary(pl):    Sterowniki DRM dla maszyn wieloprocesorowych
486 Group:          Base/Kernel
487 PreReq:         %{name}-smp = %{version}-%{release}
488 Requires(postun):       %{name}-smp = %{version}-%{release}
489 Provides:       %{name}-drm = %{drm_xfree_version}
490
491 %description smp-drm
492 DRM SMP kernel modules (%{drm_xfree_version}).
493
494 %description smp-drm -l pl
495 Sterowniki DRM dla maszyn wieloprocesorowych (%{drm_xfree_version}).
496
497 %package headers
498 Summary:        Header files for the Linux kernel
499 Summary(es):    Archivos de inclusión para núcleo (kernel) Linux.
500 Summary(pl):    Pliki nag³ówkowe j±dra
501 Summary(pt_BR): Arquivos de inclusão para o kernel Linux.
502 Group:          Base/Kernel
503 Requires(post,postun):  fileutils
504 Requires(postun):       awk
505 Provides:       %{name}-headers(agpgart) = %{version}
506 Provides:       %{name}-headers(reiserfs) = %{version}
507 Provides:       %{name}-headers(bridging) = %{version}
508 Provides:       i2c-devel = %{i2c_version}
509 Provides:       %{name}-headers(netfilter) = 1.2.9rc1-%{netfilter_snap}
510 AutoReqProv:    no
511
512 %description headers
513 These are the C header files for the Linux kernel, which define
514 structures and constants that are needed when building most standard
515 programs under Linux, as well as to rebuild the kernel.
516
517 %description headers -l es
518 Estos son los archivos de inclusión C para núcleo (kernel) Linux, que define
519 estructuras y constantes que son necesarias a la construcción de la
520 mayoría de los programas en el Linux, como también para reconstruir
521 el núcleo (kernel).
522
523 %description headers -l pl
524 Pakiet zawiera pliki nag³ówkowe j±dra, niezbêdne do rekompilacji j±dra
525 oraz niektórych programów.
526
527 %description headers -l pt_BR
528 Estes são os arquivos de inclusão C para o kernel Linux, os
529 quais definem estruturas e constantes que são necessárias para
530 a construção da maioria dos programas no Linux, bem como para
531 reconstruir o próprio kernel.
532
533 %package source
534 Summary:        Kernel source tree
535 Summary(es):    Fuentes del núcleo (kernel) Linux
536 Summary(pl):    Kod ¼ród³owy j±dra Linuksa
537 Summary(pt_BR): Fontes do kernel Linux
538 Group:          Base/Kernel
539 Requires:       %{name}-headers = %{version}-%{release}
540 %ifarch %{ix86}
541 Requires:       bin86
542 %endif
543 AutoReqProv:    no
544
545 %description source
546 This is the source code for the Linux kernel. It is required to build
547 most C programs as they depend on constants defined in here. You can
548 also build a custom kernel that is better tuned to your particular
549 hardware.
550
551 %description source -l de
552 Das Kernel-Source-Paket enthält den source code (C/Assembler-Code) des
553 Linux-Kernels. Die Source-Dateien werden gebraucht, um viele
554 C-Programme zu compilieren, da sie auf Konstanten zurückgreifen, die
555 im Kernel-Source definiert sind. Die Source-Dateien können auch
556 benutzt werden, um einen Kernel zu compilieren, der besser auf Ihre
557 Hardware ausgerichtet ist.
558
559 %description source -l es
560 Este es el fuente para el núcleo (kernel) Linux. Se necesita para la
561 construcción de la mayoría de los programas C, pues dependen de
562 constantes definidas en él. Tu puedes también construir un núcleo (kernel)
563 personalizado que será lo mejor configurado para tu hardware en
564 particular.
565
566 %description source -l fr
567 Le package pour le kernel-source contient le code source pour le noyau
568 linux. Ces sources sont nécessaires pour compiler la plupart des
569 programmes C, car il dépend de constantes définies dans le code
570 source. Les sources peuvent être aussi utilisée pour compiler un noyau
571 personnalisé pour avoir de meilleures performances sur des matériels
572 particuliers.
573
574 %description source -l pl
575 Pakiet zawiera kod ¼ród³owy j±dra systemu.
576
577 %description source -l pt_BR
578 Este é o fonte para o kernel Linux. É necessário para a
579 construção da maioria dos programas C, pois eles dependem de
580 constantes definidas nele. Você também pode construir um kernel
581 personalizado que será melhor configurado para seu hardware particular.
582
583 %package doc
584 Summary:        Kernel documentation
585 Summary(es):    Documentación para los archivos fuente del núcleo (kernel) de Linux
586 Summary(pl):    Dokumentacja do j±dra Linuksa
587 Summary(pt_BR): Documentação para os arquivos fontes do kernel Linux
588 Group:          Base/Kernel
589 Provides:       %{name}-doc = %{version}
590 AutoReqProv:    no
591
592 %description doc
593 This is the documentation for the Linux kernel, as found in
594 /usr/src/linux/Documentation directory.
595
596 %description doc -l es
597 Documentación para los archivos fuente del núcleo (kernel) de Linux
598
599 %description doc -l pl
600 Pakiet zawiera dokumentacjê j±dra z katalogu
601 /usr/src/linux/Documentation.
602
603 %description doc -l pt_BR
604 Este pacote contém documentação para o kernel Linux.
605
606 %prep
607 %setup -q -a3 -n linux-%{version}
608 # new JFS
609 rm -fr fs/jfs
610 gzip -dc %{SOURCE7} | tar -xf -
611 %patch0 -p1
612 %patch10 -p1
613 %patch12 -p1
614 %patch15 -p1
615 %patch20 -p1
616 %patch21 -p1
617 %patch22 -p1
618 #%patch23 -p1 NOT APPLIED, YET
619 %patch25 -p1
620 #%patch26 -p1
621 %patch32 -p1
622 # XXX: TODO - update patch
623 #%patch31 -p1
624 %patch40 -p1
625 %patch50 -p1
626 %patch55 -p1
627 %patch60 -p1
628 %patch61 -p1
629 %patch65 -p1
630 %patch70 -p1
631 %patch80 -p1
632 %patch100 -p1
633 %patch101 -p1
634 %patch110 -p1
635 %patch120 -p1
636 %patch125 -p1
637 %patch130 -p1
638 #%patch150 -p1
639 %patch151 -p1
640 %patch152 -p1
641 %patch200 -p1
642 %patch205 -p1
643 %patch210 -p1
644 #%patch215 -p1
645 #%patch216 -p1
646 %patch225 -p1
647 %patch226 -p1
648 %patch227 -p1
649 %patch231 -p1
650 %patch235 -p1
651 %patch240 -p1
652 %patch255 -p1
653 %patch256 -p1
654 %patch257 -p1
655 %patch265 -p1
656 %patch275 -p1
657 %patch301 -p1
658 %patch302 -p1
659 %patch303 -p1
660 %patch1000 -p1
661 %patch1002 -p1
662 %patch1003 -p1
663 %patch1006 -p1
664 %patch1007 -p1
665 #%patch1008 -p1
666 %patch1009 -p1
667 %patch1010 -p1
668 %patch1102 -p1
669 %patch1104 -p0
670 %patch1105 -p1
671 %patch1106 -p0
672 %patch1111 -p1
673 %patch1150 -p1
674 %patch1152 -p1
675 %patch1201 -p1
676 %patch1203 -p1
677 %patch1205 -p1
678 %patch1207 -p1
679 %patch1209 -p1
680 %patch1250 -p1
681 %patch1251 -p1
682 %patch1252 -p1
683 %patch1253 -p1
684 %patch1254 -p0
685 %patch1255 -p1
686 %patch1301 -p1
687 %patch1302 -p1
688 %patch1303 -p1
689 %patch1304 -p1
690 %patch1305 -p1
691 %patch1350 -p1
692 %patch1354 -p1
693 %patch1400 -p1
694 %patch1401 -p1
695 %patch1402 -p1
696 %patch1403 -p1
697 %patch1404 -p1
698 %patch1405 -p1
699 %patch1407 -p1
700 %patch1408 -p1
701 %patch1410 -p1
702 %patch1411 -p1
703 %patch1413 -p1
704 %patch1414 -p1
705 %patch1415 -p0
706 %patch1416 -p1
707 # XXX: is there updated one?
708 #%patch1417 -p1
709 %patch1418 -p1
710 %patch1419 -p1
711 %patch1420 -p1
712 %patch1421 -p1
713 # XXX: no TRACE in netfilter included here (at this moment)
714 #%patch1422 -p1
715
716 %patch2000 -p0
717 %patch2001 -p1
718 %patch2002 -p1
719 %patch2003 -p1
720 %ifarch ppc
721 %patch2004 -p1
722 %endif
723
724 %patch3000 -p1
725 %patch3002 -p1
726 %patch3003 -p1
727 %patch3004 -p1
728 cd drivers/char/drm
729 %patch3008 -p1
730 cd ../../..
731
732 %ifarch sparc64
733 %patch3010 -p1
734 %endif
735
736 %patch3011 -p1
737 %patch3012 -p1
738 %patch3013 -p1
739
740 # XXX: finish update (one (not very important) issue with seq_file not resolved)
741 %{?with_grsec:%patch4000 -p1}
742
743 mv -f drivers/scsi/sym53c8xx.c drivers/scsi/sym53c8xx_old.c
744
745 # Tekram DC395/315 U/UW SCSI host driver
746 echo Adding Tekram DC395/315 driver
747 patch -p1 -s < dc395/dc395-integ24.diff
748 install dc395/dc395x_trm.? dc395/README.dc395x drivers/scsi/
749 %patch270 -p1
750
751 # The following go last as they touch a lot of code
752 # and/or are on bcond and/or are ifarch
753
754 %ifarch %{ix86}
755 %if %{with win4lin}
756 echo Win4Lin patch ...
757 %patch900 -p1
758 %patch991 -p1
759 %endif
760 %endif
761
762 # Remove -g from drivers/atm/Makefile and net/ipsec/Makefile
763 echo -e ',s/EXTRA_CFLAGS.*-g//g\n,w' | ed net/ipsec/Makefile
764
765 # Fix EXTRAVERSION and CC in main Makefile
766 echo -e ',s/EXTRAVERSION =.*/EXTRAVERSION =/g\n,w' | ed Makefile
767 %ifarch sparc64
768 echo -e ',s/CC.*$(CROSS_COMPILE)gcc/CC          = sparc64-linux-gcc/g\n,w' | ed Makefile
769 %endif
770
771 %build
772 BuildKernel() {
773         %{?_debug:set -x}
774         # is this a special kernel we want to build?
775         BOOT=
776         smp=
777         [ "$1" = "BOOT" -o "$2" = "BOOT" ] && BOOT=yes
778         [ "$1" = "smp" -o "$2" = "smp" ] && smp=yes
779 %ifarch %{ix86}
780         if [ "$smp" = "yes" ]; then
781                 Config="ia32-smp"
782         else
783                 Config="ia32"
784         fi
785 %else
786         if [ "$smp" = "yes" ]; then
787                 Config="%{_target_cpu}-smp"
788         else
789                 Config="%{_target_cpu}"
790         fi
791 %endif
792         if [ "$BOOT" = "yes" ]; then
793                 KernelVer=%{version}-%{release}BOOT
794         else
795                 KernelVer=%{version}-%{release}$1
796         fi
797         echo "BUILDING THE NORMAL KERNEL $*..."
798 :> arch/%{base_arch}/defconfig
799         cat $RPM_SOURCE_DIR/kernel-$Config.config >> arch/%{base_arch}/defconfig
800 %ifarch i386
801         echo "CONFIG_M386=y" >> arch/%{base_arch}/defconfig
802 %endif
803 %ifarch i586
804         echo "CONFIG_M586=y" >> arch/%{base_arch}/defconfig
805 %endif
806 %ifarch i686
807         echo "CONFIG_M686=y" >> arch/%{base_arch}/defconfig
808 %endif
809 %ifarch athlon
810         echo "CONFIG_MK7=y" >> arch/%{base_arch}/defconfig
811 %endif
812         cat %{SOURCE1000} >> arch/%{base_arch}/defconfig
813         cat %{SOURCE1001} >> arch/%{base_arch}/defconfig
814
815 %ifarch sparc64
816         echo -e ',s/^CONFIG_FB_I810=.*/# CONFIG_FB_I810 is not set/g\n,w' | \
817                 ed arch/%{base_arch}/defconfig
818         echo -e ',s/CONFIG_IPSEC_AUTH_HMAC_SHA1=y/# CONFIG_IPSEC_AUTH_HMAC_SHA1 is not set/g\n,w' | \
819                 ed arch/%{base_arch}/defconfig
820 %endif
821
822         if [ "$BOOT" = "yes" ] ; then
823                 echo "# CONFIG_GRKERNSEC is not set" >> arch/%{base_arch}/defconfig
824         else
825                 :;
826 %if %{with grsec}
827                 echo -e ',s/CONFIG_CRYPTO_SHA256=m/CONFIG_CRYPTO_SHA256=y/g\n,w' | \
828                         ed arch/%{base_arch}/defconfig
829                 cat %{SOURCE1002} >> arch/%{base_arch}/defconfig
830 %endif
831         fi
832 %ifarch %{ix86}
833         cat %{SOURCE2000} >> arch/%{base_arch}/defconfig
834 %endif
835
836 %ifarch i386
837         echo -e ',s/# CONFIG_MATH_EMULATION is not set/CONFIG_MATH_EMULATION=y/g\n,w' | \
838                 ed arch/%{base_arch}/defconfig
839 %endif
840
841         %{__make} mrproper
842         ln -sf arch/%{base_arch}/defconfig .config
843
844 %ifarch sparc
845         sparc32 %{__make} oldconfig
846         sparc32 %{__make} dep clean
847 %else
848         %{__make} oldconfig
849         %{__make} dep clean
850 %endif
851         %{__make} include/linux/version.h
852
853 # making  table for soundmodem.
854         cd drivers/net/hamradio/soundmodem
855         %{__cc} -o gentbl -lm gentbl.c
856         ./gentbl
857         cd ../../../..
858
859 %ifarch %{ix86}
860         %{__make} bzImage
861 %endif
862 %ifarch sparc
863         sparc32 %{__make} boot
864 %else
865 %ifnarch %{ix86}
866         %{__make}
867 %endif
868 %endif
869 %ifarch sparc
870         sparc32 %{__make} modules
871 %else
872         %{__make} modules
873 %endif
874
875         mkdir -p $KERNEL_INSTALL_DIR/boot
876         install System.map $KERNEL_INSTALL_DIR/boot/System.map-$KernelVer
877 %ifarch %{ix86}
878         cp arch/i386/boot/bzImage $KERNEL_INSTALL_DIR/boot/vmlinuz-$KernelVer
879 %endif
880 %ifarch alpha sparc sparc64
881         gzip -cfv vmlinux > vmlinuz
882         install vmlinux $KERNEL_INSTALL_DIR/boot/vmlinux-$KernelVer
883         install vmlinuz $KERNEL_INSTALL_DIR/boot/vmlinuz-$KernelVer
884 %endif
885 %ifarch ppc
886         install vmlinux $KERNEL_INSTALL_DIR/boot/vmlinux-$KernelVer
887         install vmlinux $KERNEL_INSTALL_DIR/boot/vmlinuz-$KernelVer
888 %endif
889 %ifarch sparc
890         sparc32 %{__make} modules_install \
891         INSTALL_MOD_PATH=$KERNEL_INSTALL_DIR \
892         KERNELRELEASE=$KernelVer
893         echo KERNEL RELEASE $KernelVer
894 %else
895         %{__make} modules_install \
896         INSTALL_MOD_PATH=$KERNEL_INSTALL_DIR \
897         KERNELRELEASE=$KernelVer
898         echo KERNEL RELEASE $KernelVer
899 %endif
900 }
901
902 KERNEL_BUILD_DIR=`pwd`
903 KERNEL_INSTALL_DIR=$KERNEL_BUILD_DIR-installed
904 rm -rf $KERNEL_INSTALL_DIR
905 install -d $KERNEL_INSTALL_DIR
906
907 # make drivers/scsi/ missing files
908 #       (cd drivers/scsi; make -f M)
909
910 # UP KERNEL
911 %{?with_up:BuildKernel}
912
913 # SMP KERNEL
914 %{?with_smp:BuildKernel smp}
915
916 %if ! %{with up} && ! %{with smp}
917 # We need include/asm created somewhere
918 make symlinks
919 %endif
920
921 # BOOT kernel
922 %ifnarch i586 i686 athlon
923 KERNEL_INSTALL_DIR="$KERNEL_BUILD_DIR-installed%{_libdir}/bootdisk"
924 rm -rf $KERNEL_INSTALL_DIR
925 %{?with_boot:BuildKernel BOOT}
926 %endif
927
928 %install
929 rm -rf $RPM_BUILD_ROOT
930 umask 022
931
932 install -d $RPM_BUILD_ROOT%{_prefix}/{include,src/linux-%{version}}
933
934 KERNEL_BUILD_DIR=`pwd`
935
936 KERNEL_BUILD_INSTALL=no
937 %{?with_up:KERNEL_BUILD_INSTALL=yes}
938 %{?with_smp:KERNEL_BUILD_INSTALL=yes}
939 [ "$KERNEL_BUILD_INSTALL" = "yes" ] && cp -a $KERNEL_BUILD_DIR-installed/* $RPM_BUILD_ROOT
940
941 for i in "" smp ; do
942         if [ -e  $RPM_BUILD_ROOT/lib/modules/%{version}-%{release}$i ] ; then
943                 rm -f $RPM_BUILD_ROOT/lib/modules/%{version}-%{release}$i/build
944                 ln -sf %{_prefix}/src/linux-%{version} \
945                         $RPM_BUILD_ROOT/lib/modules/%{version}-%{release}$i/build
946         fi
947 done
948 ln -sf ../src/linux/include/linux $RPM_BUILD_ROOT%{_includedir}/linux
949 ln -sf linux-%{version} $RPM_BUILD_ROOT%{_prefix}/src/linux
950
951 %ifarch sparc sparc64
952 ln -s /usr/src/linux/include/asm-sparc $RPM_BUILD_ROOT%{_includedir}/asm-sparc
953 ln -s ../src/linux/include/asm-sparc64 $RPM_BUILD_ROOT%{_includedir}/asm-sparc64
954 %else
955 ln -sf ../src/linux/include/asm $RPM_BUILD_ROOT/usr/include/asm
956 %endif
957
958 %if %{with source}
959 cp -a . $RPM_BUILD_ROOT/usr/src/linux-%{version}
960 %else
961 cp -a {include,scripts,Makefile,Rules.make,Documentation} $RPM_BUILD_ROOT/usr/src/linux-%{version}
962 %endif
963
964 %ifarch sparc sparc64
965 sh %{SOURCE2} $RPM_BUILD_ROOT%{_includedir}
966 cp -a %{SOURCE2} $RPM_BUILD_ROOT%{_includedir}/asm/BuildASM
967 %endif
968
969 cd $RPM_BUILD_ROOT%{_prefix}/src/linux-%{version}
970
971 # remove foreign architecture files
972 cd include
973 mkdir _asm_keep
974 mv asm-generic _asm_keep
975 %ifarch sparc sparc64
976         mv asm-sparc* _asm_keep
977 %else
978         mv `resolvesymlink asm` _asm_keep
979 %endif
980 rm -rf asm-*
981 mv _asm_keep/* .
982 rmdir _asm_keep
983 cd ..
984
985 %if %{with source}
986 MYARCH=%{_arch}
987 %ifarch %{ix86}
988 MYARCH=i386
989 %endif
990 %ifarch sparc sparc64
991 MYARCH="sparc sparc64"
992 %endif
993 cd arch
994 mv $MYARCH ..
995 cd ..
996 rm -rf arch/*
997 mv $MYARCH arch
998 %endif
999
1000 %if %{with source}
1001 %{__make} mrproper
1002
1003 find  -name "*~" -print | xargs rm -f
1004 find  -name "*.orig" -print | xargs rm -f
1005
1006 %ifarch %{ix86}
1007 cat $RPM_SOURCE_DIR/kernel-ia32.config > .config
1008 %else
1009 install $RPM_SOURCE_DIR/kernel-%{_target_cpu}.config .config
1010 %endif
1011
1012 %ifarch i386
1013 echo "CONFIG_M386=y" >> .config
1014 %endif
1015 %ifarch i586
1016 echo "CONFIG_M586=y" >> .config
1017 %endif
1018 %ifarch i686
1019 echo "CONFIG_M686=y" >> .config
1020 %endif
1021 %ifarch athlon
1022 echo "CONFIG_MK7=y" >> .config
1023 %endif
1024 cat %{SOURCE1000} >> .config
1025 cat %{SOURCE1001} >> .config
1026 %{?with_grsec:cat %{SOURCE1002} >> .config}
1027
1028 %ifarch sparc64
1029         echo -e ',s/^CONFIG_FB_I810=.*/# CONFIG_FB_I810 is not set/g\n,w' | \
1030                 ed .config
1031         echo -e ',s/CONFIG_IPSEC_AUTH_HMAC_SHA1=y/# CONFIG_IPSEC_AUTH_HMAC_SHA1 is not set/g\n,w' | \
1032                 ed .config
1033 %endif
1034
1035 %ifarch %{ix86}
1036 cat %{SOURCE2000} >> .config
1037 %endif
1038
1039 %ifarch sparc
1040 sparc32 %{__make} oldconfig
1041 %else
1042 %{__make} oldconfig
1043 %endif
1044
1045 mv include/linux/autoconf.h include/linux/autoconf-up.h
1046 cp .config config-up
1047
1048 %ifarch %{ix86}
1049 cat $RPM_SOURCE_DIR/kernel-ia32-smp.config >> .config
1050 %else
1051 install $RPM_SOURCE_DIR/kernel-%{_target_cpu}-smp.config .config
1052 %endif
1053
1054 %ifarch i386
1055 echo "CONFIG_M386=y" >> .config
1056 %endif
1057 %ifarch i586
1058 echo "CONFIG_M586=y" >> .config
1059 %endif
1060 %ifarch i686
1061 echo "CONFIG_M686=y" >> .config
1062 %endif
1063 %ifarch athlon
1064 echo "CONFIG_MK7=y" >> .config
1065 %endif
1066
1067 cat %{SOURCE1000} >> .config
1068 cat %{SOURCE1001} >> .config
1069 %{?with_grsec:cat %{SOURCE1002} >> .config}
1070
1071 %ifarch sparc64
1072         echo -e ',s/^CONFIG_FB_I810=.*/# CONFIG_FB_I810 is not set/g\n,w' | \
1073                 ed .config
1074         echo -e ',s/CONFIG_IPSEC_AUTH_HMAC_SHA1=y/# CONFIG_IPSEC_AUTH_HMAC_SHA1 is not set/g\n,w' | \
1075                 ed .config
1076 %endif
1077
1078 %ifarch %{ix86}
1079 cat %{SOURCE2000} >> .config
1080 %endif
1081
1082 %ifarch sparc
1083 sparc32 %{__make} oldconfig
1084 %else
1085 %{__make} oldconfig
1086 %endif
1087 mv include/linux/autoconf.h include/linux/autoconf-smp.h
1088 cp .config config-smp
1089 %endif
1090
1091 install %{SOURCE1} $RPM_BUILD_ROOT/usr/src/linux-%{version}/include/linux/autoconf.h
1092
1093 %if %{with source}
1094 # this generates modversions info which we want to include and we may as
1095 # well include the depends stuff as well
1096 %{__make} symlinks
1097 %{__make} include/linux/version.h
1098 #%{__make} "`pwd`/include/linux/modversions.h"
1099 %endif
1100 rm -f include/linux/modversions.h
1101 echo "#include <linux/modsetver.h>" > include/linux/modversions.h
1102
1103
1104 # this generates modversions info which we want to include and we may as
1105 # well include the depends stuff as well, after we fix the paths
1106
1107 %if %{with source}
1108 %{__make} depend
1109 find $RPM_BUILD_ROOT/usr/src/linux-%{version} -name ".*depend" \
1110         -exec /bin/sh -c "echo -e \",s|$RPM_BUILD_ROOT||g\n,w\" | ed {}" \;
1111
1112 %{__make} clean
1113 rm -f scripts/mkdep
1114 rm -f drivers/net/hamradio/soundmodem/gentbl
1115 %endif
1116
1117 # BOOT
1118 %if %{with boot}
1119 %ifnarch i586 i686 athlon
1120 install -d $RPM_BUILD_ROOT%{_libdir}/bootdisk
1121 cp -rdp $KERNEL_BUILD_DIR-installed%{_libdir}/bootdisk/* $RPM_BUILD_ROOT%{_libdir}/bootdisk
1122 %endif
1123 %endif
1124
1125 %clean
1126 rm -rf $RPM_BUILD_ROOT
1127 rm -rf $RPM_BUILD_DIR/linux-%{version}-installed
1128
1129 %post
1130 mv -f /boot/vmlinuz /boot/vmlinuz.old 2> /dev/null > /dev/null
1131 mv -f /boot/System.map /boot/System.map.old 2> /dev/null > /dev/null
1132 ln -sf vmlinuz-%{version}-%{release} /boot/vmlinuz
1133 ln -sf System.map-%{version}-%{release} /boot/System.map
1134
1135 if [ ! -L /lib/modules/%{version} ] ; then
1136         mv -f /lib/modules/%{version} /lib/modules/%{version}.rpmsave > /dev/null 2>&1
1137 fi
1138 rm -f /lib/modules/%{version}
1139 ln -snf %{version}-%{release} /lib/modules/%{version}
1140 /sbin/depmod -a -F /boot/System.map-%{version}-%{release} %{version}-%{release}
1141
1142 /sbin/geninitrd -f --initrdfs=rom /boot/initrd-%{version}-%{release}.gz %{version}-%{release}
1143 mv -f /boot/initrd /boot/initrd.old
1144 ln -sf initrd-%{version}-%{release}.gz /boot/initrd
1145
1146 if [ -f %{_prefix}/src/linux-%{version}/config-up ] ; then
1147         ln -s %{_prefix}/src/linux-%{version}/config-up %{_prefix}/src/linux-%{version}/.config
1148 fi
1149
1150 if [ -x /sbin/rc-boot ] ; then
1151         /sbin/rc-boot 1>&2 || :
1152 fi
1153
1154 %post smp
1155 mv -f /boot/vmlinuz /boot/vmlinuz.old 2> /dev/null > /dev/null
1156 mv -f /boot/System.map /boot/System.map.old 2> /dev/null > /dev/null
1157 ln -sf vmlinuz-%{version}-%{release}smp /boot/vmlinuz
1158 ln -sf System.map-%{version}-%{release}smp /boot/System.map
1159
1160 if [ ! -L /lib/modules/%{version} ] ; then
1161         mv -f /lib/modules/%{version} /lib/modules/%{version}.rpmsave > /dev/null 2>&1
1162 fi
1163 rm -f /lib/modules/%{version}
1164 ln -snf %{version}-%{release}smp /lib/modules/%{version}
1165 /sbin/depmod -a -F /boot/System.map-%{version}-%{release}smp %{version}-%{release}smp
1166
1167 /sbin/geninitrd -f --initrdfs=rom /boot/initrd-%{version}-%{release}smp.gz %{version}-%{release}smp
1168 mv -f /boot/initrd /boot/initrd.old
1169 ln -sf initrd-%{version}-%{release}smp.gz /boot/initrd
1170
1171 if [ -f %{_prefix}/src/linux-%{version}/config-smp ] ; then
1172         ln -s %{_prefix}/src/linux-%{version}/config-smp %{_prefix}/src/linux-%{version}/.config
1173 fi
1174
1175 if [ -x /sbin/rc-boot ] ; then
1176         /sbin/rc-boot 1>&2 || :
1177 fi
1178
1179 %post BOOT
1180 if [ ! -L %{_libdir}/bootdisk/lib/modules/%{version} ] ; then
1181         mv -f %{_libdir}/bootdisk/lib/modules/%{version} %{_libdir}/bootdisk/lib/modules/%{version}.rpmsave
1182 fi
1183 if [ ! -L %{_libdir}/bootdisk/boot/vmlinuz-%{version} ] ; then
1184         mv -f %{_libdir}/bootdisk/boot/vmlinuz-%{version} %{_libdir}/bootdisk/boot/vmlinuz-%{version}.rpmsave
1185 fi
1186 rm -f %{_libdir}/bootdisk/lib/modules/%{version}
1187 ln -snf %{version}-%{release}BOOT %{_libdir}/bootdisk/lib/modules/%{version}
1188 rm -f %{_libdir}/bootdisk/boot/vmlinuz-%{version}
1189 ln -snf vmlinuz-%{version}-%{release}BOOT %{_libdir}/bootdisk/boot/vmlinuz-%{version}
1190
1191 %postun
1192 if [ -L /lib/modules/%{version} ]; then
1193         if [ "`ls -l /lib/modules/%{version} | awk '{ print $11 }'`" = "%{version}-%{release}" ]; then
1194                 if [ "$1" = "0" ]; then
1195                         rm -f /lib/modules/%{version}
1196                 fi
1197         fi
1198 fi
1199 rm -f /boot/initrd-%{version}-%{release}.gz
1200
1201 %post pcmcia
1202 /sbin/depmod -a -F /boot/System.map-%{version}-%{release} %{version}-%{release}
1203
1204 %postun pcmcia
1205 /sbin/depmod -a -F /boot/System.map-%{version}-%{release} %{version}-%{release} > /dev/null 2>&1
1206
1207 %post drm
1208 /sbin/depmod -a -F /boot/System.map-%{version}-%{release} %{version}-%{release}
1209
1210 %postun drm
1211 /sbin/depmod -a -F /boot/System.map-%{version}-%{release} %{version}-%{release} > /dev/null 2>&1
1212
1213 %postun smp
1214 if [ -L /lib/modules/%{version} ]; then
1215         if [ "`ls -l /lib/modules/%{version} | awk '{ print $11 }'`" = "%{version}-%{release}smp" ]; then
1216                 if [ "$1" = "0" ]; then
1217                         rm -f /lib/modules/%{version}
1218                 fi
1219         fi
1220 fi
1221 rm -f /boot/initrd-%{version}-%{release}smp.gz
1222
1223 %post smp-pcmcia
1224 /sbin/depmod -a -F /boot/System.map-%{version}-%{release}smp %{version}-%{release}smp
1225
1226 %postun smp-pcmcia
1227 /sbin/depmod -a -F /boot/System.map-%{version}-%{release}smp %{version}-%{release}smp > /dev/null 2>&1
1228
1229 %post smp-drm
1230 /sbin/depmod -a -F /boot/System.map-%{version}-%{release}smp %{version}-%{release}smp
1231
1232 %postun smp-drm
1233 /sbin/depmod -a -F /boot/System.map-%{version}-%{release}smp %{version}-%{release}smp > /dev/null 2>&1
1234
1235 %postun BOOT
1236 if [ -L %{_libdir}/bootdisk/lib/modules/%{version} ]; then
1237         if [ "`ls -l %{_libdir}/bootdisk/lib/modules/%{version} | awk '{ print $11 }'`" = "%{version}-%{release}BOOT" ]; then
1238                 if [ "$1" = "0" ]; then
1239                         rm -f %{_libdir}/bootdisk/lib/modules/%{version}
1240                 fi
1241         fi
1242 fi
1243
1244 %post headers
1245 rm -f /usr/src/linux
1246 ln -snf linux-%{version} /usr/src/linux
1247
1248 %postun headers
1249 if [ -L /usr/src/linux ]; then
1250         if [ "`ls -l /usr/src/linux | awk '{ print $11 }'`" = "linux-%{version}" ]; then
1251                 if [ "$1" = "0" ]; then
1252                         rm -f /usr/src/linux
1253                 fi
1254         fi
1255 fi
1256
1257 %if %{with up}
1258 %files
1259 %defattr(644,root,root,755)
1260 %ifarch alpha sparc sparc64 ppc
1261 /boot/vmlinux-%{version}-%{release}
1262 %endif
1263 /boot/vmlinuz-%{version}-%{release}
1264 /boot/System.map-%{version}-%{release}
1265 %dir /lib/modules/%{version}-%{release}
1266 /lib/modules/%{version}-%{release}/kernel
1267 %ifnarch sparc sparc64
1268 %exclude /lib/modules/%{version}-%{release}/kernel/drivers/pcmcia
1269 %exclude /lib/modules/%{version}-%{release}/kernel/drivers/ide/legacy/*-cs.o*
1270 %exclude /lib/modules/%{version}-%{release}/kernel/drivers/mtd/maps/pcmcia*
1271 %exclude /lib/modules/%{version}-%{release}/kernel/drivers/net/pcmcia
1272 %exclude /lib/modules/%{version}-%{release}/kernel/drivers/scsi/pcmcia
1273 %exclude /lib/modules/%{version}-%{release}/kernel/drivers/char/pcmcia
1274 %exclude /lib/modules/%{version}-%{release}/kernel/drivers/net/wireless/*_cs.o*
1275 %exclude /lib/modules/%{version}-%{release}/kernel/drivers/parport/*_cs.o*
1276 %exclude /lib/modules/%{version}-%{release}/kernel/drivers/bluetooth/*_cs.o*
1277 %endif
1278 %ifnarch ppc sparc sparc64
1279 %exclude /lib/modules/%{version}-%{release}/kernel/drivers/isdn/hisax/*_cs.o*
1280 %ifnarch alpha
1281 %exclude /lib/modules/%{version}-%{release}/kernel/drivers/isdn/avmb1/avm_cs.o*
1282 %exclude /lib/modules/%{version}-%{release}/kernel/drivers/telephony/*_pcmcia.o*
1283 %endif
1284 %endif
1285 %ifnarch sparc
1286 %exclude /lib/modules/%{version}-%{release}/kernel/drivers/char/drm
1287 %endif
1288 /lib/modules/%{version}-%{release}/build
1289 %ghost /lib/modules/%{version}-%{release}/modules.*
1290
1291 %ifnarch sparc sparc64
1292 %files pcmcia
1293 %defattr(644,root,root,755)
1294 /lib/modules/%{version}-%{release}/kernel/drivers/pcmcia
1295 /lib/modules/%{version}-%{release}/kernel/drivers/ide/legacy/*-cs.o*
1296 /lib/modules/%{version}-%{release}/kernel/drivers/mtd/maps/pcmcia*
1297 /lib/modules/%{version}-%{release}/kernel/drivers/net/pcmcia
1298 /lib/modules/%{version}-%{release}/kernel/drivers/scsi/pcmcia
1299 /lib/modules/%{version}-%{release}/kernel/drivers/char/pcmcia
1300 /lib/modules/%{version}-%{release}/kernel/drivers/net/wireless/*_cs.o*
1301 /lib/modules/%{version}-%{release}/kernel/drivers/parport/*_cs.o*
1302 /lib/modules/%{version}-%{release}/kernel/drivers/bluetooth/*_cs.o*
1303 %ifnarch ppc
1304 /lib/modules/%{version}-%{release}/kernel/drivers/isdn/hisax/*_cs.o*
1305 %ifnarch alpha
1306 /lib/modules/%{version}-%{release}/kernel/drivers/isdn/avmb1/avm_cs.o*
1307 /lib/modules/%{version}-%{release}/kernel/drivers/telephony/*_pcmcia.o*
1308 %endif
1309 %endif
1310 %endif
1311
1312 %ifnarch sparc
1313 %files drm
1314 %defattr(644,root,root,755)
1315 /lib/modules/%{version}-%{release}/kernel/drivers/char/drm
1316 %endif                  # %%{with up}
1317 %endif
1318
1319 %if %{with smp}
1320 %files smp
1321 %defattr(644,root,root,755)
1322 %ifarch alpha sparc sparc64 ppc
1323 /boot/vmlinux-%{version}-%{release}smp
1324 %endif
1325 /boot/vmlinuz-%{version}-%{release}smp
1326 /boot/System.map-%{version}-%{release}smp
1327 %dir /lib/modules/%{version}-%{release}smp
1328 /lib/modules/%{version}-%{release}smp/kernel
1329 %ifnarch sparc sparc64
1330 %exclude /lib/modules/%{version}-%{release}smp/kernel/drivers/pcmcia
1331 %exclude /lib/modules/%{version}-%{release}smp/kernel/drivers/ide/legacy/*-cs.o*
1332 %exclude /lib/modules/%{version}-%{release}smp/kernel/drivers/mtd/maps/pcmcia*
1333 %exclude /lib/modules/%{version}-%{release}smp/kernel/drivers/net/pcmcia
1334 %exclude /lib/modules/%{version}-%{release}smp/kernel/drivers/scsi/pcmcia
1335 %exclude /lib/modules/%{version}-%{release}smp/kernel/drivers/char/pcmcia
1336 %exclude /lib/modules/%{version}-%{release}smp/kernel/drivers/net/wireless/*_cs.o*
1337 %exclude /lib/modules/%{version}-%{release}smp/kernel/drivers/parport/*_cs.o*
1338 %exclude /lib/modules/%{version}-%{release}smp/kernel/drivers/bluetooth/*_cs.o*
1339 %endif
1340 %ifnarch ppc sparc sparc64
1341 %exclude /lib/modules/%{version}-%{release}smp/kernel/drivers/isdn/hisax/*_cs.o*
1342 %ifnarch alpha
1343 %exclude /lib/modules/%{version}-%{release}smp/kernel/drivers/isdn/avmb1/avm_cs.o*
1344 %exclude /lib/modules/%{version}-%{release}smp/kernel/drivers/telephony/*_pcmcia.o*
1345 %endif
1346 %endif
1347 %ifnarch sparc
1348 %exclude /lib/modules/%{version}-%{release}smp/kernel/drivers/char/drm
1349 %endif
1350 /lib/modules/%{version}-%{release}smp/build
1351 %ghost /lib/modules/%{version}-%{release}smp/modules.*
1352
1353 %ifnarch sparc sparc64
1354 %files -n kernel-smp-pcmcia
1355 %defattr(644,root,root,755)
1356 /lib/modules/%{version}-%{release}smp/kernel/drivers/pcmcia
1357 /lib/modules/%{version}-%{release}smp/kernel/drivers/ide/legacy/*-cs.o*
1358 /lib/modules/%{version}-%{release}smp/kernel/drivers/mtd/maps/pcmcia*
1359 /lib/modules/%{version}-%{release}smp/kernel/drivers/net/pcmcia
1360 /lib/modules/%{version}-%{release}smp/kernel/drivers/scsi/pcmcia
1361 /lib/modules/%{version}-%{release}smp/kernel/drivers/char/pcmcia
1362 /lib/modules/%{version}-%{release}smp/kernel/drivers/net/wireless/*_cs.o*
1363 /lib/modules/%{version}-%{release}smp/kernel/drivers/parport/*_cs.o*
1364 /lib/modules/%{version}-%{release}smp/kernel/drivers/bluetooth/dtl1_cs.o*
1365 %ifnarch ppc
1366 /lib/modules/%{version}-%{release}smp/kernel/drivers/isdn/hisax/*_cs.o*
1367 %ifnarch alpha
1368 /lib/modules/%{version}-%{release}smp/kernel/drivers/isdn/avmb1/avm_cs.o*
1369 /lib/modules/%{version}-%{release}smp/kernel/drivers/telephony/*_pcmcia.o*
1370 %endif
1371 %endif
1372 %endif
1373
1374 %ifnarch sparc
1375 %files -n kernel-smp-drm
1376 %defattr(644,root,root,755)
1377 /lib/modules/%{version}-%{release}smp/kernel/drivers/char/drm
1378 %endif                  # %%{with smp}
1379 %endif
1380
1381 %if %{with boot}
1382 %ifnarch i586 i686 athlon               # narch
1383 %files BOOT
1384 %defattr(644,root,root,755)
1385 %ifarch alpha sparc sparc64 ppc         # arch
1386 %{_libdir}/bootdisk/boot/vmlinux-%{version}-%{release}BOOT
1387 %endif                          #arch
1388 %{_libdir}/bootdisk/boot/vmlinuz-%{version}-%{release}BOOT
1389 %{_libdir}/bootdisk/boot/System.map-%{version}-%{release}BOOT
1390 %dir %{_libdir}/bootdisk/lib/modules/%{version}-%{release}BOOT
1391 %{_libdir}/bootdisk/lib/modules/%{version}-%{release}BOOT/kernel
1392 %{_libdir}/bootdisk/lib/modules/%{version}-%{release}BOOT/build
1393 %ghost %{_libdir}/bootdisk/lib/modules/%{version}-%{release}BOOT/modules.*
1394 %endif                          # narch
1395 %endif                          # %%{with boot}
1396
1397 %files headers
1398 %defattr(644,root,root,755)
1399 %dir %{_prefix}/src/linux-%{version}
1400 %{_prefix}/src/linux-%{version}/include
1401 %{!?with_kheaders:%{_includedir}/asm}
1402 %{!?with_kheaders:%{_includedir}/linux}
1403
1404 %if %{with doc}
1405 %files doc
1406 %defattr(644,root,root,755)
1407 %{_prefix}/src/linux-%{version}/Documentation
1408 %endif
1409
1410 %if %{with source}
1411 %files source
1412 %defattr(644,root,root,755)
1413 %{_prefix}/src/linux-%{version}/arch
1414 %{_prefix}/src/linux-%{version}/crypto
1415 %{_prefix}/src/linux-%{version}/drivers
1416 %{_prefix}/src/linux-%{version}/fs
1417 %{_prefix}/src/linux-%{version}/init
1418 %{?with_grsec:%{_prefix}/src/linux-%{version}/grsecurity}
1419 %{_prefix}/src/linux-%{version}/ipc
1420 #%{_prefix}/src/linux-%{version}/kdb
1421 %{_prefix}/src/linux-%{version}/kernel
1422 %{_prefix}/src/linux-%{version}/lib
1423 %{_prefix}/src/linux-%{version}/mm
1424 %{_prefix}/src/linux-%{version}/net
1425 %{_prefix}/src/linux-%{version}/scripts
1426 %{_prefix}/src/linux-%{version}/.config
1427 %{_prefix}/src/linux-%{version}/.depend
1428 %{_prefix}/src/linux-%{version}/.hdepend
1429 %{_prefix}/src/linux-%{version}/COPYING
1430 %{_prefix}/src/linux-%{version}/CREDITS
1431 %{_prefix}/src/linux-%{version}/MAINTAINERS
1432 %{_prefix}/src/linux-%{version}/Makefile
1433 %{_prefix}/src/linux-%{version}/README
1434 %{_prefix}/src/linux-%{version}/REPORTING-BUGS
1435 %{_prefix}/src/linux-%{version}/Rules.make
1436 %{_prefix}/src/linux-%{version}/config*
1437 %endif
This page took 0.179482 seconds and 4 git commands to generate.