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