#
+# SEE PLD-doc/maintainers file before you edit this file!!
+#
# If you define the following as 1, only kernel, -headers and -source
# packages will be built
#
-# _without_smp - don't build SMP kernel
-# _without_up - don't build UP kernel
-# _without_boot - don't build BOOT kernel
-# _without_source - don't build source
-# _without_doc - don't build documentation package
-# _without_grsec - don't apply grsecurity patch
-# _without_kheaders - build without support for glibc-kernel-headers
-#
-%define base_arch %(echo %{_target_cpu} | sed 's/i.86/i386/;s/athlon/i386/')
-%define no_install_post_strip 1
-%define no_install_post_compress_modules 1
+# TODO:
+# - check I2C
+# - fix lirc_sasem (usb api)
+# - update HP-OmniBook patchset (2.6.1-all-in-1.patch)
+# - reiserfs4
+# - update grsecurity patch
+# - update i2o patchset
+# - update software suspend patch
+# - add distcc support (and don't break crossbuild!)
#
-%define pre_version rc6
+# Conditional build:
+%bcond_without BOOT # don't build BOOT kernel
+%bcond_without smp # don't build SMP kernel
+%bcond_without up # don't build UP kernel
+%bcond_without source # don't build kernel-source package
+%bcond_without grsec # build without grsec
+%bcond_with pax # enable PaX
+%bcond_with execshield # build without exec-shield
+%bcond_with pramfs # build pramfs support (EXPERIMENTAL)
+%bcond_with verbose # verbose build (V=1)
+%bcond_with preemptive # build preemptive kernel
+%bcond_with fbsplash # build with fbsplash
+%bcond_with swsuspend # build with software suspend v2 (EXPERIMENTAL)
+
+%{?debug:%define with_verbose 1}
+
+# see TODO
+%if %{with grsec}
+%undefine with_grsec
+%endif
+
+%if !%{with grsec}
+%undefine with_pax
+%endif
+
+%ifarch sparc
+# sparc32 is missing important updates from 2.5 cycle - won't build
+%undefine with_smp
+%endif
+%ifarch ia64
+# broken
+%undefine with_up
+%endif
+
+%ifarch i586 i686 pentium3 pentium4 athlon
+%undefine with_BOOT
+%endif
+# temporary as BOOT is not finished yet
+%undefine with_BOOT
+
+## Program required by kernel to work.
+%define _binutils_ver 2.12
+%define _util_linux_ver 2.10o
+%define _module_init_tool_ver 0.9.10
+%define _e2fsprogs_ver 1.29
+%define _jfsutils_ver 1.1.3
+%define _reiserfsprogs_ver 3.6.3
+%define _xfsprogs_ver 2.6.0
+%define _pcmcia_cs_ver 3.1.21
+%define _quota_tools_ver 3.09
+%define _PPP_ver 2.4.0
+%define _isdn4k_utils_ver 3.1pre1
+%define _nfs_utils_ver 1.0.5
+%define _procps_ver 3.2.0
+%define _oprofile_ver 0.5.3
+
+#define _post_ver .1
+%define _post_ver %{nil}
+%define _rel 0.22
+%define _cset 20040914_1622
+%define _apply_cset 1
+
+%define _netfilter_snap 20040629
+
+%define _enable_debug_packages 0
+%define no_install_post_strip 1
+%define no_install_post_chrpath 1
+
+%define pcmcia_version 3.1.22
%define drm_xfree_version 4.3.0
-%define hostap_version 2002-10-12
-%define netfilter_snap 20030915
-%define i2c_version 2.8.0
+#define pwc_version 9.0.2
+
Summary: The Linux kernel (the core of the Linux operating system)
Summary(de): Der Linux-Kernel (Kern des Linux-Betriebssystems)
-Summary(es): Núcleo (Kernel) linux genérico
Summary(fr): Le Kernel-Linux (La partie centrale du systeme)
Summary(pl): J±dro Linuksa
-Summary(pt_BR): Kernel Linux (a parte central do sistema operacional Linux)
Name: kernel
-Version: 2.4.22
-Release: 0.3
+Version: 2.6.9%{_post_ver}
+Release: %{_rel}
+Epoch: 3
License: GPL
Group: Base/Kernel
-Source0: ftp://ftp.kernel.org/pub/linux/kernel/v2.4/linux-%{version}.tar.bz2
-# Source0-md5: 75dc85149b06ac9432106b8941eb9f7b
+#define _rc %{nil}
+%define _rc -rc2
+Source0: ftp://ftp.kernel.org/pub/linux/kernel/v2.6/testing/linux-%{version}%{_rc}.tar.bz2
+# Source0-md5: b3d4a5c384d56ab974d1ac864b995ac4
+#Source0: ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-%{version}%{_rc}.tar.bz2
Source1: %{name}-autoconf.h
-Source2: %{name}-BuildASM.sh
-Source3: http://www.garloff.de/kurt/linux/dc395/dc395-141.tar.gz
-# Source3-md5: 8ed492197244b6a772270417c66214d3
-Source4: linux-2.4.22-netfilter-%{netfilter_snap}.tar.gz
-# Source4-md5: 6b6cff7293a7b75474c97c9740628bf4
-Source5: linux-2.4.19-netfilter-IMQ.patch.tar.bz2
-# Source5-md5: b8f2f7a268a5cb75fabcaec3b5d45fcd
-Source7: http://www10.software.ibm.com/developer/opensource/jfs/project/pub/jfs-2.4-1.1.2.tar.gz
-# Source7-md5: 2473f345c66683a03ad27ff132d405b7
-Source8: http://www.xfree86.org/~alanh/linux-drm-%{drm_xfree_version}-kernelsource.tar.gz
-# Source8-md5: 34515784c7b67f6cc9169aa9eed982c7
-Source9: http://hostap.epitest.fi/releases/hostap-%{hostap_version}.tar.gz
-# Source9-md5: f5170147792a591120437dd33dbb106d
-Source10: linux-2.4.20-aacraid.tar.bz2
-# Source10-md5: 3da1f4b229685766cb4f2f5ce242c0d2
-Source20: %{name}-ia32.config
-Source21: %{name}-ia32-smp.config
-Source50: %{name}-sparc.config
-Source51: %{name}-sparc-smp.config
-Source60: %{name}-sparc64.config
-Source61: %{name}-sparc64-smp.config
-Source70: %{name}-alpha.config
-Source71: %{name}-alpha-smp.config
-Source73: %{name}-ppc.config
-Source74: %{name}-ppc-smp.config
-Source1000: %{name}-addon.config
-Source1001: %{name}-netfilter.config
-Source1002: %{name}-grsec.config
-Source2000: %{name}-win4lin.config
-
-# New features/updates/backports
-
-# Essential stuff
-
-Patch0: %{name}-pldfblogo.patch
-# from ftp://ftp.kernel.org/pub/linux/kernel/people/hvr/testing/
-Patch10: patch-cryptoloop-jari-2.4.22-rc2.0
-# from ftp://ftp.xs4all.nl/pub/crypto/freeswan/freeswan-*
-Patch12: linux-2.4.21-freeswan-2.00.patch.gz
-Patch15: linux-2.4.21-sched-O1.patch
-# http://dl.sourceforge.net/user-mode-linux/uml-patch-2.4.20-6.bz2
-Patch20: uml-patch-2.4.20-6-21.bz2
-Patch21: linux-2.4.21-uml-o1.patch
-# http://dl.sourceforge.net/user-mode-linux/host-skas3.patch
-Patch22: linux-2.4.20-uml-host-skas3.patch
-Patch23: linux-bigger-printk-buffer.patch
-
-# New filesystems
-
-# http://linux-xfs.sgi.com/projects/xfs/
-#Patch25: linux-2.4.21-core-xfs-1.3.0.patch.gz
-#Patch26: linux-xfs-1.3.0pre5.patch.gz
-Patch25: linux-2.4.22-xfs-2003-09-03.patch.gz
-# http://acl.bestbits.at/
-Patch30: linux-2.4.21-jfs-xattr.patch
-Patch31: linux-2.4.21-jfs-acl.patch
-Patch32: linux-2.4.22-ea+acl+nfsacl-0.8.60.diff.gz
-# http://dl.sourceforge.net/linux-ntfs/
-Patch40: linux-2.4.22-ntfs-2.1.4c.patch.gz
-# FC01_davfs_0.2.4.patch
-Patch50: linux-2.4.20-davfs-0.2.4.patch.bz2
-# FC02_davfs__FUNCTION__.patch
-Patch55: linux-2.4.20-davfs-_FUNCTION_.patch
-# ftp://ftp.suse.com/pub/people/jeffm/reiserfs/aclea/
-Patch60: linux-2.4.22-reiserfs-acl+ea.patch
-# data logging and quota for reiserfs
-# ftp://ftp.suse.com/pub/people/mason/patches/data-logging/2.4.21/
-Patch61: linux-2.4.22-reiserfs-data-logging+quota.patch.gz
-# http://dl.sourceforge.net/squashfs/squashfs-1.3.tar.gz
-Patch65: squashfs1.3-2.4.21-patch
-#from http://sci.felk.cvut.cz/nwd/linux/nwd-patch-2.4.19
-Patch70: nwd-2.4.21.patch
-Patch80: linux-2.4.22-intermezzo-acl.patch
-
-# Networking
-
-# new version of netfilter.
-Patch100: linux-2.4.22-netfilter-%{netfilter_snap}.patch.gz
-# http://ebtables.sourceforge.net/
-Patch110: ebtables-brnf-2_vs_2.4.22.diff.gz
-# http://www.linuxvirtualserver.org/software/kernel-2.4/linux-2.4.18-ipvs-%{ipvs_version}.patch.gz
-Patch115: linux-2.4.22-ipvs-1.0.9.patch.gz
-# http://trash.net/~kaber/imq/
-Patch120: imq-2.4.18.diff-10
-# ftp://ftp.samba.org/pub/unpacked/ppp/linux/mppe/
-Patch125: linux-2.4.18-mppe.patch
-Patch130: linux-2.4.22-tun-new-style.patch
-
-# ATM bugfixes
-# Patches by Chas Williams <chas@locutus.cmf.nrl.navy.mil>
-# Included in Chas patch:
-# http://tulipe.cnam.fr/personne/lizzi/linux/linux-2.3.99-pre6-fore200e-0.2f.tar.gz
-# http://christophe.lizzi.free.fr/linux/linux-2.4.0-test9-fore200e-0.3.tar.gz
-# ftp://ftp.cmf.nrl.navy.mil/pub/chas/linux-atm/
-Patch150: linux-2.4.21-atm_diffs.patch
-Patch151: ftp://ftp.cmf.nrl.navy.mil/pub/chas/linux-atm/vbr/vbr-kernel-diffs
-Patch152: linux-2.4.22-fore200e-0.2f.patch
-
-# patch for patch in Source9
-Patch190: hostap-2.4.19-rc3-patch.patch
-
-# New devices/drivers
-
-# http://people.sistina.com/~thornber/patches/2.4-stable/
-Patch200: linux-2.4.22-dm-1.patch
-
-# EVMS support (http://www.sourceforge.net/projects/evms/)
-# Disabled due to conflicts with LVM2 and device mapper tools
-Patch205: linux-2.4.22-evms-2.1.1.patch
-
-#from http://dl.sourceforge.net/i810fb/linux-2.4.20-i810fb.diff.bz2
-Patch210: linux-2.4.21-I810FB.patch.gz
-
-# Support for CDRW packet writing
-Patch215: %{name}-cdrw-packet.patch
-Patch216: %{name}-cd-mrw-2.patch
-Patch225: wrr-linux-2.4.9.patch
-Patch226: linux-2.4.18-esfq.diff
-Patch227: layer7-kernel2.4patch-v0.1.4.patch
-
-Patch231: linux-2.4.21-aic7xxx-mmapio.patch
-Patch235: linux-2.4.20-audigy.patch.bz2
-Patch240: linux-2.4.20-ecc.patch
-Patch245: linux-2.4.20-01-edd.patch
-Patch246: linux-2.4.20-02-edd-allocate.patch
-# i2c - version 2.8.0
-Patch255: linux-2.4.22-i2c-%{i2c_version}.patch
-Patch256: linux-2.4.21-i2c-headers.patch
-Patch257: linux-2.4.21-i2c-sparc64.patch
-Patch265: linux-2.4.20-e820.patch
-# Syntax bug
-Patch270: dc395-tab.patch
-# http://www.qlogic.com/
-Patch275: linux-2.4.20-qla2x00-v6.04.00-fo.patch.gz
-# ftp://ftp.lsil.com/pub/linux-megaraid/drivers/version-1.18j/megaraid-v1.18j.tgz
-Patch280: %{name}-megaraid.patch
-
-# The following go last as they touch a lot of code
-# and/or are on bcond and/or are ifarch
-
-# Win4Lin
-Patch900: linux-2.4.20-Win4Lin.PLD.patch.bz2
-Patch991: linux-2.4.20-Win4Lin-mki-adapter.patch.bz2
-
-# Assorted bugfixes
-
-# jam - http://giga.cps.unizar.es/~magallon/linux/kernel/
-Patch1000: jam-04-clone-detached.patch
-Patch1002: jam-06-force-inline.patch
-Patch1003: jam-07-scsi-error-tmout.patch
-Patch1006: jam-10-highpage-init.patch
-Patch1007: jam-11-self_exec_id.patch
-Patch1008: jam-15-fast-csum-D.patch
-Patch1009: jam-21-mem-barriers.patch
-Patch1010: jam-30-smptimers-A0.patch
-
-Patch1102: linux-2.4.20-lvm-updates.patch
-
-# IrDA patch for broken IBM Latpops
-Patch1104: linux-2.4.21-irda-ibm.patch
-
-# fix lun probing on multilun RAID chassis
-Patch1105: linux-2.4.12-scsi_scan.patch
-Patch1106: linux-scsi-debug-bug.patch
-
-# This patch allows to create more than one sound device using alsa
-# and devfs with two or more sound cards
-Patch1111: linux-sound_core.patch
-
-# rivafb - fix for text background in 16bpp modes
-Patch1150: linux-rivafb16.patch
-Patch1152: linux-2.4.20-agp_uninorth.patch
-Patch1154: linux-2.4.20-drm-Makefile.patch
-
-Patch1201: linux-2.4.21-cpqfc.patch
-Patch1203: linux-2.4.20-amd-golem.patch
-Patch1205: linux-53c7,8xx-build.fix
-Patch1207: linux-2.4.20-serverworks.patch
-# this patch adds support for "io" and "irq" options in PCNet32 driver module
-Patch1209: linux-2.4.19-pcnet-parms.patch
-
-# disable some networking printk's
-Patch1250: linux-2.4.1-netdebug.patch
-Patch1251: linux-2.4.2-raw-ip.patch
-Patch1252: linux-2.4.19-netmos_pci_parallel_n_serial.patch
-Patch1253: linux-proc_net_dev-counter-fix.patch
-Patch1254: kernel-2.4.17-netsyms-export-fix.patch
-Patch1255: linux-2.4.20-pre1-nr_frags.patch
-
-Patch1301: linux-2.4.18-hpfs.patch
-Patch1302: linux-2.4.18-nfs-default-size.patch
-Patch1303: linux-2.4.20-irixnfs.patch
-# Tru64 NFS kludge
-Patch1304: linux-2.4.21-tru64nfs.patch
-Patch1305: linux-2.4.21-nfs-silly-rename.patch
-
-Patch1350: linux-2.4.21-nousb.patch
-# from http://www.noc.uoa.gr/~avel/page.php?page=nokia&lang=en
-Patch1354: linux-2.4.20-Nokia5510.patch
-
-# raid5 xor fix for PIII/P4, should go away shortly
-Patch1400: linux-2.4.0-raid5xor.patch
-Patch1401: linux-2.4.0-nonintconfig.patch
-# Add an ioctl to the block layer so we can be EFI compliant
-Patch1402: linux-2.4.2-blkioctl-sector.patch
-Patch1403: linux-2.4.3-pcipenalty.patch
-Patch1404: linux-2.4.3-rawio.patch
-Patch1405: linux-2.4.7-suspend.patch
-Patch1407: kernel-Makefile-include-fix.patch
-Patch1408: kernel-pswscancode.patch
-Patch1410: linux-2.4.18-input-35215.patch
-Patch1411: linux-2.4.18-kiobuf.patch
-Patch1413: linux-2.4.22-andrea-9980_fix-pausing-6.patch
-Patch1414: linux-2.4.21-oopsmeharder.patch
-Patch1415: linux-mtd-missing-include-fix-2.4.7-pre6.patch
-Patch1416: linux-2.4.21-no-FPU.patch
-Patch1417: linux-2.4.22-ac4-ide+sata.patch
-Patch1418: linux-2.4.21-hpt372-chicken-egg-hack.patch
-Patch1419: linux-2.4.21-agp-num_of_masks.patch
-# fix spare disk counting for raid 5
-Patch1420: linux-raid5-spare-counting.patch
-Patch1421: linux-2.4.21-bttv-typo.patch
-Patch1422: linux-2.4.21-ipt_TRACE-typo.patch
-Patch1423: linux-2.4.22-alpha-kmap_types.patch
-
-# htb
-# http://luxik.cdi.cz/~devik/qos/htb/v3/
-Patch1501: htb_killdbg_2421.diff
-Patch1600: linux-pcwd.patch
-
-Patch2000: linux-PPC-SMP.patch
-Patch2001: linux-2.4-ppc-procesor.patch
-Patch2002: kernel-2.4.18-SPARC64-PLD.patch
-Patch2003: linux-2.4.20-AXP-avma1_cs.patch
-Patch2004: linux-2.4.22-ppc-amd8111e.patch
-
-Patch3000: linux-2.4.1-compilefailure.patch
-Patch3002: linux-2.4.20-EXPORT_SYMBOL.patch
-Patch3003: linux-2.4.20-missing-license-tags.patch
-Patch3004: linux-2.4.20-sym53c8xx_old.patch
-Patch3005: linux-2.4.21-gcc33.patch
-Patch3006: linux-2.4.21-sparc-gcc3.patch
-Patch3008: linux-drm-4.2.0-force-cmpxchg.patch
-Patch3009: linux-2.4.21-alpha-gcc33.patch
-Patch3010: linux-2.4.21-ipsec-sparc64.patch
-Patch3011: linux-2.4.22-gcc33-inline.patch
-Patch3012: linux-2.4.22-gcc-ext3.patch
-
-# Security patches/fixes
-
-Patch4000: linux-2.4.22-ow1-stack.patch
-Patch4001: grsecurity-nopax-2.0-rc3-2.4.22.patch
-
-Patch5000: linux-2.4.22-security.patch
-
-#Patch10000: ftp://ftp.kernel.org/pub/linux/kernel/v2.4/testing/patch-2.4.21-rc6.bz2
+#Source2: http://www.smcc.demon.nl/webcam/pwc-%{pwc_version}.tar.gz
+Source4: http://ftp.kernel.org/pub/linux/kernel/v2.6/testing/cset/cset-%{_cset}.txt.bz2
+# Source4-md5: 462cbc68049412fdd73625a6c312bcda
+
+Source20: %{name}-i386.config
+Source21: %{name}-i386-smp.config
+Source22: %{name}-x86_64.config
+Source23: %{name}-x86_64-smp.config
+Source24: %{name}-sparc.config
+Source25: %{name}-sparc-smp.config
+Source26: %{name}-sparc64.config
+Source27: %{name}-sparc64-smp.config
+Source28: %{name}-alpha.config
+Source29: %{name}-alpha-smp.config
+Source30: %{name}-ppc.config
+Source31: %{name}-ppc-smp.config
+Source32: %{name}-ia64.config
+Source33: %{name}-ia64-smp.config
+
+Source40: %{name}.FAQ-pl
+
+Source80: %{name}-netfilter.config
+Source90: %{name}-grsec.config
+Source91: %{name}-grsec+pax.config
+
+Patch0: 2.6.0-ksyms-add.patch
+
+Patch2: 2.6.0-t6-usb-irq.patch
+Patch3: 2.6.0-t7-memleak-lkml.patch
+Patch4: 2.6.0-t7-memleak2-lkml.patch
+#Patch5: 2.6.0-t8-swap-include-lkml.patch
+Patch6: 2.6.0-t8-VLSI-ix86-lkml.patch
+
+Patch8: 2.6.0-t8-umsdos-lkml.patch
+Patch9: 2.6.0-t9-acpi_osl-lkml.patch
+
+#Patch11: 2.6.8.1-qos-and-routing-conflict.patch -- obsolete
+Patch12: 2.6.1-rc2-VLAN-NS83820-lkml.patch
+Patch13: 2.6.2-Initio9100U-Kconfig.patch
+# http://www.consultmatt.co.uk/downloads/patches/kernel/2.6/
+Patch14: 2.6.1-all-in-1.patch
+
+Patch16: linux-alpha-isa.patch
+Patch17: 2.6.4-psion-5mx.patch
+Patch18: 2.6.5-sparc64-missing-include.patch
+Patch19: 2.6.5-3C920b-Tornado.patch
+Patch20: 2.6.5-i386-cmpxchg.patch
+Patch21: 2.6.6-serial-fifo-lkml.patch
+Patch22: 2.6.6-qsort-updated-lkml.patch
+Patch23: 2.6.6-xfs-qsort-lkml.patch
+#Patch24: 2.6.7-bridge_sysfs-lkml.patch
+Patch25: 2.6.7-alpha_compile.patch
+Patch26: 2.6.7-ppc-asm-defs.patch
+
+Patch28: 2.6.7-ppc-ipr-div.patch
+
+#Patch30: 2.6.x-ppp_mppe.patch
+#Patch31: 2.6.x-SGI_VW-fbdev-lkml.patch -- obsolete
+Patch32: 2.6.x-TGA-fbdev-lkml.patch
+Patch33: linux-kbuild-extmod.patch
+Patch34: 2.6.8-cpu_feature.patch
+
+# framebuffer fixes
+Patch41: linux-fbcon-margins.patch
+
+# netfilter
+Patch50: 2.6.7-pom-ng-%{_netfilter_snap}.patch
+# http://www.barbara.eu.org/~quaker/ipt_account/
+Patch51: 2.6.6-ipt_account.patch
+# http://l7-filter.sourceforge.net/
+Patch52: 2.6.8-ipt_layer7.patch
+Patch53: 2.6.4-rc1-01-esfq-imq.patch
+Patch54: 2.6.4-rc1-02-imq-nat-support.patch
+Patch55: 2.6.4-wrr.patch
+Patch56: linux-2.6-netfilter-syms.patch
+
+# pseudo terminal fix for older glibc
+#Patch60: %{name}-pts.patch
+Patch61: %{name}-MAX_INIT_ARGS.patch
+
+# http://tahoe.pl/patch.htm
+Patch70: http://www.tahoe.pl/drivers/tahoe9xx-2.6.4-5.patch
+
+# Spock discontinued porting bootsplash to new kernel versions
+# but he introduced a rewrite of bootsplash called gensplash.
+# http://dev.gentoo.org/~spock/projects/gensplash/
+Patch72: fbsplash-0.9-r7-2.6.9-rc1.patch
+Patch73: squashfs2.0-patch
+# http://dl.sourceforge.net/pramfs/
+Patch74: pramfs-2.6.4.patch
+Patch75: ftp://ftp.kernel.org/pub/linux/kernel/people/mbligh/patches/2.6.6-rc3/2.6.6-rc3-mjb1/350-autoswap
+# http://lirc.sourceforge.net/software/snapshots/lirc-0.7.0pre7.tar.bz2
+Patch76: 2.6.8-lirc-0.7.0-pre7.patch
+# http://i2o.shadowconnect.com/
+# NEEDS UPDATE
+Patch77: 2.6.8-i2o-build_105.patch.gz
+Patch78: i2o-build_105-fixes.patch
+
+# derived from official grsecurity-2.0.1-2.6.7.patch
+# NEEDS UPDATE
+Patch90: %{name}-grsec-2.0.1.patch
+
+# http://lkml.org/lkml/2004/6/2/233
+Patch91: http://people.redhat.com/mingo/exec-shield/exec-shield-nx-2.6.7-A0
+Patch92: exec-shield-make-peace-with-grsecurity.patch
+
+# frpm http://www.ssi.bg/~ja/#routers
+#Patch100: 00_static_routes-2.6.0-test1-8.diff
+#Patch101: 01_alt_routes-2.5.50-8.diff
+#Patch102: 01_arp_prefsrc-2.5.50-5.diff <- not applied. needs checkout
+#Patch103: 05_nf_reroute-2.6.7-10.diff
+
+# http://sources.redhat.com/cluster/
+# NEED UPDATE
+#Patch200: linux-cluster-cman.patch
+#Patch201: linux-cluster-dlm.patch
+#Patch202: linux-cluster-gfs.patch
+#Patch203: linux-cluster-gnbd.patch
+
+# suspend/resume
+# http://softwaresuspend.berlios.de/
+Patch219: linux-2.6-software-suspend-2.0.0.105.patch.gz
+Patch220: linux-2.6-via-agpc-resume-suspend-support.patch
+
+# hotfixes
+Patch300: linux-2.6-sparc-ksyms.patch
+Patch301: linux-2.6-ppc-ksyms.patch
+Patch302: 2.6.7-kill-warnings.patch
+Patch303: %{name}-hotfixes.patch
-ExclusiveOS: Linux
URL: http://www.kernel.org/
-%ifarch %{ix86}
-BuildRequires: bin86
+BuildRequires: binutils >= 2.14.90.0.7
+BuildRequires: diffutils
+%ifarch sparc sparc64
+BuildRequires: elftoaout
%endif
-#BuildRequires: %{kgcc_package}
-BuildRequires: modutils
-BuildRequires: ed
+BuildRequires: module-init-tools
+BuildRequires: perl-base
+BuildRequires: rpmbuild(macros) >= 1.153
Autoreqprov: no
-PreReq: modutils
-PreReq: geninitrd >= 2.40
-Requires(post,postun): fileutils
-Requires(postun): awk
-Provides: %{name}-up = %{version}-%{release}
+PreReq: coreutils
+PreReq: module-init-tools >= 0.9.9
+PreReq: geninitrd >= 2.57
+Provides: %{name}-up = %{epoch}:%{version}-%{release}
Provides: module-info
-Provides: i2c = %{i2c_version}
-Provides: bttv = 0.7.83
-Provides: %{name}(netfilter) = 1.2.8-%{netfilter_snap}
-Provides: %{name}(reiserfs) = %{version}
-Provides: %{name}(agpgart) = %{version}
-#Provides: %{name}(cdrw)
-#Provides: %{name}(cdmrw)
-Provides: %{name}(hostap)
+Provides: %{name}(netfilter) = %{_netfilter_snap}
Obsoletes: kernel-modules
-ExclusiveArch: %{ix86} sparc sparc64 alpha ppc
+Conflicts: util-linux < %{_util_linux_ver}
+Conflicts: module-init-tool < %{_module_init_tool_ver}
+Conflicts: e2fsprogs < %{_e2fsprogs_ver}
+Conflicts: jfsutils < %{_jfsutils_ver}
+Conflicts: reiserfsprogs < %{_reiserfsprogs_ver}
+Conflicts: xfsprogs < %{_xfsprogs_ver}
+Conflicts: quota-tools < %{_quota_tools_ver}
+Conflicts: PPP < %{_PPP_ver}
+Conflicts: isdn4k-utils < %{_isdn4k_utils_ver}
+Conflicts: nfs-utils < %{_nfs_utils_ver}
+Conflicts: procps < %{_procps_ver}
+Conflicts: oprofile < %{_oprofile_ver}
+ExclusiveArch: %{ix86} alpha amd64 ia64 ppc sparc sparc64
+ExclusiveOS: Linux
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
-Conflicts: iptables < 1.2.8
-Conflicts: lvm < 1.0.4
-Conflicts: xfsprogs < 2.1.0
-Conflicts: reiserfsprogs < 3.6.3
-Conflicts: e2fsprogs < 1.25
-Conflicts: jfsutils < 1.0.12
-Conflicts: util-linux < 2.10o
-Conflicts: modutils < 2.4.2
-Conflicts: quota < 3.06
-Conflicts: linux-atm < 2.4.1
-Conflicts: device-mapper < 1.00.05
+
+%ifarch ia64
+%define initrd_dir /boot/efi
+%else
+%define initrd_dir /boot
+%endif
%description
This package contains the Linux kernel that is used to boot and run
Systemfunktionen verantwortlich: Speicherreservierung,
Prozeß-Management, Geräte Ein- und Ausgaben, usw.
-%description -l es
-Este paquete contiene núcleo (kernel) Linux que se usa para arranque y
-funcionamiento de tu sistema. Contiene soporte a pocos hardwares
-específicos. La mayoría de los hardwares son soportados, vía módulos
-que se cargan después del arranque.
-
%description -l fr
Le package kernel contient le kernel linux (vmlinuz), la partie
centrale d'un système d'exploitation Linux. Le noyau traite les
%description -l pl
Pakiet zawiera j±dro Linuksa niezbêdne do prawid³owego dzia³ania
Twojego komputera. Zawiera w sobie sterowniki do sprzêtu znajduj±cego
-siê w komputerze, takich jak karty muzyczne, sterowniki dysków, etc.
+siê w komputerze, takiego jak sterowniki dysków itp.
-%description -l pt_BR
-Este pacote contém o kernel Linux que é usado para inicialização
-e funcionamento de seu sistema. Contém suporte a poucos hardwares
-específicos. A maioria dos hardwares são suportados via módulos
-que são carregados após a inicialização.
+%package drm
+Summary: DRM kernel modules
+Summary(pl): Sterowniki DRM
+Group: Base/Kernel
+PreReq: %{name}-up = %{epoch}:%{version}-%{release}
+Requires(postun): %{name}-up = %{epoch}:%{version}-%{release}
+Provides: %{name}-drm = %{drm_xfree_version}
+Autoreqprov: no
+
+%description drm
+DRM kernel modules (%{drm_xfree_version}).
+
+%description drm -l pl
+Sterowniki DRM (%{drm_xfree_version}).
+
+%package pcmcia
+Summary: PCMCIA modules
+Summary(pl): Modu³y PCMCIA
+Group: Base/Kernel
+PreReq: %{name}-up = %{epoch}:%{version}-%{release}
+Requires(postun): %{name}-up = %{epoch}:%{version}-%{release}
+Provides: %{name}-pcmcia = %{pcmcia_version}
+Provides: kernel(pcmcia)
+Conflicts: pcmcia-cs < %{_pcmcia_cs_ver}
+Autoreqprov: no
+
+%description pcmcia
+PCMCIA modules (%{pcmcia_version}).
+
+%description pcmcia -l pl
+Modu³y PCMCIA (%{pcmcia_version}).
+
+%package sound-alsa
+Summary: ALSA kernel modules
+Summary(pl): Sterowniki d¼wiêku ALSA
+Group: Base/Kernel
+PreReq: %{name}-up = %{epoch}:%{version}-%{release}
+Requires(postun): %{name}-up = %{epoch}:%{version}-%{release}
+Provides: alsa-driver
+Obsoletes: alsa-driver
+Obsoletes: alsa-driver-up
+Autoreqprov: no
+
+%description sound-alsa
+ALSA (Advanced Linux Sound Architecture) sound drivers.
+
+%description sound-alsa -l pl
+Sterowniki d¼wiêku ALSA (Advanced Linux Sound Architecture).
+
+%package sound-oss
+Summary: OSS kernel modules
+Summary(pl): Sterowniki d¼wiêku OSS
+Group: Base/Kernel
+PreReq: %{name}-up = %{epoch}:%{version}-%{release}
+Requires(postun): %{name}-up = %{epoch}:%{version}-%{release}
+Autoreqprov: no
+
+%description sound-oss
+OSS (Open Sound System) drivers.
+
+%description sound-oss -l pl
+Sterowniki d¼wiêku OSS (Open Sound System).
%package smp
Summary: Kernel version %{version} compiled for SMP machines
Summary(de): Kernel version %{version} für Multiprozessor-Maschinen
-Summary(es): Núcleo (kernel) compilado para máquinas SMP
Summary(fr): Kernel version %{version} compiler pour les machine Multi-Processeur
-Summary(pl): J±dro Linuksa %{version} skompilowane dla maszyn wieloprocesorowych
-Summary(pt_BR): Kernel compilado para máquinas SMP
+Summary(pl): J±dro Linuksa w wersji %{version} dla maszyn wieloprocesorowych
Group: Base/Kernel
-Autoreqprov: no
-PreReq: modutils
-PreReq: geninitrd >= 2.21
-Requires(post,postun): fileutils
-Requires(postun): awk
-Provides: %{name}-smp = %{version}-%{release}
+PreReq: coreutils
+PreReq: module-init-tools >= 0.9.9
+PreReq: geninitrd >= 2.26
+Provides: %{name} = %{epoch}:%{version}-%{release}
Provides: module-info
-Provides: i2c = %{i2c_version}
-Provides: bttv = 0.7.83
-Provides: %{name}(netfilter) = 1.2.8-%{netfilter_snap}
-Provides: %{name}(reiserfs) = %{version}
-Provides: %{name}(agpgart) = %{version}
-#Provides: %{name}(cdrw)
-#Provides: %{name}(cdmrw)
-Provides: %{name}(hostap)
-Conflicts: iptables < 1.2.8
-Conflicts: lvm < 1.0.4
-Conflicts: xfsprogs < 2.1.0
-Conflicts: reiserfsprogs < 3.6.3
-Conflicts: e2fsprogs < 1.25
-Conflicts: jfsutils < 1.0.12
-Conflicts: util-linux < 2.10o
-Conflicts: modutils < 2.4.2
-Conflicts: quota < 3.06
-Conflicts: linux-atm < 2.4.1
-Conflicts: device-mapper < 1.00.05
+Provides: %{name}(netfilter) = %{_netfilter_snap}
+Conflicts: util-linux < %{_util_linux_ver}
+Conflicts: module-init-tool < %{_module_init_tool_ver}
+Conflicts: e2fsprogs < %{_e2fsprogs_ver}
+Conflicts: jfsutils < %{_jfsutils_ver}
+Conflicts: reiserfsprogs < %{_reiserfsprogs_ver}
+Conflicts: xfsprogs < %{_xfsprogs_ver}
+Conflicts: quota-tools < %{_quota_tools_ver}
+Conflicts: PPP < %{_PPP_ver}
+Conflicts: isdn4k-utils < %{_isdn4k_utils_ver}
+Conflicts: nfs-utils < %{_nfs_utils_ver}
+Conflicts: procps < %{_procps_ver}
+Conflicts: oprofile < %{_oprofile_ver}
+Autoreqprov: no
%description smp
This package includes a SMP version of the Linux %{version} kernel. It
Prozessoren gebraucht, sollte aber auch auf Computern mit nur einer
CPU laufen.
-%description smp -l es
-Núcleo (kernel) compilado para máquinas SMP
-
%description smp -l fr
-Ce package inclu une version SMP du noyau de Linux version %{version}.
+Ce package inclu une version SMP du noyau de Linux version {version}.
Il et nécessaire seulement pour les machine avec deux processeurs ou
plus, il peut quand même fonctionner pour les système mono-processeur.
wymagane przez komputery zawieraj±ce dwa lub wiêcej procesorów.
Powinno równie¿ dobrze dzia³aæ na maszynach z jednym procesorem.
-%description smp -l pt_BR
-Este pacote inclui uma versão SMP do kernel Linux versão %{version}.
-Ele deve ser utilizado apenas em máquinas com dois ou mais processadores,
-apesar de trabalhar perfeitamente em máquinas com apenas um processador.
+%package smp-drm
+Summary: DRM SMP kernel modules
+Summary(pl): Sterowniki DRM dla maszyn wieloprocesorowych
+Group: Base/Kernel
+PreReq: %{name}-smp = %{epoch}:%{version}-%{release}
+Requires(postun): %{name}-smp = %{epoch}:%{version}-%{release}
+Provides: %{name}-drm = %{drm_xfree_version}
+Autoreqprov: no
+
+%description smp-drm
+DRM SMP kernel modules (%{drm_xfree_version}).
+
+%description smp-drm -l pl
+Sterowniki DRM dla maszyn wieloprocesorowych (%{drm_xfree_version}).
+
+%package smp-pcmcia
+Summary: PCMCIA modules for SMP kernel
+Summary(pl): Modu³y PCMCIA dla maszyn SMP
+Group: Base/Kernel
+PreReq: %{name}-smp = %{epoch}:%{version}-%{release}
+Requires(postun): %{name}-smp = %{epoch}:%{version}-%{release}
+Provides: %{name}-pcmcia = %{pcmcia_version}
+Provides: kernel(pcmcia)
+Conflicts: pcmcia-cs < %{_pcmcia_cs_ver}
+Autoreqprov: no
+
+%description smp-pcmcia
+PCMCIA modules for SMP kernel (%{pcmcia_version}).
+
+%description smp-pcmcia -l pl
+Modu³y PCMCIA dla maszyn SMP (%{pcmcia_version}).
+
+%package smp-sound-alsa
+Summary: ALSA SMP kernel modules
+Summary(pl): Sterowniki d¼wiêku ALSA dla maszyn wieloprocesorowych
+Group: Base/Kernel
+PreReq: %{name}-smp = %{epoch}:%{version}-%{release}
+Requires(postun): %{name}-smp = %{epoch}:%{version}-%{release}
+Provides: alsa-driver
+Obsoletes: alsa-driver
+Obsoletes: alsa-driver-smp
+Autoreqprov: no
+
+%description smp-sound-alsa
+ALSA (Advanced Linux Sound Architecture) SMP sound drivers.
+
+%description smp-sound-alsa -l pl
+Sterowniki d¼wiêku ALSA (Advanced Linux Sound Architecture) dla maszyn
+wieloprocesorowych.
+
+%package smp-sound-oss
+Summary: OSS SMP kernel modules
+Summary(pl): Sterowniki d¼wiêku OSS dla maszyn wieloprocesorowych
+Group: Base/Kernel
+PreReq: %{name}-smp = %{epoch}:%{version}-%{release}
+Requires(postun): %{name}-smp = %{epoch}:%{version}-%{release}
+Autoreqprov: no
+
+%description smp-sound-oss
+OSS (Open Sound System) SMP sound drivers.
+
+%description smp-sound-oss -l pl
+Sterowniki OSS (Open Sound System) dla maszyn wieloprocesorowych.
%package BOOT
Summary: Kernel version %{version} used on the installation boot disks
Summary(de): Kernel version %{version} für Installationsdisketten
-Summary(es): Núcleo (kernel) de Linux, utilizado en el disco de instalación
Summary(fr): Kernel version %{version} utiliser pour les disquettes d'installation
-Summary(pl): J±dro Linuksa %{version} dla bootkietek instalacyjnych
-Summary(pt_BR): Kernel Linux utilizado no disco de instalação
+Summary(pl): J±dro Linuksa w wersji %{version} dla dyskietek startowych
Group: Base/Kernel
+PreReq: module-init-tools
Autoreqprov: no
-PreReq: modutils
-Requires(post,postun): fileutils
-Requires(postun): awk
%description BOOT
This package includes a trimmed down version of the Linux %{version}
installierten System verwendet werden, da viele Funktionen wegen der
Platzprobleme abgeschaltet sind.
-%description BOOT -l es
-Núcleo (kernel) de Linux, utilizado en el disco de instalación
-
%description BOOT -l pl
Pakiet zawiera j±dro Linuksa dedykowane dyskietkom startowym i powinno
byæ u¿ywane jedynie podczas instalacji systemu. Wiele u¿ytecznych
opcji zosta³o wy³±czonych, aby jak najbardziej zmniejszyæ jego
rozmiar.
-%description BOOT -l pt_BR
-Este pacote inclui uma versão minimizada do kernel Linux, criada para
-ser utilizada *apenas* no disco de instalação, e não deve ser utilizada
-em máquinas já instaladas, pois várias características do kernel
-são desabilitadas para diminuir o tamanho final do kernel a ser utilizado.
-
-%package pcmcia-cs
-Summary: PCMCIA-CS modules
-Summary(pl): Modu³y PCMCIA-CS
-Group: Base/Kernel
-PreReq: %{name}-up = %{version}-%{release}
-Requires(postun): %{name}-up = %{version}-%{release}
-Provides: %{name}-pcmcia-cs = %{pcmcia_version}
-
-%description pcmcia-cs
-PCMCIA-CS modules (%{pcmcia_version}).
-
-%description pcmcia-cs -l pl
-Modu³y PCMCIA-CS (%{pcmcia_version}).
-
-%package smp-pcmcia-cs
-Summary: PCMCIA-CS modules for SMP kernel
-Summary(pl): Modu³y PCMCIA-CS dla maszyn SMP
-Group: Base/Kernel
-PreReq: %{name}-smp = %{version}-%{release}
-Requires(postun): %{name}-smp = %{version}-%{release}
-Provides: %{name}-pcmcia-cs = %{pcmcia_version}
-
-%description smp-pcmcia-cs
-PCMCIA-CS modules for SMP kernel (%{pcmcia_version}).
-
-%description smp-pcmcia-cs -l pl
-Modu³y PCMCIA-CS dla maszyn SMP (%{pcmcia_version}).
-
-%package drm
-Summary: DRM kernel modules
-Summary(pl): Sterowniki DRM
-Group: Base/Kernel
-PreReq: %{name}-up = %{version}-%{release}
-Requires(postun): %{name}-up = %{version}-%{release}
-Provides: %{name}-drm = %{drm_xfree_version}
-
-%description drm
-DRM kernel modules (%{drm_xfree_version}).
-
-%description drm -l pl
-Sterowniki DRM (%{drm_xfree_version}).
-
-%package smp-drm
-Summary: DRM SMP kernel modules
-Summary(pl): Sterowniki DRM dla maszyn wieloprocesorowych
-Group: Base/Kernel
-PreReq: %{name}-smp = %{version}-%{release}
-Requires(postun): %{name}-smp = %{version}-%{release}
-Provides: %{name}-drm = %{drm_xfree_version}
-
-%description smp-drm
-DRM SMP kernel modules (%{drm_xfree_version}).
-
-%description smp-drm -l pl
-Sterowniki DRM dla maszyn wieloprocesorowych (%{drm_xfree_version}).
-
%package headers
Summary: Header files for the Linux kernel
-Summary(es): Archivos de inclusión para núcleo (kernel) Linux.
-Summary(pl): Pliki nag³ówkowe j±dra
-Summary(pt_BR): Arquivos de inclusão para o kernel Linux.
+Summary(pl): Pliki nag³ówkowe j±dra Linuksa
Group: Base/Kernel
-Autoreqprov: no
-Requires(post,postun): fileutils
-Requires(postun): awk
Provides: %{name}-headers(agpgart) = %{version}
Provides: %{name}-headers(reiserfs) = %{version}
Provides: %{name}-headers(bridging) = %{version}
-Provides: i2c-devel = %{i2c_version}
-Provides: %{name}-headers(netfilter) = 1.2.8-%{netfilter_snap}
+Provides: kernel-i2c-devel
+Provides: %{name}-headers(netfilter) = %{_netfilter_snap}
+Provides: %{name}-headers(alsa-drivers)
+Obsoletes: kernel-i2c-devel
+Autoreqprov: no
%description headers
These are the C header files for the Linux kernel, which define
-structures and constants that are needed when building most standard
-programs under Linux, as well as to rebuild the kernel.
-
-%description headers -l es
-Estos son los archivos de inclusión C para núcleo (kernel) Linux, que define
-estructuras y constantes que son necesarias a la construcción de la
-mayoría de los programas en el Linux, como también para reconstruir
-el núcleo (kernel).
+structures and constants that are needed when rebuilding the kernel
+or building kernel modules.
%description headers -l pl
Pakiet zawiera pliki nag³ówkowe j±dra, niezbêdne do rekompilacji j±dra
-oraz niektórych programów.
+oraz budowania modu³ów j±dra.
-%description headers -l pt_BR
-Estes são os arquivos de inclusão C para o kernel Linux, os
-quais definem estruturas e constantes que são necessárias para
-a construção da maioria dos programas no Linux, bem como para
-reconstruir o próprio kernel.
+%package module-build
+Summary: Development files for building kernel modules
+Summary(pl): Pliki s³u¿±ce do budowania modu³ów j±dra
+Group: Base/Kernel
+Requires: %{name}-headers = %{epoch}:%{version}-%{release}
+Autoreqprov: no
+
+%description module-build
+Development files from kernel source tree needed to build Linux kernel
+modules from external packages.
+
+%description module-build -l pl
+Pliki ze drzewa ¼róde³ j±dra potrzebne do budowania modu³ów j±dra
+Linuksa z zewnêtrznych pakietów.
%package source
Summary: Kernel source tree
-Summary(es): Fuentes del núcleo (kernel) Linux
Summary(pl): Kod ¼ród³owy j±dra Linuksa
-Summary(pt_BR): Fontes do kernel Linux
Group: Base/Kernel
+Requires: %{name}-module-build = %{epoch}:%{version}-%{release}
Autoreqprov: no
-Requires: %{name}-headers = %{version}-%{release}
-%ifarch %{ix86}
-Requires: bin86
-%endif
%description source
This is the source code for the Linux kernel. It is required to build
benutzt werden, um einen Kernel zu compilieren, der besser auf Ihre
Hardware ausgerichtet ist.
-%description source -l es
-Este es el fuente para el núcleo (kernel) Linux. Se necesita para la
-construcción de la mayoría de los programas C, pues dependen de
-constantes definidas en él. Tu puedes también construir un núcleo (kernel)
-personalizado que será lo mejor configurado para tu hardware en
-particular.
-
%description source -l fr
Le package pour le kernel-source contient le code source pour le noyau
linux. Ces sources sont nécessaires pour compiler la plupart des
%description source -l pl
Pakiet zawiera kod ¼ród³owy j±dra systemu.
-%description source -l pt_BR
-Este é o fonte para o kernel Linux. É necessário para a
-construção da maioria dos programas C, pois eles dependem de
-constantes definidas nele. Você também pode construir um kernel
-personalizado que será melhor configurado para seu hardware particular.
-
%package doc
Summary: Kernel documentation
-Summary(es): Documentación para los archivos fuente del núcleo (kernel) de Linux
Summary(pl): Dokumentacja do j±dra Linuksa
-Summary(pt_BR): Documentação para os arquivos fontes do kernel Linux
Group: Base/Kernel
Provides: %{name}-doc = %{version}
Autoreqprov: no
This is the documentation for the Linux kernel, as found in
/usr/src/linux/Documentation directory.
-%description doc -l es
-Documentación para los archivos fuente del núcleo (kernel) de Linux
-
%description doc -l pl
-Pakiet zawiera dokumentacjê j±dra z katalogu
+Pakiet zawiera dokumentacjê do j±dra Linuksa pochodz±c± z katalogu
/usr/src/linux/Documentation.
-%description doc -l pt_BR
-Este pacote contém documentação para o kernel Linux.
-
%prep
-%setup -q -a3 -a8 -a9 -n linux-%{version}
-cd hostap-2002-10-12
-%patch190 -p1
-cd ..
-# JFS 1.1.1
-rm -fr fs/jfs
-gzip -dc %{SOURCE7} | tar -xf -
-# Adaptec AACRaid new drivers
-rm -fr drivers/scsi/aacraid
-bzip2 -dc %{SOURCE10} | tar -xf - -C drivers/scsi/
-# Changing DRM source ....
-cp -f drm/*.{c,h} drivers/char/drm/
+%setup -q -n linux-%{version}%{_rc}
+
+%if "%{_apply_cset}" != "0"
+bzcat %{SOURCE4} | patch -p1 -s
+%endif
+
%patch0 -p1
-%patch10 -p1
+
+%patch2 -p1
+%patch3 -p1
+%patch4 -p1
+#patch5 -p1
+%patch6 -p1
+
+%patch8 -p1
+%patch9 -p1
+
%patch12 -p1
-%patch15 -p1
+%patch13 -p1
+%patch14 -p1
+
+%patch16 -p1
+%patch17 -p1
+%patch18 -p1
+%patch19 -p1
%patch20 -p1
%patch21 -p1
%patch22 -p1
%patch23 -p1
+#patch24 -p1
%patch25 -p1
-#%patch26 -p1
-%patch30 -p1
+%patch26 -p1
+
+#patch30 -p1
+
%patch32 -p1
-%patch31 -p1
-%patch40 -p1
+%patch33 -p1
+
+%patch41 -p1
+
+# netfilter
%patch50 -p1
+%patch51 -p1
+%patch52 -p1
+%patch53 -p1
+%patch54 -p1
%patch55 -p1
-%patch60 -p1
+%patch56 -p1
+
+#patch60 -p1
%patch61 -p1
-%patch65 -p1
+
%patch70 -p1
-%patch80 -p1
-%patch100 -p1
-%patch110 -p1
-%patch115 -p1
-%patch120 -p1
-%patch125 -p1
-%patch130 -p1
-#%patch150 -p1
-%patch151 -p1
-%patch152 -p1
-%patch200 -p1
-%patch205 -p1
-%patch210 -p1
-#%patch215 -p1
-#%patch216 -p1
-%patch225 -p1
-%patch226 -p1
-%patch227 -p1
-%patch231 -p1
-%patch235 -p1
-%patch240 -p1
-%patch245 -p1
-%patch246 -p1
-%patch255 -p1
-%patch256 -p1
-%patch257 -p1
-%patch265 -p1
-%patch275 -p1
-%patch280 -p1
-%patch1000 -p1
-%patch1002 -p1
-%patch1003 -p1
-%patch1006 -p1
-%patch1007 -p1
-#%patch1008 -p1
-%patch1009 -p1
-%patch1010 -p1
-%patch1102 -p1
-%patch1104 -p0
-%patch1105 -p1
-%patch1106 -p0
-%patch1111 -p1
-%patch1150 -p1
-%patch1152 -p1
-%patch1154 -p1
-%patch1201 -p1
-%patch1203 -p1
-%patch1205 -p1
-%patch1207 -p1
-%patch1209 -p1
-%patch1250 -p1
-%patch1251 -p1
-%patch1252 -p1
-%patch1253 -p1
-%patch1254 -p0
-%patch1255 -p1
-%patch1301 -p1
-%patch1302 -p1
-%patch1303 -p1
-%patch1304 -p1
-%patch1305 -p1
-%patch1350 -p1
-%patch1354 -p1
-%patch1400 -p1
-%patch1401 -p1
-%patch1402 -p1
-%patch1403 -p1
-%patch1404 -p1
-%patch1405 -p1
-%patch1407 -p1
-%patch1408 -p1
-%patch1410 -p1
-%patch1411 -p1
-%patch1413 -p1
-%patch1414 -p1
-%patch1415 -p0
-%patch1416 -p1
-%patch1417 -p1
-%patch1418 -p1
-%patch1419 -p1
-%patch1420 -p1
-%patch1421 -p1
-%patch1422 -p1
-%patch1423 -p1
-%patch1501 -p1
-
-%patch1600 -p1
-
-%patch2000 -p0
-%patch2001 -p1
-%patch2002 -p1
-%patch2003 -p1
-%ifarch ppc
-%patch2004 -p1
+
+%if %{with fbsplash}
+%patch72 -p1
+%endif
+%patch73 -p1
+%if %{with parmfs}
+%patch74 -p1
%endif
+%patch75 -p1
+%patch76 -p1
+# see TODO
+#patch77 -p1
+#patch78 -p1
-%patch3000 -p1
-%patch3002 -p1
-%patch3003 -p1
-%patch3004 -p1
-%patch3005 -p1
-%patch3006 -p1
-%patch3009 -p1
-cd drivers/char/drm
-%patch3008 -p1
-cd ../../..
+#cp -f pwc-%{pwc_version}/2.6/pwc* drivers/usb/media
+rm -rf pwc-%{pwc_version}
-%ifarch sparc64
-%patch3010 -p1
+#grsec
+%ifarch alpha %{ix86} ia64 ppc sparc sparc64 amd64
+%if %{with grsec}
+# see TODO
+#patch90 -p1
+%endif
+%endif
+
+%if %{with execshield}
+install %{PATCH91} exec-shield.patch
+%if %{with grsec}
+patch -s exec-shield.patch < %{PATCH92}
+%endif
+patch -p1 -s < exec-shield.patch
%endif
-%patch3011 -p1
-%patch3012 -p1
+# routers
+#patch100 -p1
+#patch101 -p1
+#patch102 -p1 # <- not applayed need checkout
+#patch103 -p1
-%patch5000 -p1
+# cluster
+#patch200 -p1
+#patch201 -p1
+#patch202 -p1
+#patch203 -p1
-%patch4000 -p1
-%{!?_without_grsec:%patch4001 -p1}
+# suspend/resume
+%if %{with swsuspend}
+%ifarch %{ix86}
+%patch219 -p1
+%endif
+%patch220 -p1
+%endif
-mv -f drivers/scsi/sym53c8xx.c drivers/scsi/sym53c8xx_old.c
+# hotfixes
+%patch300 -p1
+%patch301 -p1
+%patch302 -p1
+%patch303 -p1
-# Tekram DC395/315 U/UW SCSI host driver
-echo Adding Tekram DC395/315 driver
-patch -p1 -s <dc395/dc395-integ24.diff
-install dc395/dc395x_trm.? dc395/README.dc395x drivers/scsi/
-%patch270 -p1
+# Fix EXTRAVERSION in main Makefile
+sed -i 's#EXTRAVERSION =.*#EXTRAVERSION =#g' Makefile
-# hostap
-echo Installing Host AP support
-patch -p1 -s < hostap-%{hostap_version}/kernel-patches/hostap-linux-2.4.19-rc3.patch
-cp hostap-%{hostap_version}/driver/modules/hostap*.[ch] drivers/net/wireless/
+sed -i 's:\-pipe::' arch/*/Makefile
-# The following go last as they touch a lot of code
-# and/or are on bcond and/or are ifarch
+# on sparc this line causes CONFIG_INPUT=m (instead of =y), thus breaking build
+sed -i -e '/select INPUT/d' net/bluetooth/hidp/Kconfig
+%build
+TuneUpConfigForIX86 () {
%ifarch %{ix86}
-%{?_with_win4lin:echo Win4Lin patch ...}
-%{?_with_win4lin:%patch900 -p1}
-%{?_with_win4lin:%patch991 -p1}
+ %ifnarch i386
+ sed -i 's:CONFIG_M386=y:# CONFIG_M386 is not set:' $1
+ %endif
+ %ifarch i486
+ sed -i 's:# CONFIG_M486 is not set:CONFIG_M486=y:' $1
+ %endif
+ %ifarch i586
+ sed -i 's:# CONFIG_M586 is not set:CONFIG_M586=y:' $1
+ %endif
+ %ifarch i686
+ sed -i 's:# CONFIG_M686 is not set:CONFIG_M686=y:' $1
+ %endif
+ %ifarch pentium3
+ sed -i 's:# CONFIG_MPENTIUMIII is not set:CONFIG_MPENTIUMIII=y:' $1
+ %endif
+ %ifarch pentium4
+ sed -i 's:# CONFIG_MPENTIUM4 is not set:CONFIG_MPENTIUM4=y:' $1
+ %endif
+ %ifarch athlon
+ sed -i 's:# CONFIG_MK7 is not set:CONFIG_MK7=y:' $1
+ %endif
+ %ifarch pentium3 pentium4 athlon
+# kernel-i386-smp.config contains 64G support by default.
+ %if %{with up}
+ sed -i "s:CONFIG_HIGHMEM4G=y:# CONFIG_HIGHMEM4G is not set:" $1
+ sed -i "s:# CONFIG_HIGHMEM64G is not set:CONFIG_HIGHMEM64G=y\nCONFIG_X86_PAE=y:" $1
+ %endif
+ %endif
+ %ifarch i686 pentium3 pentium4
+ sed -i 's:CONFIG_MATH_EMULATION=y:# CONFIG_MATH_EMULATION is not set:' $1
+ %endif
%endif
+}
-# Remove -g from drivers/atm/Makefile and net/ipsec/Makefile
-echo -e ',s/EXTRA_CFLAGS.*//g\n,w' | ed drivers/atm/Makefile
-echo -e ',s/EXTRA_CFLAGS.*-g//g\n,w' | ed net/ipsec/Makefile
-
-# Fix EXTRAVERSION and CC in main Makefile
-echo -e ',s/EXTRAVERSION =.*/EXTRAVERSION =/g\n,w' | ed Makefile
-%ifarch sparc64
-echo -e ',s/CC.*$(CROSS_COMPILE)gcc/CC = sparc64-linux-gcc/g\n,w' | ed Makefile
+%if "%{_target_base_arch}" != "%{_arch}"
+CrossOpts="ARCH=%{_target_base_arch} CROSS_COMPILE=%{_target_cpu}-pld-linux-"
+%else
+CrossOpts=""
%endif
-%build
-BuildKernel() {
+BuildConfig (){
%{?_debug:set -x}
# is this a special kernel we want to build?
BOOT=
smp=
[ "$1" = "BOOT" -o "$2" = "BOOT" ] && BOOT=yes
[ "$1" = "smp" -o "$2" = "smp" ] && smp=yes
-%ifarch %{ix86}
if [ "$smp" = "yes" ]; then
- Config="ia32-smp"
+ Config="%{_target_base_arch}-smp"
else
- Config="ia32"
+ Config="%{_target_base_arch}"
fi
-%else
- if [ "$smp" = "yes" ]; then
- Config="%{_target_cpu}-smp"
- else
- Config="%{_target_cpu}"
- fi
-%endif
if [ "$BOOT" = "yes" ]; then
KernelVer=%{version}-%{release}BOOT
else
KernelVer=%{version}-%{release}$1
fi
- echo "BUILDING THE NORMAL KERNEL $*..."
-:> arch/%{base_arch}/defconfig
- cat $RPM_SOURCE_DIR/kernel-$Config.config >> arch/%{base_arch}/defconfig
-%ifarch i386
- echo "CONFIG_M386=y" >> arch/%{base_arch}/defconfig
-%endif
-%ifarch i586
- echo "CONFIG_M586=y" >> arch/%{base_arch}/defconfig
-%endif
-%ifarch i686
- echo "CONFIG_M686=y" >> arch/%{base_arch}/defconfig
-%endif
-%ifarch athlon
- echo "CONFIG_MK7=y" >> arch/%{base_arch}/defconfig
+ echo "Building config file for KERNEL $1..."
+ cat $RPM_SOURCE_DIR/kernel-$Config.config > arch/%{_target_base_arch}/defconfig
+ TuneUpConfigForIX86 arch/%{_target_base_arch}/defconfig
+
+%if %{with preemptive}
+ sed -i 's:# CONFIG_PREEMPT is not set:CONFIG_PREEMPT=y:' arch/%{_target_base_arch}/defconfig
%endif
- cat %{SOURCE1000} >> arch/%{base_arch}/defconfig
- cat %{SOURCE1001} >> arch/%{base_arch}/defconfig
-%ifarch sparc64
- echo -e ',s/^CONFIG_FB_I810=.*/# CONFIG_FB_I810 is not set/g\n,w' | \
- ed arch/%{base_arch}/defconfig
- echo -e ',s/CONFIG_IPSEC_AUTH_HMAC_SHA1=y/# CONFIG_IPSEC_AUTH_HMAC_SHA1 is not set/g\n,w' | \
- ed arch/%{base_arch}/defconfig
+# netfilter
+ cat %{SOURCE80} >> arch/%{_target_base_arch}/defconfig
+# grsecurity
+%if !%{with pax}
+ cat %{SOURCE90} >> arch/%{_target_base_arch}/defconfig
+%else
+ cat %{SOURCE91} >> arch/%{_target_base_arch}/defconfig
%endif
- if [ "$BOOT" = "yes" ] ; then
- echo "# CONFIG_GRKERNSEC is not set" >> arch/%{base_arch}/defconfig
+ ln -sf arch/%{_target_base_arch}/defconfig .config
+ install -d $KERNEL_INSTALL_DIR/usr/src/linux-%{version}/include/linux
+ %{__make} $CrossOpts include/linux/autoconf.h
+ if [ "$smp" = "yes" ]; then
+ install include/linux/autoconf.h \
+ $KERNEL_INSTALL_DIR/usr/src/linux-%{version}/include/linux/autoconf-smp.h
+ install .config \
+ $KERNEL_INSTALL_DIR/usr/src/linux-%{version}/config-smp
else
- :;
-%if %{?_without_grsec:0}%{!?_without_grsec:1}
- echo -e ',s/CONFIG_CRYPTO_SHA256=m/CONFIG_CRYPTO_SHA256=y/g\n,w' | \
- ed arch/%{base_arch}/defconfig
- cat %{SOURCE1002} >> arch/%{base_arch}/defconfig
-%endif
+ install include/linux/autoconf.h \
+ $KERNEL_INSTALL_DIR/usr/src/linux-%{version}/include/linux/autoconf-up.h
+ install .config \
+ $KERNEL_INSTALL_DIR/usr/src/linux-%{version}/config-up
fi
-%ifarch %{ix86}
- cat %{SOURCE2000} >> arch/%{base_arch}/defconfig
-%endif
+}
+ConfigBOOT()
+{
+ Config="%{_target_base_arch}"
+ cat $RPM_SOURCE_DIR/kernel-$Config.config > arch/%{_target_base_arch}/defconfig
%ifarch i386
- echo -e ',s/# CONFIG_MATH_EMULATION is not set/CONFIG_MATH_EMULATION=y/g\n,w' | \
- ed arch/%{base_arch}/defconfig
-%endif
+ echo "CONFIG_M386=y" >> arch/%{_target_base_arch}/defconfig
+%endif
+%ifarch i486
+ echo "CONFIG_M486=y" >> arch/%{_target_base_arch}/defconfig
+%endif
+%ifarch i386 i486 i586
+ sed -i 's/# CONFIG_MATH_EMULATION is not set/CONFIG_MATH_EMULATION=y/' \
+ arch/%{_target_base_arch}/defconfig
+%endif
+ cat <<EOF >>arch/%{_target_base_arch}/defconfig
+ # CONFIG_APM is not set
+ # CONFIG_ACPI is not set
+ # CONFIG_ACPI_BOOT is not set
+ # CONFIG_MTD is not set
+ # CONFIG_NETFILTER is not set
+ # CONFIG_WAN is not set
+ # CONFIG_ATM is not set
+ # CONFIG_HOTPLUG_PCI is not set
+ # CONFIG_NET_SCHED is not set
+ # CONFIG_X86_MCE is not set
+ # CONFIG_MTRR is not set
+ # CONFIG_PM is not set
+ # CONFIG_CPU_FREQ is not set
+ # CONFIG_DRM is not set
+ # CONFIG_FTAPE is not set
+ # CONFIG_WATCHDOG is not set
+ # CONFIG_DVB is not set
+ # CONFIG_DVB_CORE is not set
+ # CONFIG_VIDEO_DEV is not set
+ # CONFIG_SECURITY is not set
+ # CONFIG_SOUND is not set
+ # CONFIG_USB_AUDIO is not set
+ # CONFIG_INPUT_JOYSTICK is not set
+ # CONFIG_OMNIBOOK is not set
+ # CONFIG_NET_RADIO is not set
+ # CONFIG_HOTPLUG is not set
+ # CONFIG_QUOTA is not set
+ # CONFIG_REGPARM is not set
+ # CONFIG_SCSI_LOGGING is not set
+ CONFIG_PACKET=m
+ CONFIG_UNIX=m
+ # CONFIG_DEV_APPLETALK is not set
+ # CONFIG_ECONET_AUNUDP is not set
+ # CONFIG_HIPPI is not set
+ # CONFIG_TR is not set
+ # CONFIG_INPUT_MISC is not set
+ # CONFIG_INPUT_TOUCHSCREEN is not set
+ # CONFIG_PROFILING is not set
+ # CONFIG_DEBUG_KERNEL is not set
+ # CONFIG_DEBUG_SPINLOCK_SLEEP is not set
+ # CONFIG_FRAME_POINTER is not set
+ # CONFIG_LBD is not set
+ # CONFIG_SLIP is not set
+ # CONFIG_PPP is not set
+ # CONFIG_PLIP is not set
+ # CONFIG_FDDI is not set
+ # CONFIG_HAMRADIO is not set
+ # CONFIG_NETPOLL_RX is not set
+ # CONFIG_NETPOLL_TRAP is not set
+ # CONFIG_FB is not set
+EOF
+ ln -sf arch/%{_target_base_arch}/defconfig .config
+
+ install -d $KERNEL_INSTALL_DIR/usr/src/linux-%{version}/include/linux
+ %{__make} $CrossOpts include/linux/autoconf.h
+ if [ "$smp" = "yes" ]; then
+ install include/linux/autoconf.h $KERNEL_INSTALL_DIR/usr/src/linux-%{version}/include/linux/autoconf-smp.h
+ else
+ install include/linux/autoconf.h $KERNEL_INSTALL_DIR/usr/src/linux-%{version}/include/linux/autoconf-up.h
+ fi
+}
- %{__make} mrproper
- ln -sf arch/%{base_arch}/defconfig .config
+BuildKernel() {
+ %{?_debug:set -x}
+ echo "Building kernel $1 ..."
+ %{__make} $CrossOpts mrproper \
+ RCS_FIND_IGNORE='-name build-done -prune -o'
+ ln -sf arch/%{_target_base_arch}/defconfig .config
%ifarch sparc
- sparc32 %{__make} oldconfig
- sparc32 %{__make} dep clean
+ sparc32 %{__make} clean \
+ RCS_FIND_IGNORE='-name build-done -prune -o'
%else
- %{__make} oldconfig
- %{__make} dep clean
+ %{__make} $CrossOpts clean \
+ RCS_FIND_IGNORE='-name build-done -prune -o'
%endif
- %{__make} include/linux/version.h
+ %{__make} $CrossOpts include/linux/version.h \
+ %{?with_verbose:V=1}
-# making table for soundmodem.
- cd drivers/net/hamradio/soundmodem
- %{__cc} -o gentbl -lm gentbl.c
- ./gentbl
- cd ../../../..
+# make does vmlinux, modules and bzImage at once
+%ifarch sparc sparc64
+%ifarch sparc64
+ %{__make} image \
+ %{?with_verbose:V=1}
-%ifarch %{ix86}
- %{__make} bzImage
-%endif
-%ifarch sparc
- sparc32 %{__make} boot
+ %{__make} modules \
+ %{?with_verbose:V=1}
%else
-%ifnarch %{ix86}
- %{__make}
-%endif
+ sparc32 %{__make} \
+ %{?with_verbose:V=1}
%endif
-%ifarch sparc
- sparc32 %{__make} modules
%else
- %{__make} modules
+ %{__make} $CrossOpts \
+ %{?with_verbose:V=1}
%endif
+}
+
+PreInstallKernel (){
+ BOOT=
+ smp=
+ [ "$1" = "BOOT" -o "$2" = "BOOT" ] && BOOT=yes
+ [ "$1" = "smp" -o "$2" = "smp" ] && smp=yes
+ if [ "$smp" = "yes" ]; then
+ Config="%{_target_base_arch}-smp"
+ else
+ Config="%{_target_base_arch}"
+ fi
+ if [ "$BOOT" = "yes" ]; then
+ KernelVer=%{version}-%{release}BOOT
+ else
+ KernelVer=%{version}-%{release}$1
+ fi
mkdir -p $KERNEL_INSTALL_DIR/boot
install System.map $KERNEL_INSTALL_DIR/boot/System.map-$KernelVer
-%ifarch %{ix86}
- cp arch/i386/boot/bzImage $KERNEL_INSTALL_DIR/boot/vmlinuz-$KernelVer
+%ifarch %{ix86} amd64
+ install arch/%{_target_base_arch}/boot/bzImage $KERNEL_INSTALL_DIR/boot/vmlinuz-$KernelVer
%endif
%ifarch alpha sparc sparc64
gzip -cfv vmlinux > vmlinuz
install vmlinux $KERNEL_INSTALL_DIR/boot/vmlinux-$KernelVer
install vmlinuz $KERNEL_INSTALL_DIR/boot/vmlinuz-$KernelVer
+%ifarch sparc
+ elftoaout arch/sparc/boot/image -o vmlinux.aout
+ install vmlinux.aout $KERNEL_INSTALL_DIR/boot/vmlinux.aout-$KernelVer
+%endif
+%ifarch sparc64
+ elftoaout arch/sparc64/boot/image -o vmlinux.aout
+ install vmlinux.aout $KERNEL_INSTALL_DIR/boot/vmlinux.aout-$KernelVer
+%endif
%endif
%ifarch ppc
install vmlinux $KERNEL_INSTALL_DIR/boot/vmlinux-$KernelVer
install vmlinux $KERNEL_INSTALL_DIR/boot/vmlinuz-$KernelVer
%endif
-%ifarch sparc
- sparc32 %{__make} modules_install \
- INSTALL_MOD_PATH=$KERNEL_INSTALL_DIR \
- KERNELRELEASE=$KernelVer
- echo KERNEL RELEASE $KernelVer
-%else
- %{__make} modules_install \
- INSTALL_MOD_PATH=$KERNEL_INSTALL_DIR \
- KERNELRELEASE=$KernelVer
- echo KERNEL RELEASE $KernelVer
+%ifarch ia64
+ gzip -cfv vmlinux > vmlinuz
+ install -d $KERNEL_INSTALL_DIR/boot/efi
+#? install vmlinux $KERNEL_INSTALL_DIR/boot/efi/vmlinux-$KernelVer
+ install vmlinuz $KERNEL_INSTALL_DIR/boot/efi/vmlinuz-$KernelVer
+ ln -sf efi/vmlinuz-$KernelVer $KERNEL_INSTALL_DIR/boot/vmlinuz-$KernelVer
%endif
+ %{__make} $CrossOpts modules_install \
+ %{?with_verbose:V=1} \
+ INSTALL_MOD_PATH=$KERNEL_INSTALL_DIR \
+ KERNELRELEASE=$KernelVer
+
+ echo "CHECKING DEPENDENCIES FOR KERNEL MODULES"
+ /sbin/depmod --basedir $KERNEL_INSTALL_DIR -ae -F $KERNEL_INSTALL_DIR/boot/System.map-$KernelVer -r $KernelVer || echo
+
+ echo "KERNEL RELEASE $KernelVer DONE"
+
}
KERNEL_BUILD_DIR=`pwd`
-KERNEL_INSTALL_DIR=$KERNEL_BUILD_DIR-installed
-rm -rf $KERNEL_INSTALL_DIR
-install -d $KERNEL_INSTALL_DIR
-
-# make drivers/scsi/ missing files
-# (cd drivers/scsi; make -f M)
# UP KERNEL
-%{!?_without_up:BuildKernel}
+KERNEL_INSTALL_DIR="$KERNEL_BUILD_DIR/build-done/kernel-UP"
+rm -rf $KERNEL_INSTALL_DIR
+BuildConfig
+%{?with_up:BuildKernel}
+%{?with_up:PreInstallKernel}
# SMP KERNEL
-%{!?_without_smp:BuildKernel smp}
+KERNEL_INSTALL_DIR="$KERNEL_BUILD_DIR/build-done/kernel-SMP"
+rm -rf $KERNEL_INSTALL_DIR
+BuildConfig smp
+%{?with_smp:BuildKernel smp}
+%{?with_smp:PreInstallKernel smp}
-# BOOT kernel
-%ifnarch i586 i686 athlon
-KERNEL_INSTALL_DIR="$KERNEL_BUILD_DIR-installed%{_libdir}/bootdisk"
+%if %{with BOOT}
+KERNEL_INSTALL_DIR="$KERNEL_BUILD_DIR/build-done/BOOT"
rm -rf $KERNEL_INSTALL_DIR
-%{!?_without_boot:BuildKernel BOOT}
+ConfigBOOT
+BuildKernel BOOT
+PreInstallKernel BOOT
%endif
%install
rm -rf $RPM_BUILD_ROOT
umask 022
+%if "%{_target_base_arch}" != "%{_arch}"
+CrossOpts="ARCH=%{_target_base_arch} CROSS_COMPILE=%{_target_cpu}-pld-linux-"
+%else
+CrossOpts=""
+%endif
-install -d $RPM_BUILD_ROOT%{_prefix}/{include,src/linux-%{version}}
+install -d $RPM_BUILD_ROOT%{_prefix}/src/linux-%{version}
+install -d $RPM_BUILD_ROOT/lib/modules/%{version}-%{release}{,smp}/misc
+
+install %{SOURCE40} FAQ-pl
KERNEL_BUILD_DIR=`pwd`
-KERNEL_BUILD_INSTALL=no
-%{!?_without_up:KERNEL_BUILD_INSTALL=yes}
-%{!?_without_smp:KERNEL_BUILD_INSTALL=yes}
-[ "$KERNEL_BUILD_INSTALL" = "yes" ] && cp -a $KERNEL_BUILD_DIR-installed/* $RPM_BUILD_ROOT
+%if %{with up} || %{with smp}
+cp -a $KERNEL_BUILD_DIR/build-done/kernel-*/* $RPM_BUILD_ROOT
+%endif
for i in "" smp ; do
if [ -e $RPM_BUILD_ROOT/lib/modules/%{version}-%{release}$i ] ; then
$RPM_BUILD_ROOT/lib/modules/%{version}-%{release}$i/build
fi
done
-ln -sf ../src/linux/include/linux $RPM_BUILD_ROOT%{_includedir}/linux
-ln -sf linux-%{version} $RPM_BUILD_ROOT%{_prefix}/src/linux
-%ifarch sparc sparc64
-ln -s /usr/src/linux/include/asm-sparc $RPM_BUILD_ROOT%{_includedir}/asm-sparc
-ln -s ../src/linux/include/asm-sparc64 $RPM_BUILD_ROOT%{_includedir}/asm-sparc64
-%else
-ln -sf ../src/linux/include/asm $RPM_BUILD_ROOT/usr/include/asm
-%endif
-
-%if %{?_without_source:0}%{!?_without_source:1}
-cp -a . $RPM_BUILD_ROOT/usr/src/linux-%{version}
-%else
-cp -a {include,scripts,Makefile,Rules.make,Documentation} $RPM_BUILD_ROOT/usr/src/linux-%{version}
-%endif
+ln -sf linux-%{version} $RPM_BUILD_ROOT%{_prefix}/src/linux
-%ifarch sparc sparc64
-sh %{SOURCE2} $RPM_BUILD_ROOT%{_includedir}
-cp -a %{SOURCE2} $RPM_BUILD_ROOT%{_includedir}/asm/BuildASM
-%endif
+find . ! -name "build-done" ! -name "." -maxdepth 1 -exec cp -a "{}" "$RPM_BUILD_ROOT/usr/src/linux-%{version}/" ";"
cd $RPM_BUILD_ROOT%{_prefix}/src/linux-%{version}
-%if %{?_without_source:0}%{!?_without_source:1}
-%{__make} mrproper
-
-find -name "*~" -print | xargs rm -f
-find -name "*.orig" -print | xargs rm -f
-
-%ifarch %{ix86}
-cat $RPM_SOURCE_DIR/kernel-ia32.config > .config
-%else
-install $RPM_SOURCE_DIR/kernel-%{_target_cpu}.config .config
-%endif
-
-%ifarch i386
-echo "CONFIG_M386=y" >> .config
-%endif
-%ifarch i586
-echo "CONFIG_M586=y" >> .config
-%endif
-%ifarch i686
-echo "CONFIG_M686=y" >> .config
-%endif
-%ifarch athlon
-echo "CONFIG_MK7=y" >> .config
-%endif
-cat %{SOURCE1000} >> .config
-cat %{SOURCE1001} >> .config
-%{!?_without_grsec:cat %{SOURCE1002} >> .config}
-
-%ifarch sparc64
- echo -e ',s/^CONFIG_FB_I810=.*/# CONFIG_FB_I810 is not set/g\n,w' | \
- ed .config
- echo -e ',s/CONFIG_IPSEC_AUTH_HMAC_SHA1=y/# CONFIG_IPSEC_AUTH_HMAC_SHA1 is not set/g\n,w' | \
- ed .config
-%endif
-
-%ifarch %{ix86}
-cat %{SOURCE2000} >> .config
-%endif
-
-%ifarch sparc
-sparc32 %{__make} oldconfig
-%else
-%{__make} oldconfig
-%endif
-
-mv include/linux/autoconf.h include/linux/autoconf-up.h
-cp .config config-up
+%{__make} $CrossOpts mrproper \
+ RCS_FIND_IGNORE='-name build-done -prune -o'
+find -name "*~" -exec rm -f "{}" ";"
+find -name "*.orig" -exec rm -f "{}" ";"
-%ifarch %{ix86}
-cat $RPM_SOURCE_DIR/kernel-ia32-smp.config >> .config
-%else
-install $RPM_SOURCE_DIR/kernel-%{_target_cpu}-smp.config .config
-%endif
-
-%ifarch i386
-echo "CONFIG_M386=y" >> .config
-%endif
-%ifarch i586
-echo "CONFIG_M586=y" >> .config
-%endif
-%ifarch i686
-echo "CONFIG_M686=y" >> .config
-%endif
-%ifarch athlon
-echo "CONFIG_MK7=y" >> .config
-%endif
-
-cat %{SOURCE1000} >> .config
-cat %{SOURCE1001} >> .config
-%{!?_without_grsec:cat %{SOURCE1002} >> .config}
-
-%ifarch sparc64
- echo -e ',s/^CONFIG_FB_I810=.*/# CONFIG_FB_I810 is not set/g\n,w' | \
- ed .config
- echo -e ',s/CONFIG_IPSEC_AUTH_HMAC_SHA1=y/# CONFIG_IPSEC_AUTH_HMAC_SHA1 is not set/g\n,w' | \
- ed .config
-%endif
-
-%ifarch %{ix86}
-cat %{SOURCE2000} >> .config
-%endif
-
-%ifarch sparc
-sparc32 %{__make} oldconfig
-%else
-%{__make} oldconfig
-%endif
-mv include/linux/autoconf.h include/linux/autoconf-smp.h
-cp .config config-smp
-%endif
-
-install %{SOURCE1} $RPM_BUILD_ROOT/usr/src/linux-%{version}/include/linux/autoconf.h
-
-%if %{?_without_source:0}%{!?_without_source:1}
-# this generates modversions info which we want to include and we may as
-# well include the depends stuff as well
-%{__make} symlinks
-%{__make} include/linux/version.h
-#%{__make} "`pwd`/include/linux/modversions.h"
-%endif
-rm -f include/linux/modversions.h
-echo "#include <linux/modsetver.h>" > include/linux/modversions.h
-
-
-# this generates modversions info which we want to include and we may as
-# well include the depends stuff as well, after we fix the paths
+if [ -e $KERNEL_BUILD_DIR/build-done/kernel-UP/usr/src/linux-%{version}/include/linux/autoconf-up.h ]; then
+install $KERNEL_BUILD_DIR/build-done/kernel-UP/usr/src/linux-%{version}/include/linux/autoconf-up.h \
+ $RPM_BUILD_ROOT/usr/src/linux-%{version}/include/linux
+install $KERNEL_BUILD_DIR/build-done/kernel-UP/usr/src/linux-%{version}/config-up \
+ $RPM_BUILD_ROOT/usr/src/linux-%{version}/include/linux
+fi
-%if %{?_without_source:0}%{!?_without_source:1}
-%{__make} depend
-find $RPM_BUILD_ROOT/usr/src/linux-%{version} -name ".*depend" \
- -exec /bin/sh -c "echo -e \",s|$RPM_BUILD_ROOT||g\n,w\" | ed {}" \;
+if [ -e $KERNEL_BUILD_DIR/build-done/kernel-SMP/usr/src/linux-%{version}/include/linux/autoconf-smp.h ]; then
+install $KERNEL_BUILD_DIR/build-done/kernel-SMP/usr/src/linux-%{version}/include/linux/autoconf-smp.h \
+ $RPM_BUILD_ROOT/usr/src/linux-%{version}/include/linux
+install $KERNEL_BUILD_DIR/build-done/kernel-SMP/usr/src/linux-%{version}/config-smp \
+ $RPM_BUILD_ROOT/usr/src/linux-%{version}/include/linux
+fi
-%{__make} clean
-rm -f scripts/mkdep
-rm -f drivers/net/hamradio/soundmodem/gentbl
+%if %{with up} || %{with smp}
+# UP or SMP
+install $KERNEL_BUILD_DIR/build-done/kernel-*/usr/src/linux-%{version}/include/linux/* \
+$RPM_BUILD_ROOT/usr/src/linux-%{version}/include/linux
%endif
-# BOOT
-%if %{?_without_boot:0}%{!?_without_boot:1}
-%ifnarch i586 i686 athlon
-install -d $RPM_BUILD_ROOT%{_libdir}/bootdisk
-cp -rdp $KERNEL_BUILD_DIR-installed%{_libdir}/bootdisk/* $RPM_BUILD_ROOT%{_libdir}/bootdisk
-%endif
-%endif
+%{__make} $CrossOpts mrproper
+%{__make} $CrossOpts include/linux/version.h
+install %{SOURCE1} $RPM_BUILD_ROOT%{_prefix}/src/linux-%{version}/include/linux/autoconf.h
%clean
rm -rf $RPM_BUILD_ROOT
-rm -rf $RPM_BUILD_DIR/linux-%{version}-installed
+
+%preun
+rm -f /lib/modules/%{version}-%{release}/modules.*
%post
+%ifarch ia64
+mv -f /boot/efi/vmlinuz /boot/efi/vmlinuz.old 2> /dev/null > /dev/null
+%endif
mv -f /boot/vmlinuz /boot/vmlinuz.old 2> /dev/null > /dev/null
mv -f /boot/System.map /boot/System.map.old 2> /dev/null > /dev/null
+%ifarch ia64
+ln -sf vmlinuz-%{version}-%{release} /boot/efi/vmlinuz
+%endif
ln -sf vmlinuz-%{version}-%{release} /boot/vmlinuz
ln -sf System.map-%{version}-%{release} /boot/System.map
fi
rm -f /lib/modules/%{version}
ln -snf %{version}-%{release} /lib/modules/%{version}
-/sbin/depmod -a -F /boot/System.map-%{version}-%{release} %{version}-%{release}
+%depmod %{version}-%{release}
-/sbin/geninitrd -f --initrdfs=rom /boot/initrd-%{version}-%{release}.gz %{version}-%{release}
-mv -f /boot/initrd /boot/initrd.old
-ln -sf initrd-%{version}-%{release}.gz /boot/initrd
-
-if [ -f %{_prefix}/src/linux-%{version}/config-up ] ; then
- ln -s %{_prefix}/src/linux-%{version}/config-up %{_prefix}/src/linux-%{version}/.config
-fi
+/sbin/geninitrd -f --initrdfs=rom %{initrd_dir}/initrd-%{version}-%{release}.gz %{version}-%{release}
+mv -f %{initrd_dir}/initrd %{initrd_dir}/initrd.old
+ln -sf initrd-%{version}-%{release}.gz %{initrd_dir}/initrd
if [ -x /sbin/rc-boot ] ; then
/sbin/rc-boot 1>&2 || :
fi
+%postun
+if [ -L /lib/modules/%{version} ]; then
+ if [ "`ls -l /lib/modules/%{version} | awk '{ print $10 }'`" = "%{version}-%{release}" ]; then
+ if [ "$1" = "0" ]; then
+ rm -f /lib/modules/%{version}
+ fi
+ fi
+fi
+rm -f %{initrd_dir}/initrd-%{version}-%{release}.gz
+
+%post drm
+%depmod %{version}-%{release}
+
+%postun drm
+%depmod %{version}-%{release}
+
+%post pcmcia
+%depmod %{version}-%{release}
+
+%postun pcmcia
+%depmod %{version}-%{release}
+
+%post sound-alsa
+%depmod %{version}-%{release}
+
+%postun sound-alsa
+%depmod %{version}-%{release}
+
+%post sound-oss
+%depmod %{version}-%{release}
+
+%postun sound-oss
+%depmod %{version}-%{release}
+
+%preun smp
+rm -f /lib/modules/%{version}-%{release}smp/modules.*
+
%post smp
+%ifarch ia64
+mv -f /boot/efi/vmlinuz /boot/efi/vmlinuz.old 2> /dev/null > /dev/null
+%endif
mv -f /boot/vmlinuz /boot/vmlinuz.old 2> /dev/null > /dev/null
mv -f /boot/System.map /boot/System.map.old 2> /dev/null > /dev/null
+%ifarch ia64
+ln -sf vmlinuz-%{version}-%{release}smp /boot/efi/vmlinuz
+%endif
ln -sf vmlinuz-%{version}-%{release}smp /boot/vmlinuz
ln -sf System.map-%{version}-%{release}smp /boot/System.map
fi
rm -f /lib/modules/%{version}
ln -snf %{version}-%{release}smp /lib/modules/%{version}
-/sbin/depmod -a -F /boot/System.map-%{version}-%{release}smp %{version}-%{release}smp
-
-/sbin/geninitrd -f --initrdfs=rom /boot/initrd-%{version}-%{release}smp.gz %{version}-%{release}smp
-mv -f /boot/initrd /boot/initrd.old
-ln -sf initrd-%{version}-%{release}smp.gz /boot/initrd
+%depmod %{version}-%{release}smp
-if [ -f %{_prefix}/src/linux-%{version}/config-smp ] ; then
- ln -s %{_prefix}/src/linux-%{version}/config-smp %{_prefix}/src/linux-%{version}/.config
-fi
+/sbin/geninitrd -f --initrdfs=rom %{initrd_dir}/initrd-%{version}-%{release}smp.gz %{version}-%{release}smp
+mv -f %{initrd_dir}/initrd %{initrd_dir}/initrd.old
+ln -sf initrd-%{version}-%{release}smp.gz %{initrd_dir}/initrd
if [ -x /sbin/rc-boot ] ; then
/sbin/rc-boot 1>&2 || :
fi
+%postun smp
+if [ -L /lib/modules/%{version} ]; then
+ if [ "`ls -l /lib/modules/%{version} | awk '{ print $10 }'`" = "%{version}-%{release}smp" ]; then
+ if [ "$1" = "0" ]; then
+ rm -f /lib/modules/%{version}
+ fi
+ fi
+fi
+rm -f %{initrd_dir}/initrd-%{version}-%{release}smp.gz
+
%post BOOT
if [ ! -L %{_libdir}/bootdisk/lib/modules/%{version} ] ; then
mv -f %{_libdir}/bootdisk/lib/modules/%{version} %{_libdir}/bootdisk/lib/modules/%{version}.rpmsave
rm -f %{_libdir}/bootdisk/boot/vmlinuz-%{version}
ln -snf vmlinuz-%{version}-%{release}BOOT %{_libdir}/bootdisk/boot/vmlinuz-%{version}
-%postun
-if [ -L /lib/modules/%{version} ]; then
- if [ "`ls -l /lib/modules/%{version} | awk '{ print $11 }'`" = "%{version}-%{release}" ]; then
- if [ "$1" = "0" ]; then
- rm -f /lib/modules/%{version}
- fi
- fi
-fi
-rm -f /boot/initrd-%{version}-%{release}.gz
-
-%post pcmcia-cs
-/sbin/depmod -a -F /boot/System.map-%{version}-%{release} %{version}-%{release}
-
-%postun pcmcia-cs
-/sbin/depmod -a -F /boot/System.map-%{version}-%{release} %{version}-%{release} > /dev/null 2>&1
+%post smp-drm
+%depmod %{version}-%{release}smp
-%post drm
-/sbin/depmod -a -F /boot/System.map-%{version}-%{release} %{version}-%{release}
+%postun smp-drm
+%depmod %{version}-%{release}smp
-%postun drm
-/sbin/depmod -a -F /boot/System.map-%{version}-%{release} %{version}-%{release} > /dev/null 2>&1
+%post smp-pcmcia
+%depmod %{version}-%{release}smp
-%postun smp
-if [ -L /lib/modules/%{version} ]; then
- if [ "`ls -l /lib/modules/%{version} | awk '{ print $11 }'`" = "%{version}-%{release}smp" ]; then
- if [ "$1" = "0" ]; then
- rm -f /lib/modules/%{version}
- fi
- fi
-fi
-rm -f /boot/initrd-%{version}-%{release}smp.gz
+%postun smp-pcmcia
+%depmod %{version}-%{release}smp
-%post smp-pcmcia-cs
-/sbin/depmod -a -F /boot/System.map-%{version}-%{release}smp %{version}-%{release}smp
+%post smp-sound-alsa
+%depmod %{version}-%{release}smp
-%postun smp-pcmcia-cs
-/sbin/depmod -a -F /boot/System.map-%{version}-%{release}smp %{version}-%{release}smp > /dev/null 2>&1
+%postun smp-sound-alsa
+%depmod %{version}-%{release}smp
-%post smp-drm
-/sbin/depmod -a -F /boot/System.map-%{version}-%{release}smp %{version}-%{release}smp
+%post smp-sound-oss
+%depmod %{version}-%{release}smp
-%postun smp-drm
-/sbin/depmod -a -F /boot/System.map-%{version}-%{release}smp %{version}-%{release}smp > /dev/null 2>&1
+%postun smp-sound-oss
+%depmod %{version}-%{release}smp
%postun BOOT
if [ -L %{_libdir}/bootdisk/lib/modules/%{version} ]; then
- if [ "`ls -l %{_libdir}/bootdisk/lib/modules/%{version} | awk '{ print $11 }'`" = "%{version}-%{release}BOOT" ]; then
+ if [ "`ls -l %{_libdir}/bootdisk/lib/modules/%{version} | awk '{ print $10 }'`" = "%{version}-%{release}BOOT" ]; then
if [ "$1" = "0" ]; then
rm -f %{_libdir}/bootdisk/lib/modules/%{version}
fi
ln -snf linux-%{version} /usr/src/linux
%postun headers
-if [ -L /usr/src/linux ]; then
- if [ "`ls -l /usr/src/linux | awk '{ print $11 }'`" = "linux-%{version}" ]; then
+if [ -L %{_prefix}/src/linux ]; then
+ if [ "`ls -l %{_prefix}/src/linux | awk '{ print $10 }'`" = "linux-%{version}" ]; then
if [ "$1" = "0" ]; then
- rm -f /usr/src/linux
+ rm -f %{_prefix}/src/linux
fi
fi
fi
-%if %{?_without_up:0}%{!?_without_up:1}
+%if %{with up}
%files
%defattr(644,root,root,755)
-%ifarch alpha sparc sparc64 ppc
+%doc FAQ-pl
+%ifarch alpha ppc
+/boot/vmlinux-%{version}-%{release}
+%endif
+%ifarch sparc sparc64
/boot/vmlinux-%{version}-%{release}
+/boot/vmlinux.aout-%{version}-%{release}
+%endif
+%ifarch ia64
+/boot/efi/vmlinuz-%{version}-%{release}
%endif
/boot/vmlinuz-%{version}-%{release}
/boot/System.map-%{version}-%{release}
%dir /lib/modules/%{version}-%{release}
/lib/modules/%{version}-%{release}/kernel
+%dir /lib/modules/%{version}-%{release}/misc
%ifnarch sparc sparc64
+#pcmcia stuff
%exclude /lib/modules/%{version}-%{release}/kernel/drivers/pcmcia
-%exclude /lib/modules/%{version}-%{release}/kernel/drivers/ide/legacy/*-cs.o*
-%exclude /lib/modules/%{version}-%{release}/kernel/drivers/mtd/maps/pcmcia*
-%exclude /lib/modules/%{version}-%{release}/kernel/drivers/net/pcmcia
-%exclude /lib/modules/%{version}-%{release}/kernel/drivers/scsi/pcmcia
-%exclude /lib/modules/%{version}-%{release}/kernel/drivers/char/pcmcia
-%exclude /lib/modules/%{version}-%{release}/kernel/drivers/net/wireless/*_cs.o*
-%exclude /lib/modules/%{version}-%{release}/kernel/drivers/parport/*_cs.o*
-%exclude /lib/modules/%{version}-%{release}/kernel/drivers/bluetooth/*_cs.o*
-%endif
-%ifnarch ppc sparc sparc64
-%exclude /lib/modules/%{version}-%{release}/kernel/drivers/isdn/hisax/*_cs.o*
-%ifnarch alpha
-%exclude /lib/modules/%{version}-%{release}/kernel/drivers/isdn/avmb1/avm_cs.o*
-%exclude /lib/modules/%{version}-%{release}/kernel/drivers/telephony/*_pcmcia.o*
-%endif
-%endif
-%ifnarch sparc
+%exclude /lib/modules/%{version}-%{release}/kernel/drivers/*/pcmcia
+%exclude /lib/modules/%{version}-%{release}/kernel/drivers/bluetooth/*_cs.ko*
+%exclude /lib/modules/%{version}-%{release}/kernel/drivers/net/wireless/*_cs.ko*
+%exclude /lib/modules/%{version}-%{release}/kernel/drivers/parport/parport_cs.ko*
+%exclude /lib/modules/%{version}-%{release}/kernel/drivers/serial/serial_cs.ko*
+%endif
+%ifnarch sparc sparc64
+#drm stuff
%exclude /lib/modules/%{version}-%{release}/kernel/drivers/char/drm
%endif
+%ifnarch sparc sparc64
+#oss sound stuff
+%exclude /lib/modules/%{version}-%{release}/kernel/sound/oss
+%endif
+#alsa sound stuff
+%exclude /lib/modules/%{version}-%{release}/kernel/sound/core
+%exclude /lib/modules/%{version}-%{release}/kernel/sound/drivers
+%ifnarch sparc sparc64
+%exclude /lib/modules/%{version}-%{release}/kernel/sound/i2c
+%exclude /lib/modules/%{version}-%{release}/kernel/sound/isa
+%exclude /lib/modules/%{version}-%{release}/kernel/sound/pci
+%exclude /lib/modules/%{version}-%{release}/kernel/sound/synth
+%exclude /lib/modules/%{version}-%{release}/kernel/sound/usb
+%endif
+%ifarch sparc sparc64
+%exclude /lib/modules/%{version}-%{release}/kernel/sound/sparc
+%endif
+
/lib/modules/%{version}-%{release}/build
%ghost /lib/modules/%{version}-%{release}/modules.*
%ifnarch sparc sparc64
-%files pcmcia-cs
+%files drm
+%defattr(644,root,root,755)
+/lib/modules/%{version}-%{release}/kernel/drivers/char/drm
+%endif
+
+%ifnarch sparc sparc64
+%files pcmcia
%defattr(644,root,root,755)
/lib/modules/%{version}-%{release}/kernel/drivers/pcmcia
-/lib/modules/%{version}-%{release}/kernel/drivers/ide/legacy/*-cs.o*
-/lib/modules/%{version}-%{release}/kernel/drivers/mtd/maps/pcmcia*
-/lib/modules/%{version}-%{release}/kernel/drivers/net/pcmcia
-/lib/modules/%{version}-%{release}/kernel/drivers/scsi/pcmcia
-/lib/modules/%{version}-%{release}/kernel/drivers/char/pcmcia
-/lib/modules/%{version}-%{release}/kernel/drivers/net/wireless/*_cs.o*
-/lib/modules/%{version}-%{release}/kernel/drivers/parport/*_cs.o*
-/lib/modules/%{version}-%{release}/kernel/drivers/bluetooth/*_cs.o*
-%ifnarch ppc
-/lib/modules/%{version}-%{release}/kernel/drivers/isdn/hisax/*_cs.o*
-%ifnarch alpha
-/lib/modules/%{version}-%{release}/kernel/drivers/isdn/avmb1/avm_cs.o*
-/lib/modules/%{version}-%{release}/kernel/drivers/telephony/*_pcmcia.o*
+/lib/modules/%{version}-%{release}/kernel/drivers/*/pcmcia
+/lib/modules/%{version}-%{release}/kernel/drivers/bluetooth/*_cs.ko*
+/lib/modules/%{version}-%{release}/kernel/drivers/net/wireless/*_cs.ko*
+/lib/modules/%{version}-%{release}/kernel/drivers/parport/parport_cs.ko*
+/lib/modules/%{version}-%{release}/kernel/drivers/serial/serial_cs.ko*
%endif
+
+%files sound-alsa
+%defattr(644,root,root,755)
+/lib/modules/%{version}-%{release}/kernel/sound/core
+/lib/modules/%{version}-%{release}/kernel/sound/drivers
+%ifnarch sparc sparc64
+/lib/modules/%{version}-%{release}/kernel/sound/i2c
+/lib/modules/%{version}-%{release}/kernel/sound/isa
+/lib/modules/%{version}-%{release}/kernel/sound/pci
+/lib/modules/%{version}-%{release}/kernel/sound/synth
+/lib/modules/%{version}-%{release}/kernel/sound/usb
%endif
+%ifarch sparc sparc64
+/lib/modules/%{version}-%{release}/kernel/sound/sparc
%endif
-%ifnarch sparc
-%files drm
+%ifnarch sparc sparc64
+%files sound-oss
%defattr(644,root,root,755)
-/lib/modules/%{version}-%{release}/kernel/drivers/char/drm
-%endif # %%{_without_up}
+/lib/modules/%{version}-%{release}/kernel/sound/oss
%endif
+%endif # %%{with up}
-%if %{?_without_smp:0}%{!?_without_smp:1}
+%if %{with smp}
%files smp
%defattr(644,root,root,755)
+%doc FAQ-pl
%ifarch alpha sparc sparc64 ppc
/boot/vmlinux-%{version}-%{release}smp
%endif
+%ifarch ia64
+/boot/efi/vmlinuz-%{version}-%{release}smp
+%endif
/boot/vmlinuz-%{version}-%{release}smp
/boot/System.map-%{version}-%{release}smp
%dir /lib/modules/%{version}-%{release}smp
/lib/modules/%{version}-%{release}smp/kernel
+%dir /lib/modules/%{version}-%{release}smp/misc
%ifnarch sparc sparc64
+#pcmcia stuff
%exclude /lib/modules/%{version}-%{release}smp/kernel/drivers/pcmcia
-%exclude /lib/modules/%{version}-%{release}smp/kernel/drivers/ide/legacy/*-cs.o*
-%exclude /lib/modules/%{version}-%{release}smp/kernel/drivers/mtd/maps/pcmcia*
-%exclude /lib/modules/%{version}-%{release}smp/kernel/drivers/net/pcmcia
-%exclude /lib/modules/%{version}-%{release}smp/kernel/drivers/scsi/pcmcia
-%exclude /lib/modules/%{version}-%{release}smp/kernel/drivers/char/pcmcia
-%exclude /lib/modules/%{version}-%{release}smp/kernel/drivers/net/wireless/*_cs.o*
-%exclude /lib/modules/%{version}-%{release}smp/kernel/drivers/parport/*_cs.o*
-%exclude /lib/modules/%{version}-%{release}smp/kernel/drivers/bluetooth/*_cs.o*
-%endif
-%ifnarch ppc sparc sparc64
-%exclude /lib/modules/%{version}-%{release}smp/kernel/drivers/isdn/hisax/*_cs.o*
-%ifnarch alpha
-%exclude /lib/modules/%{version}-%{release}smp/kernel/drivers/isdn/avmb1/avm_cs.o*
-%exclude /lib/modules/%{version}-%{release}smp/kernel/drivers/telephony/*_pcmcia.o*
-%endif
-%endif
-%ifnarch sparc
+%exclude /lib/modules/%{version}-%{release}smp/kernel/drivers/*/pcmcia
+%exclude /lib/modules/%{version}-%{release}smp/kernel/drivers/bluetooth/*_cs.ko*
+%exclude /lib/modules/%{version}-%{release}smp/kernel/drivers/net/wireless/*_cs.ko*
+%exclude /lib/modules/%{version}-%{release}smp/kernel/drivers/parport/parport_cs.ko*
+%exclude /lib/modules/%{version}-%{release}smp/kernel/drivers/serial/serial_cs.ko*
+%endif
+%ifnarch sparc sparc64
+#drm stuff
%exclude /lib/modules/%{version}-%{release}smp/kernel/drivers/char/drm
%endif
+%ifnarch sparc sparc64
+#oss sound stuff
+%exclude /lib/modules/%{version}-%{release}smp/kernel/sound/oss
+%endif
+#alsa sound stuff
+%exclude /lib/modules/%{version}-%{release}smp/kernel/sound/core
+%exclude /lib/modules/%{version}-%{release}smp/kernel/sound/drivers
+%ifnarch sparc sparc64
+%exclude /lib/modules/%{version}-%{release}smp/kernel/sound/i2c
+%exclude /lib/modules/%{version}-%{release}smp/kernel/sound/isa
+%exclude /lib/modules/%{version}-%{release}smp/kernel/sound/pci
+%exclude /lib/modules/%{version}-%{release}smp/kernel/sound/synth
+%exclude /lib/modules/%{version}-%{release}smp/kernel/sound/usb
+%endif
+%ifarch sparc sparc64
+%exclude /lib/modules/%{version}-%{release}smp/kernel/sound/sparc
+%endif
+
/lib/modules/%{version}-%{release}smp/build
%ghost /lib/modules/%{version}-%{release}smp/modules.*
%ifnarch sparc sparc64
-%files -n kernel-smp-pcmcia-cs
+%files smp-drm
+%defattr(644,root,root,755)
+/lib/modules/%{version}-%{release}smp/kernel/drivers/char/drm
+%endif
+
+%ifnarch sparc sparc64
+%files smp-pcmcia
%defattr(644,root,root,755)
/lib/modules/%{version}-%{release}smp/kernel/drivers/pcmcia
-/lib/modules/%{version}-%{release}smp/kernel/drivers/ide/legacy/*-cs.o*
-/lib/modules/%{version}-%{release}smp/kernel/drivers/mtd/maps/pcmcia*
-/lib/modules/%{version}-%{release}smp/kernel/drivers/net/pcmcia
-/lib/modules/%{version}-%{release}smp/kernel/drivers/scsi/pcmcia
-/lib/modules/%{version}-%{release}smp/kernel/drivers/char/pcmcia
-/lib/modules/%{version}-%{release}smp/kernel/drivers/net/wireless/*_cs.o*
-/lib/modules/%{version}-%{release}smp/kernel/drivers/parport/*_cs.o*
-/lib/modules/%{version}-%{release}smp/kernel/drivers/bluetooth/dtl1_cs.o*
-%ifnarch ppc
-/lib/modules/%{version}-%{release}smp/kernel/drivers/isdn/hisax/*_cs.o*
-%ifnarch alpha
-/lib/modules/%{version}-%{release}smp/kernel/drivers/isdn/avmb1/avm_cs.o*
-/lib/modules/%{version}-%{release}smp/kernel/drivers/telephony/*_pcmcia.o*
+/lib/modules/%{version}-%{release}smp/kernel/drivers/*/pcmcia
+/lib/modules/%{version}-%{release}smp/kernel/drivers/bluetooth/*_cs.ko*
+/lib/modules/%{version}-%{release}smp/kernel/drivers/net/wireless/*_cs.ko*
+/lib/modules/%{version}-%{release}smp/kernel/drivers/parport/parport_cs.ko*
+/lib/modules/%{version}-%{release}smp/kernel/drivers/serial/serial_cs.ko*
%endif
+
+%files smp-sound-alsa
+%defattr(644,root,root,755)
+/lib/modules/%{version}-%{release}smp/kernel/sound/core
+/lib/modules/%{version}-%{release}smp/kernel/sound/drivers
+%ifnarch sparc sparc64
+/lib/modules/%{version}-%{release}smp/kernel/sound/i2c
+/lib/modules/%{version}-%{release}smp/kernel/sound/isa
+/lib/modules/%{version}-%{release}smp/kernel/sound/pci
+/lib/modules/%{version}-%{release}smp/kernel/sound/synth
+/lib/modules/%{version}-%{release}smp/kernel/sound/usb
%endif
+%ifarch sparc sparc64
+/lib/modules/%{version}-%{release}smp/kernel/sound/sparc
%endif
-%ifnarch sparc
-%files -n kernel-smp-drm
+%ifnarch sparc sparc64
+%files smp-sound-oss
%defattr(644,root,root,755)
-/lib/modules/%{version}-%{release}smp/kernel/drivers/char/drm
-%endif # %%{_without_smp}
+/lib/modules/%{version}-%{release}smp/kernel/sound/oss
%endif
+%endif # %%{with smp}
-%if %{?_without_boot:0}%{!?_without_boot:1}
-%ifnarch i586 i686 athlon # narch
+%if %{with BOOT}
%files BOOT
%defattr(644,root,root,755)
%ifarch alpha sparc sparc64 ppc # arch
%{_libdir}/bootdisk/lib/modules/%{version}-%{release}BOOT/kernel
%{_libdir}/bootdisk/lib/modules/%{version}-%{release}BOOT/build
%ghost %{_libdir}/bootdisk/lib/modules/%{version}-%{release}BOOT/modules.*
-%endif # narch
-%endif # %%{_without_boot}
+%endif # %%{with BOOT}
%files headers
%defattr(644,root,root,755)
%dir %{_prefix}/src/linux-%{version}
%{_prefix}/src/linux-%{version}/include
-%{?_without_kheaders:%{_includedir}/asm}
-%{?_without_kheaders:%{_includedir}/linux}
+%{_prefix}/src/linux-%{version}/config-smp
+%{_prefix}/src/linux-%{version}/config-up
+
+%files module-build
+%defattr(644,root,root,755)
+%{_prefix}/src/linux-%{version}/Makefile
+%dir %{_prefix}/src/linux-%{version}/arch
+%dir %{_prefix}/src/linux-%{version}/arch/*
+%{_prefix}/src/linux-%{version}/arch/*/Makefile*
+%dir %{_prefix}/src/linux-%{version}/arch/*/kernel
+%{_prefix}/src/linux-%{version}/arch/*/kernel/Makefile
+%{_prefix}/src/linux-%{version}/arch/*/kernel/asm-offsets.*
+%{_prefix}/src/linux-%{version}/arch/*/kernel/sigframe.h
+%dir %{_prefix}/src/linux-%{version}/scripts
+%{_prefix}/src/linux-%{version}/scripts/Makefile*
+%{_prefix}/src/linux-%{version}/scripts/basic
+%{_prefix}/src/linux-%{version}/scripts/mod
+%{_prefix}/src/linux-%{version}/scripts/*.c
+%{_prefix}/src/linux-%{version}/scripts/*.sh
-%if %{?_without_doc:0}%{!?_without_doc:1}
%files doc
%defattr(644,root,root,755)
%{_prefix}/src/linux-%{version}/Documentation
-%endif
+#%%{_prefix}/src/linux-%{version}/netfilter-patch-o-matic
-%if %{?_without_source:0}%{!?_without_source:1}
+%if %{with source}
%files source
%defattr(644,root,root,755)
-%{_prefix}/src/linux-%{version}/arch
+%{_prefix}/src/linux-%{version}/arch/*/[!Mk]*
+%{_prefix}/src/linux-%{version}/arch/*/kernel/[!M]*
+%exclude %{_prefix}/src/linux-%{version}/arch/*/kernel/asm-offsets.*
+%exclude %{_prefix}/src/linux-%{version}/arch/*/kernel/sigframe.h
+%{_prefix}/src/linux-%{version}/cluster
%{_prefix}/src/linux-%{version}/crypto
%{_prefix}/src/linux-%{version}/drivers
%{_prefix}/src/linux-%{version}/fs
+%if %{with grsec}
+%{_prefix}/src/linux-%{version}/grsecurity
+%endif
%{_prefix}/src/linux-%{version}/init
-%{!?_without_grsec:%{_prefix}/src/linux-%{version}/grsecurity}
%{_prefix}/src/linux-%{version}/ipc
-#%{_prefix}/src/linux-%{version}/kdb
%{_prefix}/src/linux-%{version}/kernel
%{_prefix}/src/linux-%{version}/lib
%{_prefix}/src/linux-%{version}/mm
%{_prefix}/src/linux-%{version}/net
-%{_prefix}/src/linux-%{version}/scripts
-%{_prefix}/src/linux-%{version}/.config
-%{_prefix}/src/linux-%{version}/.depend
-%{_prefix}/src/linux-%{version}/.hdepend
+%{_prefix}/src/linux-%{version}/scripts/*
+%exclude %{_prefix}/src/linux-%{version}/scripts/Makefile*
+%exclude %{_prefix}/src/linux-%{version}/scripts/basic
+%exclude %{_prefix}/src/linux-%{version}/scripts/mod
+%exclude %{_prefix}/src/linux-%{version}/scripts/*.c
+%exclude %{_prefix}/src/linux-%{version}/scripts/*.sh
+%{_prefix}/src/linux-%{version}/sound
+%{_prefix}/src/linux-%{version}/security
+%{_prefix}/src/linux-%{version}/usr
%{_prefix}/src/linux-%{version}/COPYING
%{_prefix}/src/linux-%{version}/CREDITS
%{_prefix}/src/linux-%{version}/MAINTAINERS
-%{_prefix}/src/linux-%{version}/Makefile
%{_prefix}/src/linux-%{version}/README
%{_prefix}/src/linux-%{version}/REPORTING-BUGS
-%{_prefix}/src/linux-%{version}/Rules.make
-%{_prefix}/src/linux-%{version}/config*
%endif