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