]> git.pld-linux.org Git - packages/kernel.git/blob - kernel.spec
- i2c updated; patch comments added; we are back in 2.4.24 shape but now with 2.4...
[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.3
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.25
26 Release:        0.1
27 License:        GPL v2
28 Group:          Base/Kernel
29 Source0:        ftp://ftp.kernel.org/pub/linux/kernel/v2.4/linux-2.4.24.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.25-i2c-%{i2c_version}-1.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-2.4.24
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 %patch32 -p1
642 # XXX: TODO - update patch?
643 #%patch31 -p1
644 %patch40 -p1
645 %patch50 -p1
646 %patch55 -p1
647 %patch56 -p1
648 %patch57 -p1
649 %patch58 -p1
650 %patch59 -p1
651 %patch60 -p1
652 %patch61 -p1
653 %patch62 -p1
654 %patch63 -p1
655 %patch64 -p1
656 %patch65 -p1
657 %patch70 -p1
658 %patch80 -p1
659 %patch100 -p1
660 %patch101 -p1
661 %patch102 -p1
662 %patch110 -p1
663 %patch120 -p1
664 %patch125 -p1
665 %patch130 -p1
666 # ???
667 #%patch150 -p1
668 %patch151 -p1
669 %patch152 -p1
670 %patch200 -p1
671 %patch205 -p1
672 %patch210 -p1
673 # mtrainer, problematic with some LG cdroms
674 #%patch215 -p1
675 #%patch216 -p1
676 %patch225 -p1
677 %patch226 -p1
678 %patch227 -p1
679 %patch235 -p1
680 %patch240 -p1
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 # broken on SMP machines!
698 #%patch1008 -p1
699 %patch1009 -p1
700 %patch1010 -p1
701 %patch1102 -p1
702 %patch1104 -p0
703 %patch1105 -p1
704 %patch1106 -p0
705 %patch1111 -p1
706 %patch1150 -p1
707 %patch1152 -p1
708 %patch1201 -p1
709 %patch1203 -p1
710 %patch1205 -p1
711 %patch1207 -p1
712 %patch1209 -p1
713 %patch1250 -p1
714 %patch1251 -p1
715 %patch1252 -p1
716 %patch1253 -p1
717 %patch1254 -p0
718 %patch1255 -p1
719 %patch1301 -p1
720 %patch1302 -p1
721 %patch1303 -p1
722 %patch1304 -p1
723 %patch1305 -p1
724 %patch1350 -p1
725 %patch1354 -p1
726 %patch1400 -p1
727 %patch1401 -p1
728 %patch1402 -p1
729 %patch1403 -p1
730 %patch1405 -p1
731 %patch1407 -p1
732 %patch1408 -p1
733 %patch1410 -p1
734 %patch1411 -p1
735 %patch1413 -p1
736 %patch1414 -p1
737 %patch1415 -p0
738 %patch1416 -p1
739 %patch1418 -p1
740 %patch1419 -p1
741 %patch1420 -p1
742 %patch1421 -p1
743
744 %patch2000 -p0
745 %patch2001 -p1
746 %patch2002 -p1
747 %patch2003 -p1
748 %ifarch ppc
749 %patch2004 -p1
750 %endif
751
752 %patch3000 -p1
753 %patch3002 -p1
754 %patch3003 -p1
755 %patch3004 -p1
756 cd drivers/char/drm
757 %patch3008 -p1
758 cd ../../..
759
760 %ifarch sparc64
761 %patch3010 -p1
762 %endif
763
764 %patch3011 -p1
765 #???
766 #%patch3012 -p1
767 %patch3013 -p1
768
769 # left for future updates
770 #%patch3500 -p1
771 %patch3600 -p1
772 %{?with_grsec:%patch4000 -p1}
773
774 mv -f drivers/scsi/sym53c8xx.c drivers/scsi/sym53c8xx_old.c
775
776 # Tekram DC395/315 U/UW SCSI host driver
777 echo Adding Tekram DC395/315 driver
778 patch -p1 -s < dc395/dc395-integ24.diff
779 install dc395/dc395x_trm.? dc395/README.dc395x drivers/scsi/
780 %patch270 -p1
781
782 # The following go last as they touch a lot of code
783 # and/or are on bcond and/or are ifarch
784
785 %ifarch %{ix86}
786 %if %{with win4lin}
787 echo Win4Lin patch ...
788 %patch900 -p1
789 %patch901 -p1
790 %endif
791 %endif
792
793 # Remove -g from drivers/atm/Makefile and net/ipsec/Makefile
794 echo -e ',s/EXTRA_CFLAGS.*-g//g\n,w' | ed net/ipsec/Makefile
795
796 # Fix EXTRAVERSION and CC in main Makefile
797 echo -e ',s/EXTRAVERSION =.*/EXTRAVERSION =/g\n,w' | ed Makefile
798 %ifarch sparc64
799 echo -e ',s/CC.*$(CROSS_COMPILE)gcc/CC          = sparc64-linux-gcc/g\n,w' | ed Makefile
800 %endif
801
802 %build
803 BuildKernel() {
804         %{?_debug:set -x}
805         # is this a special kernel we want to build?
806         BOOT=
807         smp=
808         [ "$1" = "BOOT" -o "$2" = "BOOT" ] && BOOT=yes
809         [ "$1" = "smp" -o "$2" = "smp" ] && smp=yes
810 %ifarch %{ix86}
811         if [ "$smp" = "yes" ]; then
812                 Config="ia32-smp"
813         else
814                 Config="ia32"
815         fi
816 %else
817         if [ "$smp" = "yes" ]; then
818                 Config="%{_target_cpu}-smp"
819         else
820                 Config="%{_target_cpu}"
821         fi
822 %endif
823         if [ "$BOOT" = "yes" ]; then
824                 KernelVer=%{version}-%{release}BOOT
825         else
826                 KernelVer=%{version}-%{release}$1
827         fi
828         echo "BUILDING THE NORMAL KERNEL $*..."
829 :> arch/%{base_arch}/defconfig
830         cat $RPM_SOURCE_DIR/kernel-$Config.config >> arch/%{base_arch}/defconfig
831 %ifarch i386
832         echo "CONFIG_M386=y" >> arch/%{base_arch}/defconfig
833 %endif
834 %ifarch i586
835         echo "CONFIG_M586=y" >> arch/%{base_arch}/defconfig
836 %endif
837 %ifarch i686
838         echo "CONFIG_M686=y" >> arch/%{base_arch}/defconfig
839 %endif
840 %ifarch athlon
841         echo "CONFIG_MK7=y" >> arch/%{base_arch}/defconfig
842 %endif
843         cat %{SOURCE1000} >> arch/%{base_arch}/defconfig
844         cat %{SOURCE1001} >> arch/%{base_arch}/defconfig
845
846 %ifarch sparc64
847         echo -e ',s/^CONFIG_FB_I810=.*/# CONFIG_FB_I810 is not set/g\n,w' | \
848                 ed arch/%{base_arch}/defconfig
849         echo -e ',s/CONFIG_IPSEC_AUTH_HMAC_SHA1=y/# CONFIG_IPSEC_AUTH_HMAC_SHA1 is not set/g\n,w' | \
850                 ed arch/%{base_arch}/defconfig
851 %endif
852
853         if [ "$BOOT" = "yes" ] ; then
854                 echo "# CONFIG_GRKERNSEC is not set" >> arch/%{base_arch}/defconfig
855         else
856                 :;
857 %if %{with grsec}
858                 echo -e ',s/CONFIG_CRYPTO_SHA256=m/CONFIG_CRYPTO_SHA256=y/g\n,w' | \
859                         ed arch/%{base_arch}/defconfig
860                 cat %{SOURCE1002} >> arch/%{base_arch}/defconfig
861 %endif
862         fi
863 %ifarch %{ix86}
864         cat %{SOURCE2000} >> arch/%{base_arch}/defconfig
865 %endif
866
867 %ifarch i386
868         echo -e ',s/# CONFIG_MATH_EMULATION is not set/CONFIG_MATH_EMULATION=y/g\n,w' | \
869                 ed arch/%{base_arch}/defconfig
870 %endif
871
872         %{__make} mrproper
873         ln -sf arch/%{base_arch}/defconfig .config
874
875 %ifarch sparc
876         sparc32 %{__make} oldconfig
877         sparc32 %{__make} dep clean
878 %else
879         %{__make} oldconfig
880         %{__make} dep clean
881 %endif
882         %{__make} include/linux/version.h
883
884 # making  table for soundmodem.
885         cd drivers/net/hamradio/soundmodem
886         %{__cc} -o gentbl -lm gentbl.c
887         ./gentbl
888         cd ../../../..
889
890 %ifarch %{ix86}
891         %{__make} bzImage
892 %endif
893 %ifarch sparc
894         sparc32 %{__make} boot
895 %else
896 %ifnarch %{ix86}
897         %{__make}
898 %endif
899 %endif
900 %ifarch sparc
901         sparc32 %{__make} modules
902 %else
903         %{__make} modules
904 %endif
905
906         mkdir -p $KERNEL_INSTALL_DIR/boot
907         install System.map $KERNEL_INSTALL_DIR/boot/System.map-$KernelVer
908 %ifarch %{ix86}
909         cp arch/i386/boot/bzImage $KERNEL_INSTALL_DIR/boot/vmlinuz-$KernelVer
910 %endif
911 %ifarch alpha sparc sparc64
912         gzip -cfv vmlinux > vmlinuz
913         install vmlinux $KERNEL_INSTALL_DIR/boot/vmlinux-$KernelVer
914         install vmlinuz $KERNEL_INSTALL_DIR/boot/vmlinuz-$KernelVer
915 %endif
916 %ifarch ppc
917         install vmlinux $KERNEL_INSTALL_DIR/boot/vmlinux-$KernelVer
918         install vmlinux $KERNEL_INSTALL_DIR/boot/vmlinuz-$KernelVer
919 %endif
920 %ifarch sparc
921         sparc32 %{__make} modules_install \
922         INSTALL_MOD_PATH=$KERNEL_INSTALL_DIR \
923         KERNELRELEASE=$KernelVer
924         echo KERNEL RELEASE $KernelVer
925 %else
926         %{__make} modules_install \
927         INSTALL_MOD_PATH=$KERNEL_INSTALL_DIR \
928         KERNELRELEASE=$KernelVer
929         echo KERNEL RELEASE $KernelVer
930 %endif
931         echo "CHECKING DEPENDENCIES FOR KERNEL MODULES"
932         /sbin/depmod --basedir $KERNEL_INSTALL_DIR -ae -F $KERNEL_INSTALL_DIR/boot/System.map-$KernelVer -r $KernelVer || echo
933 }
934
935 KERNEL_BUILD_DIR=`pwd`
936 KERNEL_INSTALL_DIR=$KERNEL_BUILD_DIR-installed
937 rm -rf $KERNEL_INSTALL_DIR
938 install -d $KERNEL_INSTALL_DIR
939
940 # make drivers/scsi/ missing files
941 #       (cd drivers/scsi; make -f M)
942
943 # UP KERNEL
944 %{?with_up:BuildKernel}
945
946 # SMP KERNEL
947 %{?with_smp:BuildKernel smp}
948
949 %if ! %{with up} && ! %{with smp}
950 # We need include/asm created somewhere
951 make symlinks
952 %endif
953
954 # BOOT kernel
955 %ifnarch i586 i686 athlon
956 KERNEL_INSTALL_DIR="$KERNEL_BUILD_DIR-installed%{_libdir}/bootdisk"
957 rm -rf $KERNEL_INSTALL_DIR
958 %{?with_boot:BuildKernel BOOT}
959 %endif
960
961 %install
962 rm -rf $RPM_BUILD_ROOT
963 umask 022
964
965 install -d $RPM_BUILD_ROOT%{_prefix}/{include,src/linux-%{version}}
966
967 KERNEL_BUILD_DIR=`pwd`
968
969 KERNEL_BUILD_INSTALL=no
970 %{?with_up:KERNEL_BUILD_INSTALL=yes}
971 %{?with_smp:KERNEL_BUILD_INSTALL=yes}
972 [ "$KERNEL_BUILD_INSTALL" = "yes" ] && cp -a $KERNEL_BUILD_DIR-installed/* $RPM_BUILD_ROOT
973
974 for i in "" smp ; do
975         if [ -e  $RPM_BUILD_ROOT/lib/modules/%{version}-%{release}$i ] ; then
976                 rm -f $RPM_BUILD_ROOT/lib/modules/%{version}-%{release}$i/build
977                 ln -sf %{_prefix}/src/linux-%{version} \
978                         $RPM_BUILD_ROOT/lib/modules/%{version}-%{release}$i/build
979         fi
980 done
981 ln -sf ../src/linux/include/linux $RPM_BUILD_ROOT%{_includedir}/linux
982 ln -sf linux-%{version} $RPM_BUILD_ROOT%{_prefix}/src/linux
983
984 %ifarch sparc sparc64
985 ln -s /usr/src/linux/include/asm-sparc $RPM_BUILD_ROOT%{_includedir}/asm-sparc
986 ln -s ../src/linux/include/asm-sparc64 $RPM_BUILD_ROOT%{_includedir}/asm-sparc64
987 %else
988 ln -sf ../src/linux/include/asm $RPM_BUILD_ROOT/usr/include/asm
989 %endif
990
991 %if %{with source}
992 cp -a . $RPM_BUILD_ROOT/usr/src/linux-%{version}
993 %else
994 cp -a {include,scripts,Makefile,Rules.make,Documentation} $RPM_BUILD_ROOT/usr/src/linux-%{version}
995 %endif
996
997 %ifarch sparc sparc64
998 sh %{SOURCE2} $RPM_BUILD_ROOT%{_includedir}
999 cp -a %{SOURCE2} $RPM_BUILD_ROOT%{_includedir}/asm/BuildASM
1000 %endif
1001
1002 cd $RPM_BUILD_ROOT%{_prefix}/src/linux-%{version}
1003
1004 # remove foreign architecture files
1005 cd include
1006 mkdir _asm_keep
1007 mv asm-generic _asm_keep
1008 %ifarch sparc sparc64
1009         mv asm-sparc* _asm_keep
1010 %else
1011         mv `resolvesymlink asm 2> /dev/null || readlink asm 2> /dev/null` _asm_keep
1012 %endif
1013 rm -rf asm-*
1014 mv _asm_keep/* .
1015 rmdir _asm_keep
1016 cd ..
1017
1018 %if %{with source}
1019 MYARCH=%{_arch}
1020 %ifarch %{ix86}
1021 MYARCH=i386
1022 %endif
1023 %ifarch sparc sparc64
1024 MYARCH="sparc sparc64"
1025 %endif
1026 cd arch
1027 mv $MYARCH ..
1028 cd ..
1029 rm -rf arch/*
1030 mv $MYARCH arch
1031 %endif
1032
1033 %if %{with source}
1034 %{__make} mrproper
1035
1036 find  -name "*~" -print | xargs rm -f
1037 find  -name "*.orig" -print | xargs rm -f
1038
1039 %ifarch %{ix86}
1040 cat $RPM_SOURCE_DIR/kernel-ia32.config > .config
1041 %else
1042 install $RPM_SOURCE_DIR/kernel-%{_target_cpu}.config .config
1043 %endif
1044
1045 %ifarch i386
1046 echo "CONFIG_M386=y" >> .config
1047 %endif
1048 %ifarch i586
1049 echo "CONFIG_M586=y" >> .config
1050 %endif
1051 %ifarch i686
1052 echo "CONFIG_M686=y" >> .config
1053 %endif
1054 %ifarch athlon
1055 echo "CONFIG_MK7=y" >> .config
1056 %endif
1057 cat %{SOURCE1000} >> .config
1058 cat %{SOURCE1001} >> .config
1059 %{?with_grsec:cat %{SOURCE1002} >> .config}
1060
1061 %ifarch sparc64
1062         echo -e ',s/^CONFIG_FB_I810=.*/# CONFIG_FB_I810 is not set/g\n,w' | \
1063                 ed .config
1064         echo -e ',s/CONFIG_IPSEC_AUTH_HMAC_SHA1=y/# CONFIG_IPSEC_AUTH_HMAC_SHA1 is not set/g\n,w' | \
1065                 ed .config
1066 %endif
1067
1068 %ifarch %{ix86}
1069 cat %{SOURCE2000} >> .config
1070 %endif
1071
1072 %ifarch sparc
1073 sparc32 %{__make} oldconfig
1074 %else
1075 %{__make} oldconfig
1076 %endif
1077
1078 mv include/linux/autoconf.h include/linux/autoconf-up.h
1079 cp .config config-up
1080
1081 %ifarch %{ix86}
1082 cat $RPM_SOURCE_DIR/kernel-ia32-smp.config >> .config
1083 %else
1084 install $RPM_SOURCE_DIR/kernel-%{_target_cpu}-smp.config .config
1085 %endif
1086
1087 %ifarch i386
1088 echo "CONFIG_M386=y" >> .config
1089 %endif
1090 %ifarch i586
1091 echo "CONFIG_M586=y" >> .config
1092 %endif
1093 %ifarch i686
1094 echo "CONFIG_M686=y" >> .config
1095 %endif
1096 %ifarch athlon
1097 echo "CONFIG_MK7=y" >> .config
1098 %endif
1099
1100 cat %{SOURCE1000} >> .config
1101 cat %{SOURCE1001} >> .config
1102 %{?with_grsec:cat %{SOURCE1002} >> .config}
1103
1104 %ifarch sparc64
1105         echo -e ',s/^CONFIG_FB_I810=.*/# CONFIG_FB_I810 is not set/g\n,w' | \
1106                 ed .config
1107         echo -e ',s/CONFIG_IPSEC_AUTH_HMAC_SHA1=y/# CONFIG_IPSEC_AUTH_HMAC_SHA1 is not set/g\n,w' | \
1108                 ed .config
1109 %endif
1110
1111 %ifarch %{ix86}
1112 cat %{SOURCE2000} >> .config
1113 %endif
1114
1115 %ifarch sparc
1116 sparc32 %{__make} oldconfig
1117 %else
1118 %{__make} oldconfig
1119 %endif
1120 mv include/linux/autoconf.h include/linux/autoconf-smp.h
1121 cp .config config-smp
1122 %endif
1123
1124 install %{SOURCE1} $RPM_BUILD_ROOT/usr/src/linux-%{version}/include/linux/autoconf.h
1125
1126 %if %{with source}
1127 # this generates modversions info which we want to include and we may as
1128 # well include the depends stuff as well
1129 %{__make} symlinks
1130 %{__make} include/linux/version.h
1131 #%{__make} "`pwd`/include/linux/modversions.h"
1132 %endif
1133 rm -f include/linux/modversions.h
1134 echo "#include <linux/modsetver.h>" > include/linux/modversions.h
1135
1136
1137 # this generates modversions info which we want to include and we may as
1138 # well include the depends stuff as well, after we fix the paths
1139
1140 %if %{with source}
1141 %{__make} depend
1142 find $RPM_BUILD_ROOT/usr/src/linux-%{version} -name ".*depend" \
1143         -exec /bin/sh -c "echo -e \",s|$RPM_BUILD_ROOT||g\n,w\" | ed {}" \;
1144
1145 %{__make} clean
1146 rm -f scripts/mkdep
1147 rm -f drivers/net/hamradio/soundmodem/gentbl
1148 %endif
1149
1150 # BOOT
1151 %if %{with boot}
1152 %ifnarch i586 i686 athlon
1153 install -d $RPM_BUILD_ROOT%{_libdir}/bootdisk
1154 cp -rdp $KERNEL_BUILD_DIR-installed%{_libdir}/bootdisk/* $RPM_BUILD_ROOT%{_libdir}/bootdisk
1155 %endif
1156 %endif
1157
1158 %clean
1159 rm -rf $RPM_BUILD_ROOT
1160 rm -rf $RPM_BUILD_DIR/linux-%{version}-installed
1161
1162 %post
1163 mv -f /boot/vmlinuz /boot/vmlinuz.old 2> /dev/null > /dev/null
1164 mv -f /boot/System.map /boot/System.map.old 2> /dev/null > /dev/null
1165 ln -sf vmlinuz-%{version}-%{release} /boot/vmlinuz
1166 ln -sf System.map-%{version}-%{release} /boot/System.map
1167
1168 if [ ! -L /lib/modules/%{version} ] ; then
1169         mv -f /lib/modules/%{version} /lib/modules/%{version}.rpmsave > /dev/null 2>&1
1170 fi
1171 rm -f /lib/modules/%{version}
1172 ln -snf %{version}-%{release} /lib/modules/%{version}
1173 /sbin/depmod -a -F /boot/System.map-%{version}-%{release} %{version}-%{release}
1174
1175 /sbin/geninitrd -f --initrdfs=rom /boot/initrd-%{version}-%{release}.gz %{version}-%{release}
1176 mv -f /boot/initrd /boot/initrd.old
1177 ln -sf initrd-%{version}-%{release}.gz /boot/initrd
1178
1179 if [ -f %{_prefix}/src/linux-%{version}/config-up ] ; then
1180         ln -s %{_prefix}/src/linux-%{version}/config-up %{_prefix}/src/linux-%{version}/.config
1181 fi
1182
1183 if [ -x /sbin/rc-boot ] ; then
1184         /sbin/rc-boot 1>&2 || :
1185 fi
1186
1187 %post smp
1188 mv -f /boot/vmlinuz /boot/vmlinuz.old 2> /dev/null > /dev/null
1189 mv -f /boot/System.map /boot/System.map.old 2> /dev/null > /dev/null
1190 ln -sf vmlinuz-%{version}-%{release}smp /boot/vmlinuz
1191 ln -sf System.map-%{version}-%{release}smp /boot/System.map
1192
1193 if [ ! -L /lib/modules/%{version} ] ; then
1194         mv -f /lib/modules/%{version} /lib/modules/%{version}.rpmsave > /dev/null 2>&1
1195 fi
1196 rm -f /lib/modules/%{version}
1197 ln -snf %{version}-%{release}smp /lib/modules/%{version}
1198 /sbin/depmod -a -F /boot/System.map-%{version}-%{release}smp %{version}-%{release}smp
1199
1200 /sbin/geninitrd -f --initrdfs=rom /boot/initrd-%{version}-%{release}smp.gz %{version}-%{release}smp
1201 mv -f /boot/initrd /boot/initrd.old
1202 ln -sf initrd-%{version}-%{release}smp.gz /boot/initrd
1203
1204 if [ -f %{_prefix}/src/linux-%{version}/config-smp ] ; then
1205         ln -s %{_prefix}/src/linux-%{version}/config-smp %{_prefix}/src/linux-%{version}/.config
1206 fi
1207
1208 if [ -x /sbin/rc-boot ] ; then
1209         /sbin/rc-boot 1>&2 || :
1210 fi
1211
1212 %post BOOT
1213 if [ ! -L %{_libdir}/bootdisk/lib/modules/%{version} ] ; then
1214         mv -f %{_libdir}/bootdisk/lib/modules/%{version} %{_libdir}/bootdisk/lib/modules/%{version}.rpmsave
1215 fi
1216 if [ ! -L %{_libdir}/bootdisk/boot/vmlinuz-%{version} ] ; then
1217         mv -f %{_libdir}/bootdisk/boot/vmlinuz-%{version} %{_libdir}/bootdisk/boot/vmlinuz-%{version}.rpmsave
1218 fi
1219 rm -f %{_libdir}/bootdisk/lib/modules/%{version}
1220 ln -snf %{version}-%{release}BOOT %{_libdir}/bootdisk/lib/modules/%{version}
1221 rm -f %{_libdir}/bootdisk/boot/vmlinuz-%{version}
1222 ln -snf vmlinuz-%{version}-%{release}BOOT %{_libdir}/bootdisk/boot/vmlinuz-%{version}
1223
1224 %postun
1225 if [ -L /lib/modules/%{version} ]; then
1226         if [ "`ls -l /lib/modules/%{version} | awk '{ print $11 }'`" = "%{version}-%{release}" ]; then
1227                 if [ "$1" = "0" ]; then
1228                         rm -f /lib/modules/%{version}
1229                 fi
1230         fi
1231 fi
1232 rm -f /boot/initrd-%{version}-%{release}.gz
1233
1234 %post pcmcia
1235 /sbin/depmod -a -F /boot/System.map-%{version}-%{release} %{version}-%{release}
1236
1237 %postun pcmcia
1238 /sbin/depmod -a -F /boot/System.map-%{version}-%{release} %{version}-%{release} > /dev/null 2>&1
1239
1240 %post drm
1241 /sbin/depmod -a -F /boot/System.map-%{version}-%{release} %{version}-%{release}
1242
1243 %postun drm
1244 /sbin/depmod -a -F /boot/System.map-%{version}-%{release} %{version}-%{release} > /dev/null 2>&1
1245
1246 %postun smp
1247 if [ -L /lib/modules/%{version} ]; then
1248         if [ "`ls -l /lib/modules/%{version} | awk '{ print $11 }'`" = "%{version}-%{release}smp" ]; then
1249                 if [ "$1" = "0" ]; then
1250                         rm -f /lib/modules/%{version}
1251                 fi
1252         fi
1253 fi
1254 rm -f /boot/initrd-%{version}-%{release}smp.gz
1255
1256 %post smp-pcmcia
1257 /sbin/depmod -a -F /boot/System.map-%{version}-%{release}smp %{version}-%{release}smp
1258
1259 %postun smp-pcmcia
1260 /sbin/depmod -a -F /boot/System.map-%{version}-%{release}smp %{version}-%{release}smp > /dev/null 2>&1
1261
1262 %post smp-drm
1263 /sbin/depmod -a -F /boot/System.map-%{version}-%{release}smp %{version}-%{release}smp
1264
1265 %postun smp-drm
1266 /sbin/depmod -a -F /boot/System.map-%{version}-%{release}smp %{version}-%{release}smp > /dev/null 2>&1
1267
1268 %postun BOOT
1269 if [ -L %{_libdir}/bootdisk/lib/modules/%{version} ]; then
1270         if [ "`ls -l %{_libdir}/bootdisk/lib/modules/%{version} | awk '{ print $11 }'`" = "%{version}-%{release}BOOT" ]; then
1271                 if [ "$1" = "0" ]; then
1272                         rm -f %{_libdir}/bootdisk/lib/modules/%{version}
1273                 fi
1274         fi
1275 fi
1276
1277 %post headers
1278 rm -f /usr/src/linux
1279 ln -snf linux-%{version} /usr/src/linux
1280
1281 %postun headers
1282 if [ -L /usr/src/linux ]; then
1283         if [ "`ls -l /usr/src/linux | awk '{ print $11 }'`" = "linux-%{version}" ]; then
1284                 if [ "$1" = "0" ]; then
1285                         rm -f /usr/src/linux
1286                 fi
1287         fi
1288 fi
1289
1290 %if %{with up}
1291 %files
1292 %defattr(644,root,root,755)
1293 %ifarch alpha sparc sparc64 ppc
1294 /boot/vmlinux-%{version}-%{release}
1295 %endif
1296 /boot/vmlinuz-%{version}-%{release}
1297 /boot/System.map-%{version}-%{release}
1298 %dir /lib/modules/%{version}-%{release}
1299 /lib/modules/%{version}-%{release}/kernel
1300 %ifnarch sparc sparc64
1301 %exclude /lib/modules/%{version}-%{release}/kernel/drivers/pcmcia
1302 %exclude /lib/modules/%{version}-%{release}/kernel/drivers/ide/legacy/*-cs.o*
1303 %exclude /lib/modules/%{version}-%{release}/kernel/drivers/mtd/maps/pcmcia*
1304 %exclude /lib/modules/%{version}-%{release}/kernel/drivers/net/pcmcia
1305 %exclude /lib/modules/%{version}-%{release}/kernel/drivers/scsi/pcmcia
1306 %exclude /lib/modules/%{version}-%{release}/kernel/drivers/char/pcmcia
1307 %exclude /lib/modules/%{version}-%{release}/kernel/drivers/net/wireless/*_cs.o*
1308 %exclude /lib/modules/%{version}-%{release}/kernel/drivers/parport/*_cs.o*
1309 %exclude /lib/modules/%{version}-%{release}/kernel/drivers/bluetooth/*_cs.o*
1310 %endif
1311 %ifnarch sparc sparc64
1312 %exclude /lib/modules/%{version}-%{release}/kernel/drivers/isdn/hisax/*_cs.o*
1313 %ifnarch alpha
1314 %exclude /lib/modules/%{version}-%{release}/kernel/drivers/isdn/avmb1/avm_cs.o*
1315 %ifnarch ppc
1316 %exclude /lib/modules/%{version}-%{release}/kernel/drivers/telephony/*_pcmcia.o*
1317 %endif
1318 %endif
1319 %endif
1320 %ifnarch sparc
1321 %exclude /lib/modules/%{version}-%{release}/kernel/drivers/char/drm
1322 %endif
1323 /lib/modules/%{version}-%{release}/build
1324 %ghost /lib/modules/%{version}-%{release}/modules.*
1325
1326 %ifnarch sparc sparc64
1327 %files pcmcia
1328 %defattr(644,root,root,755)
1329 /lib/modules/%{version}-%{release}/kernel/drivers/pcmcia
1330 /lib/modules/%{version}-%{release}/kernel/drivers/ide/legacy/*-cs.o*
1331 /lib/modules/%{version}-%{release}/kernel/drivers/mtd/maps/pcmcia*
1332 /lib/modules/%{version}-%{release}/kernel/drivers/net/pcmcia
1333 /lib/modules/%{version}-%{release}/kernel/drivers/scsi/pcmcia
1334 /lib/modules/%{version}-%{release}/kernel/drivers/char/pcmcia
1335 /lib/modules/%{version}-%{release}/kernel/drivers/net/wireless/*_cs.o*
1336 /lib/modules/%{version}-%{release}/kernel/drivers/parport/*_cs.o*
1337 /lib/modules/%{version}-%{release}/kernel/drivers/bluetooth/*_cs.o*
1338 /lib/modules/%{version}-%{release}/kernel/drivers/isdn/hisax/*_cs.o*
1339 %ifnarch alpha
1340 /lib/modules/%{version}-%{release}/kernel/drivers/isdn/avmb1/avm_cs.o*
1341 %ifnarch ppc
1342 /lib/modules/%{version}-%{release}/kernel/drivers/telephony/*_pcmcia.o*
1343 %endif
1344 %endif
1345 %endif
1346
1347 %ifnarch sparc
1348 %files drm
1349 %defattr(644,root,root,755)
1350 /lib/modules/%{version}-%{release}/kernel/drivers/char/drm
1351 %endif                  # %%{with up}
1352 %endif
1353
1354 %if %{with smp}
1355 %files smp
1356 %defattr(644,root,root,755)
1357 %ifarch alpha sparc sparc64 ppc
1358 /boot/vmlinux-%{version}-%{release}smp
1359 %endif
1360 /boot/vmlinuz-%{version}-%{release}smp
1361 /boot/System.map-%{version}-%{release}smp
1362 %dir /lib/modules/%{version}-%{release}smp
1363 /lib/modules/%{version}-%{release}smp/kernel
1364 %ifnarch sparc sparc64
1365 %exclude /lib/modules/%{version}-%{release}smp/kernel/drivers/pcmcia
1366 %exclude /lib/modules/%{version}-%{release}smp/kernel/drivers/ide/legacy/*-cs.o*
1367 %exclude /lib/modules/%{version}-%{release}smp/kernel/drivers/mtd/maps/pcmcia*
1368 %exclude /lib/modules/%{version}-%{release}smp/kernel/drivers/net/pcmcia
1369 %exclude /lib/modules/%{version}-%{release}smp/kernel/drivers/scsi/pcmcia
1370 %exclude /lib/modules/%{version}-%{release}smp/kernel/drivers/char/pcmcia
1371 %exclude /lib/modules/%{version}-%{release}smp/kernel/drivers/net/wireless/*_cs.o*
1372 %exclude /lib/modules/%{version}-%{release}smp/kernel/drivers/parport/*_cs.o*
1373 %exclude /lib/modules/%{version}-%{release}smp/kernel/drivers/bluetooth/*_cs.o*
1374 %endif
1375 %ifnarch ppc sparc sparc64
1376 %exclude /lib/modules/%{version}-%{release}smp/kernel/drivers/isdn/hisax/*_cs.o*
1377 %ifnarch alpha
1378 %exclude /lib/modules/%{version}-%{release}smp/kernel/drivers/isdn/avmb1/avm_cs.o*
1379 %exclude /lib/modules/%{version}-%{release}smp/kernel/drivers/telephony/*_pcmcia.o*
1380 %endif
1381 %endif
1382 %ifnarch sparc
1383 %exclude /lib/modules/%{version}-%{release}smp/kernel/drivers/char/drm
1384 %endif
1385 /lib/modules/%{version}-%{release}smp/build
1386 %ghost /lib/modules/%{version}-%{release}smp/modules.*
1387
1388 %ifnarch sparc sparc64
1389 %files -n kernel-smp-pcmcia
1390 %defattr(644,root,root,755)
1391 /lib/modules/%{version}-%{release}smp/kernel/drivers/pcmcia
1392 /lib/modules/%{version}-%{release}smp/kernel/drivers/ide/legacy/*-cs.o*
1393 /lib/modules/%{version}-%{release}smp/kernel/drivers/mtd/maps/pcmcia*
1394 /lib/modules/%{version}-%{release}smp/kernel/drivers/net/pcmcia
1395 /lib/modules/%{version}-%{release}smp/kernel/drivers/scsi/pcmcia
1396 /lib/modules/%{version}-%{release}smp/kernel/drivers/char/pcmcia
1397 /lib/modules/%{version}-%{release}smp/kernel/drivers/net/wireless/*_cs.o*
1398 /lib/modules/%{version}-%{release}smp/kernel/drivers/parport/*_cs.o*
1399 /lib/modules/%{version}-%{release}smp/kernel/drivers/bluetooth/dtl1_cs.o*
1400 %ifnarch ppc
1401 /lib/modules/%{version}-%{release}smp/kernel/drivers/isdn/hisax/*_cs.o*
1402 %ifnarch alpha
1403 /lib/modules/%{version}-%{release}smp/kernel/drivers/isdn/avmb1/avm_cs.o*
1404 /lib/modules/%{version}-%{release}smp/kernel/drivers/telephony/*_pcmcia.o*
1405 %endif
1406 %endif
1407 %endif
1408
1409 %ifnarch sparc
1410 %files -n kernel-smp-drm
1411 %defattr(644,root,root,755)
1412 /lib/modules/%{version}-%{release}smp/kernel/drivers/char/drm
1413 %endif                  # %%{with smp}
1414 %endif
1415
1416 %if %{with boot}
1417 %ifnarch i586 i686 athlon               # narch
1418 %files BOOT
1419 %defattr(644,root,root,755)
1420 %ifarch alpha sparc sparc64 ppc         # arch
1421 %{_libdir}/bootdisk/boot/vmlinux-%{version}-%{release}BOOT
1422 %endif                          #arch
1423 %{_libdir}/bootdisk/boot/vmlinuz-%{version}-%{release}BOOT
1424 %{_libdir}/bootdisk/boot/System.map-%{version}-%{release}BOOT
1425 %dir %{_libdir}/bootdisk/lib/modules/%{version}-%{release}BOOT
1426 %{_libdir}/bootdisk/lib/modules/%{version}-%{release}BOOT/kernel
1427 %{_libdir}/bootdisk/lib/modules/%{version}-%{release}BOOT/build
1428 %ghost %{_libdir}/bootdisk/lib/modules/%{version}-%{release}BOOT/modules.*
1429 %endif                          # narch
1430 %endif                          # %%{with boot}
1431
1432 %files headers
1433 %defattr(644,root,root,755)
1434 %dir %{_prefix}/src/linux-%{version}
1435 %{_prefix}/src/linux-%{version}/include
1436
1437 %if %{with doc}
1438 %files doc
1439 %defattr(644,root,root,755)
1440 %{_prefix}/src/linux-%{version}/Documentation
1441 %endif
1442
1443 %if %{with source}
1444 %files source
1445 %defattr(644,root,root,755)
1446 %{_prefix}/src/linux-%{version}/arch
1447 %{_prefix}/src/linux-%{version}/crypto
1448 %{_prefix}/src/linux-%{version}/drivers
1449 %{_prefix}/src/linux-%{version}/fs
1450 %{_prefix}/src/linux-%{version}/init
1451 %{?with_grsec:%{_prefix}/src/linux-%{version}/grsecurity}
1452 %{_prefix}/src/linux-%{version}/ipc
1453 #%{_prefix}/src/linux-%{version}/kdb
1454 %{_prefix}/src/linux-%{version}/kernel
1455 %{_prefix}/src/linux-%{version}/lib
1456 %{_prefix}/src/linux-%{version}/mm
1457 %{_prefix}/src/linux-%{version}/net
1458 %{_prefix}/src/linux-%{version}/scripts
1459 %{_prefix}/src/linux-%{version}/.config
1460 %{_prefix}/src/linux-%{version}/.depend
1461 %{_prefix}/src/linux-%{version}/.hdepend
1462 %{_prefix}/src/linux-%{version}/COPYING
1463 %{_prefix}/src/linux-%{version}/CREDITS
1464 %{_prefix}/src/linux-%{version}/MAINTAINERS
1465 %{_prefix}/src/linux-%{version}/Makefile
1466 %{_prefix}/src/linux-%{version}/README
1467 %{_prefix}/src/linux-%{version}/REPORTING-BUGS
1468 %{_prefix}/src/linux-%{version}/Rules.make
1469 %{_prefix}/src/linux-%{version}/config*
1470 %endif
This page took 0.140038 seconds and 4 git commands to generate.