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