Sophie

Sophie

distrib > Mandriva > 10.0-com > i586 > by-pkgid > 1e94d84a1665045a58825e2fcd2e275e > files > 6

kernel-tmb-2.6.4-1.tmb.8mdk-1-1mdk.src.rpm

# -*- Mode: rpm-spec -*-
#
# First: Get versions names right is complicated (tm)
# Second: kernel allways have the version & release number in the name
#         this is done to preserving a working kernel when you install 
#         a new one
# Stored in %rpmrversion & %rpmrelease
#
# We want to reflect in the kernel naming:
#   - kernel in with is based (ex. 2.6.0) 
#     this version is stored in %realversion
#   - Number of Mandrakelinux kernel based on this vanilla kernel (ex. 1mdk).
#     stored in %mdkrelease.
#    
# That gives us a nice name: 2.6.0.1mdk
# 
# As version and release are allways fixed, name of the package is 
# going to be:
#        kernel-2.6.0.1mdk-1-1mdk
#
# Confused already?
#
# Now there arrive pre/rc kernels.  This kernels have the particularity
# that they have the name of the new kernel, but they are based in the
# tar file of the old kernel, i.e. names are basically:
#  - kernel: 2.6.0
#  - patch name: 2.6.0-pre3
#    stored in %use_patch
#  - Number of Mandrakelinux kernel based in this pre kernel 2mdk
#
# That gives us a nice name again: 2.6.0.pre3.2mdk
# Problems now are:
#   - sublevel of kernel 0 (needed for tar file)
#   - sublevel of kernel is 1 (needed for prepatch and naming 
#     the package).
# This explains the need of %tar_version, because this will be different
# of %real_version if there is a pre/rc patch.
# 
# Still with me?
# 
# There are still a problem, when real 2.4.22 cames out, it will have
# a mane like: 
#              2.4.22.1mdk
# this name is (for rpm ordering of versions) smaller than:
#              2.4.22.pre3.2mdk
# to fix that we add a 0 to the name (and appear the need of realrelease)
# in the pre/rc
# 	       2.4.22.0.pre3.2mdk
#
# Take one aspirine.  Relax.
#
# Problem now is that names are just really ugly, and specially
# lilo/grub names are very difficult to read/type.
# Notice that the extra .0 is there only to make visual comparations 
# easy, but it is an annoyance.
#
# Lilo name for this kernel will be:
#       2422-0.pre3.2mdk
# And as everybody knows, putting dot's in lilo names is not nice.
# Then we change the kernel name (for loaders, and directory names only)
# to a more userfriendly:
# 		2.4.22pre3-2mdk
# That way, smp, enterprise versions continue to have the well known names
# in the loader of:
#		2422pre3-2smp
#
# For a non pre/rc kernel define (real examples in brakets)
#       2.6.X.Ymdk [2.6.0.2mdk]
# where
#	%sublvel = X 	[0]
#   	%mdkrelease = Y [2]
#	%use_patch 0	[0]
#
# For a pre/rc kernel do:
#	2.6.X.0.Y.Zmdk [2.6.3.0.pre3.2mdk]
# where
#	%sublvel = X 	[3]
#   	%mdkrelease = Z [2]
#	%use_patch Y	[pre3]
#
# I hope this is all clear now. If you have any doubt, please mail me at:
#
# Juan Quintela <quintela@mandrakesoft.com>

%define sublevel 4
%define mdkrelease 1
%define use_patch 0

# This is only to make life easier for people that creates derivated kernels
# a.k.a name it kernel-tmb :)
%define kname  kernel-tmb
%define tmbver 8

# You shouldn't have to change any kernel/patch/version number
# for 2.6 kernels

# When we are using a pre/rc patch, the tarball is a sublevel -1
%if %use_patch
%define tar_version 2.6.%(expr %{sublevel} - 1)
%define patchversion %{use_patch}q%{mdkrelease}.tmb%{tmbver}
%define realrelease 0.%{use_patch}.%{mdkrelease}.tmb.%{tmbver}mdk
%else
%define tar_version 2.6.%{sublevel}
%define patchversion q%{mdkrelease}.tmb%{tmbver}
%define realrelease %{mdkrelease}.tmb.%{tmbver}mdk
%endif

# never touch the folowing two fields
%define rpmversion 1
%define rpmrelease 1mdk
%define realversion 2.6.%{sublevel}
%define mdkversion %{realversion}-%{realrelease}
%define patches_ver 2.6.%{sublevel}-%{patchversion}

# having different top level names for packges means
# that you have to remove them by hard :(
%define top_dir_name %{kname}

%define build_dir ${RPM_BUILD_DIR}/%top_dir_name
%define src_dir %{build_dir}/linux-%tar_version
%define KVERREL %{realversion}-%{realrelease}

# this is the config that contains all the drivers for the hardware/
# things that I use (Juan Quintela).
%define build_minimal 0
%define build_acpi 1

%define build_kheaders 0
%define build_debug 0
%define build_doc 0
%define build_source 1

%define build_100 %(if [ `awk '{print $4}' /etc/mandrake-release` = 10.0 ];then echo 1; else echo 0; fi)
%define build_92 %(if [ `awk '{print $4}' /etc/mandrake-release` = 9.2 ];then echo 1; else echo 0; fi)

%define build_up 1
%ifarch alpha sparc sparc64 x86_64
%define build_smp 1
%else
%define build_smp 0
%endif

%ifarch alpha x86_64 ia64 sparc sparc64
%define build_enterprise 0
%else
%define build_enterprise 1
%endif

%ifarch alpha sparc sparc64
%define build_BOOT 1
%else
%define build_BOOT 0
%endif

%ifarch %{ix86} x86_64
%define build_secure 0
%else
%define build_secure 0
%endif

%ifarch %{ix86}
%define build_i686_up_4GB 1
%define build_p3_smp_64GB 0
%else
%define build_i686_up_4GB 0
%define build_p3_smp_64GB 0
%endif

# define arches that can support 32-bit DRM thunks
%define drm_ioctl32_arches x86_64

# Win4Lin builds
%define build_win4lin 0
%{?_with_win4lin: %global build_win4lin 1}
%if %build_win4lin
%define kname kernel-tmb-win4lin
%endif

# laptop specific builds
%define build_laptop 0
%{?_with_laptop: %global build_laptop 1}

# End of user definitions
%{?_without_up: %global build_up 0}
%{?_without_smp: %global build_smp 0}
%{?_without_secure: %global build_secure 0}
%{?_without_enterprise: %global build_enterprise 0}
%{?_without_BOOT: %global build_BOOT 0}
%{?_without_i686up4GB: %global build_i686_up_4GB 0}
%{?_without_p3smp64GB: %global build_p3_smp_64GB 0}
%{?_without_minimal: %global build_minimal 0}
%{?_without_debug: %global build_debug 0}
%{?_without_doc: %global build_doc 0}
%{?_without_source: %global build_source 0}

%{?_with_up: %global build_up 1}
%{?_with_smp: %global build_smp 1}
%{?_with_secure: %global build_secure 1}
%{?_with_enterprise: %global build_enterprise 1}
%{?_with_BOOT: %global build_BOOT 1}
%{?_with_i686up4GB: %global build_i686_up_4GB 1}
%{?_with_p3smp64GB: %global build_p3_smp_64GB 1}
%{?_with_minimal: %global build_minimal 1}
%{?_with_debug: %global build_debug 1}
%{?_with_acpi: %global build_acpi 1}
%{?_with_doc: %global build_doc 1}
%{?_with_source: %global build_source 1}

%{?_with_kheaders: %global build_kheaders 1}
%{?_with_92: %global build_92 1}
%{?_with_100: %global build_100 1}

%define build_nosrc 0
%{?_with_nosrc: %global build_nosrc 1}

%define kmake %make
# there are places where parallel make don't work
%define smake make

# Aliases for amd64 builds (better make source links?)
%define target_cpu	%(echo %{_target_cpu} | sed -e "s/amd64/x86_64/")
%define target_arch	%(echo %{_arch} | sed -e "s/amd64/x86_64/")

Summary: The Linux kernel (the core of the Linux operating system).
Name: %{kname}-%{mdkversion}
Version: %{rpmversion}
Release: %{rpmrelease}
License: GPL
Group: System/Kernel and hardware
ExclusiveArch: %{ix86} alpha ppc ppc64 x86_64 amd64 sparc sparc64
ExclusiveOS: Linux
URL: http://www.kernel.org/

####################################################################
#
# Sources
#
### This is for full SRC RPM
Source0: ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-%{tar_version}.tar.bz2
### This is for stripped SRC RPM
%if %build_nosrc
NoSource: 0
%endif
Source1: linux-%{tar_version}.tar.bz2.info

Source4: README.kernel-sources
Source5: README.Mandrakelinux

Source15: tmb-linux-mdkconfig.h
Source16: linux-merge-config.awk

Source100: linux-%{patches_ver}.tar.bz2

####################################################################
#
# Patches

#
# Patch0 to Patch100 are for core kernel upgrades.
#

# Pre linus patch: ftp://ftp.kernel.org/pub/linux/kernel/v2.6/testing

%if %use_patch
Patch1: patch-%realversion-%use_patch.bz2
%endif

# Win4Lin patches
Patch100: Kernel-Win4Lin3-2.6.4.patch.bz2
Patch101: mki-adapter26_1_3_4.patch.bz2
Patch102: Win4Lin_configs.patch.bz2

# Laptop Patches
Patch110: enable_laptop_usb.patch.bz2

#END
####################################################################

# Defines for the things that are needed for all the kernels
%define requires1 modutils >= 2.4.26-3mdk
%define requires2 mkinitrd >= 3.5.18-4mdk
%define requires3 bootloader-utils >= 1.6-7mdk
%define requires4 sysfsutils >= 0.4.0-1mdk module-init-tools >= 3.0-1mdk

%define kprovides kernel = %{realversion}, alsa

BuildRoot: %{_tmppath}/%{name}-%{realversion}-build
Provides: module-info, %kprovides
Autoreqprov: no
Requires: %requires1
Requires: %requires2
Requires: %requires3
Requires: %requires4
BuildRequires: gcc >= 3.3.2-6mdk module-init-tools >= 3.0-1mdk

%description
The kernel package contains the Linux kernel (vmlinuz), the core of your
Mandrakelinux operating system.  The kernel handles the basic functions
of the operating system:  memory allocation, process allocation, device
input and output, etc.

For instructions for update, see:
http://www.mandrakesecure.net/en/kernelupdate.php

  !! The tmb kernels is an experimental kernel based on the mdk kernels,
     with added patches. Some of them may/will never end up in the main 
     mdk kernels due to their experimental nature. Some refer to this
     kernel as a 'hackkernel' ...
     Use these kernels at your own risk !!


#
# kernel-smp: Symmetric MultiProcessing kernel
#

%package -n %{kname}-smp-%{mdkversion}
Summary: The Linux Kernel compiled for SMP machines.
Group: System/Kernel and hardware
Provides: %kprovides
Requires: %requires1
Requires: %requires2
Requires: %requires3
Requires: %requires4

%description -n %{kname}-smp-%{mdkversion}
This package includes a SMP version of the Linux %{realversion} kernel. It is
required only on machines with two or more CPUs, although it should work
fine on single-CPU boxes.

For instructions for update, see:
http://www.mandrakesecure.net/en/kernelupdate.php

  !! The tmb kernels is an experimental kernel based on the mdk kernels,
     with added patches. Some of them may/will never end up in the main 
     mdk kernels due to their experimental nature. Some refer to this
     kernel as a 'hackkernel' ...
     Use these kernels at your own risk !!


%package -n %{kname}-secure-%{mdkversion}
Summary: The Linux Kernel compiled for SECURE machines.
Group: System/Kernel and hardware
Provides: %kprovides
Requires: %requires1
Requires: %requires2
Requires: %requires3
Requires: %requires4

%description -n %{kname}-secure-%{mdkversion}
This package includes a SECURE version of the Linux %{realversion}
kernel. This package add options for kernel that make it more secure
for servers and such. See :

http://www.nsa.gov/selinux/

for list of features we have included.

For instructions for update, see:
http://www.mandrakesecure.net/en/kernelupdate.php

  !! The tmb kernels is an experimental kernel based on the mdk kernels,
     with added patches. Some of them may/will never end up in the main 
     mdk kernels due to their experimental nature. Some refer to this
     kernel as a 'hackkernel' ...
     Use these kernels at your own risk !!


#
# kernel-enterprise: Symmetric MultiProcessing kernel
#

%package -n %{kname}-enterprise-%{mdkversion}
Summary: The Linux Kernel compiled with options for Enterprise server usage.
Group: System/Kernel and hardware
Provides: %kprovides
Requires: %requires1
Requires: %requires2
Requires: %requires3
Requires: %requires4

%description -n %{kname}-enterprise-%{mdkversion}
This package includes a kernel that has appropriate configuration options
enabled for the typical large enterprise server.  This includes SMP support
for multiple processor machines, support for large memory configurations
and other appropriate items.

For instructions for update, see:
http://www.mandrakesecure.net/en/kernelupdate.php

  !! The tmb kernels is an experimental kernel based on the mdk kernels,
     with added patches. Some of them may/will never end up in the main 
     mdk kernels due to their experimental nature. Some refer to this
     kernel as a 'hackkernel' ...
     Use these kernels at your own risk !!


#
# kernel-boot: BOOT Kernel
#

%package -n %{kname}-BOOT-%{mdkversion}
Summary: The version of the Linux kernel used on installation boot disks.
Group: System/Kernel and hardware
Url: https://kenobi.mandrakesoft.com/~chmou/kernel/BOOT/

%description -n %{kname}-BOOT-%{mdkversion}
This package includes a trimmed down version of the Linux kernel.
This kernel is used on the installation boot disks only and should not
be used for an installed system, as many features in this kernel are
turned off because of the size constraints.

For instructions for update, see:
http://www.mandrakesecure.net/en/kernelupdate.php

  !! The tmb kernels is an experimental kernel based on the mdk kernels,
     with added patches. Some of them may/will never end up in the main 
     mdk kernels due to their experimental nature. Some refer to this
     kernel as a 'hackkernel' ...
     Use these kernels at your own risk !!


%package -n %{kname}-i686-up-4GB-%{mdkversion}
Summary: The Linux Kernel compiled for i686 with 4GB.
Group: System/Kernel and hardware
Provides: %kprovides
Requires: %requires1
Requires: %requires2
Requires: %requires3
Requires: %requires4

%description -n %{kname}-i686-up-4GB-%{mdkversion}
This package includes a kernel that has appropriate configuration options
enabled for the typical desktop with more than 1GB of memory.

For instructions for update, see:
http://www.mandrakesecure.net/en/kernelupdate.php

  !! The tmb kernels is an experimental kernel based on the mdk kernels,
     with added patches. Some of them may/will never end up in the main 
     mdk kernels due to their experimental nature. Some refer to this
     kernel as a 'hackkernel' ...
     Use these kernels at your own risk !!


%package -n %{kname}-p3-smp-64GB-%{mdkversion}
Summary: The Linux Kernel compiled with options for pentium III, smp and 64GB memory.
Group: System/Kernel and hardware
Provides: %kprovides
Requires: %requires1
Requires: %requires2
Requires: %requires3
Requires: %requires4

%description -n %{kname}-p3-smp-64GB-%{mdkversion}
This package includes a kernel that has appropriate configuration options
enabled for the typical large enterprise server.  This includes SMP support
for multiple processor machines, support for large memory configurations (64GB)
and support for pentium III.

For instructions for update, see:
http://www.mandrakesecure.net/en/kernelupdate.php

  !! The tmb kernels is an experimental kernel based on the mdk kernels,
     with added patches. Some of them may/will never end up in the main 
     mdk kernels due to their experimental nature. Some refer to this
     kernel as a 'hackkernel' ...
     Use these kernels at your own risk !!


%package -n %{kname}-source
Version: %{realversion}
Release: %{realrelease}
Requires: glibc-devel, ncurses-devel, make, gcc, perl
Summary: The source code for the Linux kernel.
Group: Development/Kernel
Autoreqprov: no
Provides: kernel-source

%description -n %{kname}-source
The kernel-source package contains the source code files for the Linux
kernel. These source files are needed to build most C programs, since
they depend on the constants defined in the source code. The source
files can also be used to build a custom kernel that is better tuned to
your particular hardware, if you are so inclined (and you know what you're
doing).

  !! The tmb kernels is an experimental kernel based on the mdk kernels,
     with added patches. Some of them may/will never end up in the main 
     mdk kernels due to their experimental nature. Some refer to this
     kernel as a 'hackkernel' ...
     Use these kernels at your own risk !!


#
# kernel-doc: documentation for the Linux kernel
#
%package -n %{kname}-doc
Version: %{version}
Release: %{release}
Summary: Various documentation bits found in the kernel source.
Group: Books/Computer books

%description -n %{kname}-doc
This package contains documentation files form the kernel source. Various
bits of information about the Linux kernel and the device drivers shipped
with it are documented in these files. You also might want install this
package if you need a reference to the options that can be passed to Linux
kernel modules at load time.

  !! The tmb kernels is an experimental kernel based on the mdk kernels,
     with added patches. Some of them may/will never end up in the main 
     mdk kernels due to their experimental nature. Some refer to this
     kernel as a 'hackkernel' ...
     Use these kernels at your own risk !!


#
# End packages - here begins build stage
#
%prep
%setup -q -n %top_dir_name -c

%setup -q -n %top_dir_name -D -T -a100

%define patches_dir ../%{patches_ver}/

cd %src_dir
%if %use_patch
%patch1 -p1
%endif


%{patches_dir}/scripts/apply_patches

#Keep Win4Lin patches separate from the patches tarball
%if %build_win4lin
# win4lin
%patch100 -p1
# mki_adapter
%patch101 -p1

# Adding configs for win4lin
(cd %{patches_dir}
%patch102 -p1
)
%endif

# Compile USB support in kernel
%if %build_laptop
(cd %{patches_dir}
%patch110 -p1
)
%endif

# update DRM stuf
%ifarch %{drm_ioctl32_arches}
ln -s drm.ioctl32  drivers/char/drm
%else
ln -s drm.generic drivers/char/drm
%endif

# PATCH END
#
# Setup Begin
#

# Prepare all the variables for calling create configs

%if %build_debug
%define debug --debug
%else
%define debug --no-debug
%endif

%if %build_acpi
%define acpi --acpi
%else
%define acpi --no-acpi
%endif

%if %build_minimal
%define minimal --minimal
%else
%define minimal --no-minimal
%endif

%{patches_dir}/scripts/create_configs %debug %acpi %minimal --user_cpu="%{target_cpu}"

# make sure the kernel has the sublevel we know it has...
LC_ALL=C perl -p -i -e "s/^SUBLEVEL.*/SUBLEVEL = %{sublevel}/" Makefile

# get rid of unwanted files
find . -name '*~' -o -name '*.orig' -o -name '*.append' |xargs rm -f

%if %build_kheaders

kheaders_dirs=`echo $PWD/include/{asm-*,linux,sound}`

pushd %build_dir
install -d kernel-headers/
cp -a $kheaders_dirs kernel-headers/
tar cf kernel-headers-%mdkversion.tar kernel-headers/
bzip2 -9f kernel-headers-%mdkversion.tar
rm -rf kernel-headers/
# build_kheaders
%endif


%build
# Common target directories
%define _kerneldir /usr/src/linux-%{KVERREL}
%define _bootdir /boot
%define _modulesdir /lib/modules
%define _savedheaders ../../savedheaders/

# Directories definition needed for building
%define temp_root %{build_dir}/temp-root
%define temp_source %{temp_root}%{_kerneldir}
%define temp_boot %{temp_root}%{_bootdir}
%define temp_modules %{temp_root}%{_modulesdir}

PrepareKernel() {
	name=$1
	extension=$2
	echo "Make dep for kernel $extension"
	%smake -s mrproper

	# We can't use only defconfig anyore because we have the autoconf patch,

	if [ -z "$name" ]; then
		config_name="defconfig"
	else
		config_name="defconfig-$name"
	fi
# workaround for sparc64 kernels
	if [ %{target_cpu} == "sparc64" ]; then
		cp arch/%{target_cpu}/$config_name .config
	else
		cp arch/%{target_arch}/$config_name .config
	fi

	# make sure EXTRAVERSION says what we want it to say
	LC_ALL=C perl -p -i -e "s/^EXTRAVERSION.*/EXTRAVERSION = -$extension/" Makefile
	%smake oldconfig
}

BuildKernel() {
	KernelVer=$1
	echo "Building kernel $KernelVer"

	%kmake all

	## Start installing stuff
	install -d %{temp_boot}
	install -m 644 System.map %{temp_boot}/System.map-$KernelVer
	install -m 644 .config %{temp_boot}/config-$KernelVer

	%ifarch alpha
	cp -f arch/alpha/boot/vmlinux.gz %{temp_boot}/vmlinuz-$KernelVer
	%endif
	%ifarch sparc sparc64
	cp -f vmlinux %{temp_boot}/vmlinux-$KernelVer
	%endif
	%ifarch ppc
	cp -f vmlinux %{temp_boot}/vmlinuz-$KernelVer
	cp -f arch/ppc/boot/images/zImage.chrp-rs6k %{temp_boot}/vmlinuz-rs6k-$KernelVer
	%endif
	%ifarch %{ix86}
	cp -f arch/i386/boot/bzImage %{temp_boot}/vmlinuz-$KernelVer
	%endif
	%ifarch x86_64
	cp -f arch/x86_64/boot/bzImage %{temp_boot}/vmlinuz-$KernelVer
	%endif

	# modules
	install -d %{temp_modules}/$KernelVer
	%smake INSTALL_MOD_PATH=%{temp_root} KERNELRELEASE=$KernelVer modules_install 
}

SaveHeaders() {
	flavour=$1
	flavour_name="`echo $flavour | sed 's/-/_/g'`"
%if %build_source
	HeadersRoot=%{temp_source}/savedheaders
	HeadersArch=$HeadersRoot/%{target_cpu}/$flavour
	echo "Saving hearders for $flavour %{target_cpu}"

	# deal with the kernel headers that are version specific
	install -d $HeadersArch
	install -m 644 include/linux/autoconf.h $HeadersArch/autoconf.h
	install -m 644 include/linux/version.h $HeadersArch/version.h
	if [ "$flavour" != "BOOT" ]; then
		grep -e " __crc_" -e " __ksymtab_" System.map > include/linux/symtab-$flavour
	fi
    	echo "%{target_cpu} $flavour_name %{_savedheaders}%{target_cpu}/$flavour/" >> $HeadersRoot/list
%endif
}

CreateFiles() {
	kversion=$1
	output=../kernel_files.$kversion

	echo "%defattr(-,root,root)" > $output
	echo "%{_bootdir}/config-${kversion}" >> $output
%ifarch sparc sparc64
	echo "%{_bootdir}/vmlinux-${kversion}" >> $output
%else
	echo "%{_bootdir}/vmlinuz-${kversion}" >> $output
%endif
%ifarch ppc
	echo "%{_bootdir}/vmlinuz-rs6k-${kversion}" >> $output
%endif
	echo "%{_bootdir}/System.map-${kversion}" >> $output
	echo "%dir %{_modulesdir}/${kversion}/" >> $output
	echo "%{_modulesdir}/${kversion}/kernel" >> $output
	echo "%{_modulesdir}/${kversion}/modules.*" >> $output
	echo "%doc README.kernel-sources" >> $output
	echo "%doc README.Mandrakelinux" >> $output
}

CreateKernel() {
	flavour=$1

	if [ "$flavour" = "up" ]; then
		KernelVer=%{KVERREL}
		PrepareKernel "" %realrelease
	else
		KernelVer=%{KVERREL}$flavour
		PrepareKernel $flavour %{realrelease}$flavour
	fi

	BuildKernel $KernelVer
	SaveHeaders $flavour
        CreateFiles $KernelVer
}


CreateKernelNoName() {
	arch=$1
	nprocs=$2
	memory=$3

        name=$arch-$nprocs-$memory
	extension="%realrelease-$name"

	KernelVer="%{KVERREL}-$arch-$nprocs-$memory"
	PrepareKernel $name $extension
	BuildKernel $KernelVer
	SaveHeaders $name
        CreateFiles $KernelVer
}

###
# DO it...
###

# Create a simulacro of %buildroot
rm -rf %{temp_root}
install -d %{temp_root}

#make sure we are in the directory
cd %src_dir

%if %build_BOOT
CreateKernel BOOT
%endif

%if %build_smp
CreateKernel smp
%endif

%if %build_secure
CreateKernel secure
%endif

%if %build_enterprise
CreateKernel enterprise
%endif

%if %build_i686_up_4GB
CreateKernelNoName i686 up 4GB
%endif

%if %build_p3_smp_64GB
CreateKernelNoName p3 smp 64GB
%endif

%if %build_up
CreateKernel up
%endif

# We don't make to repeat the depend code at the install phase
%if %build_source
PrepareKernel "" %{realrelease}custom
%smake -s prepare-all
%endif

###
### install
###
%install
install -m 644 %{SOURCE4}  .
install -m 644 %{SOURCE5}  .

cd %src_dir
# Directories definition needed for installing
%define target_source %{buildroot}/%{_kerneldir}
%define target_boot %{buildroot}%{_bootdir}
%define target_modules %{buildroot}%{_modulesdir}

# We want to be able to test several times the install part
rm -rf %{buildroot}
cp -a %{temp_root} %{buildroot}

# Create directories infastructure
%if %build_source
install -d %{target_source} 

tar cf - . | tar xf - -C %{target_source}
# ln -sf linux-%{KVERREL} %{buildroot}/usr/src/linux
chmod -R a+rX %{target_source}

# we remove all the source files that we don't ship

# first architecture files
for i in arm cris ia64 mips mips64 parisc s390 s390x sh sh64 arm26 h8300 m68knommu v850; do
	rm -rf %{target_source}/arch/$i
	rm -rf %{target_source}/include/asm-$i
done

%ifnarch alpha
	rm -rf %{target_source}/arch/alpha
	rm -rf %{target_source}/include/asm-alpha
%endif

%ifnarch sparc sparc64
	rm -rf %{target_source}/arch/sparc
	rm -rf %{target_source}/arch/sparc64
	rm -rf %{target_source}/include/asm-sparc
	rm -rf %{target_source}/include/asm-sparc64
%endif

# ppc needs m68k headers, but not arch
	rm -rf %{target_source}/arch/m68k
%ifnarch ppc ppc64
	rm -rf %{target_source}/arch/ppc
	rm -rf %{target_source}/arch/ppc64
	rm -rf %{target_source}/include/asm-m68k
	rm -rf %{target_source}/include/asm-ppc
	rm -rf %{target_source}/include/asm-ppc64
%endif

%ifnarch %{ix86} x86_64 amd64
	rm -rf %{target_source}/arch/i386
	rm -rf %{target_source}/arch/x86_64
	rm -rf %{target_source}/include/asm-i386
	rm -rf %{target_source}/include/asm-x86_64
%endif

# remove config split dir
rm -rf %{target_source}/include/config

# other misc files
rm -f %{target_source}/{.config.old,.config.cmd}

# We need this to prevent someone doing a make *config without mrproper
#touch %{target_source}/.need_mrproper

pushd %{target_source}/include/linux ; {
install -m 644 %{SOURCE15} rhconfig.h
rm -rf autoconf.h version.h
# Create autoconf.h file
echo '#include <linux/rhconfig.h>' > autoconf.h
sed 's,$,autoconf.h,' %{_savedheaders}list | awk -f %{SOURCE16} >> autoconf.h
# Create version.h
echo "#include <linux/rhconfig.h>" > version.h
loop_cnt=0
for i in BOOT up smp enterprise secure i686-up-4GB p3-smp-64GB; do
	if [ -d %{_savedheaders}%{target_cpu}/$i -a \
	     -f %{_savedheaders}%{target_cpu}/$i/version.h ]; then
		name=`echo $i | sed 's/-/_/g'`
		if [ $loop_cnt = 0 ]; then
      			buf="#if defined(__module__$name)"
    		else
 	     		buf="#elif defined(__module__$name)"
    		fi
		echo "$buf" >> version.h
		grep UTS_RELEASE %{_savedheaders}%{target_cpu}/$i/version.h >> version.h
		loop_cnt=$[loop_cnt + 1]
	fi
done
#write last lines
if [ $loop_cnt -eq 0 ]; then
	echo "You need to build at least one kernel"
#	exit 1;
fi
echo "#else" >> version.h
echo '#define UTS_RELEASE "'%{KVERREL}custom'"' >> version.h
echo "#endif" >> version.h

# Any of the version.h are ok, as they only differ in the first line
ls %{_savedheaders}%{target_cpu}/*/version.h | head -n 1 | xargs grep -v UTS_RELEASE >> version.h
rm -rf %{_savedheaders}
} ; popd
#endif %build_source
%endif

# We used to have a copy of PrepareKernel here
# Now, we make sure that the thing in the linux dir is what we want it to be
# Gzip module and relink the link to a .gz module

find %{target_modules} -type f -name '*.ko'|xargs gzip -9f
for i in $(find %{target_modules} -type l -name '*.ko');do
    link=$(LC_ALL=C perl -e 'print readlink shift, "\n"' $i)
    ln -s $link.gz $i.gz
    rm -f $i
done

for i in %{target_modules}/*; do
  rm -f $i/build $i/modules.*
  rm -rf  $i/pcmcia/
done

# sniff, if we gzipped all the modules, we change the stamp :(
# we really need the depmod -ae here

pushd %{target_modules}
for i in *; do
	/sbin/depmod-25 -u -ae -b %{buildroot} -r -F %{target_boot}/System.map-$i $i
	echo $?
done

for i in *; do
	pushd $i
	echo "Creating module.description for $i"
	find . -name "*.ko" -o -name "*.ko.gz" \
	|xargs -i echo 'echo -ne `basename {}`"\t\t"; echo `/sbin/modinfo-25 -d {}`' \
	> get-desc.sh
	sh get-desc.sh > modules.desc
	rm get-desc.sh
        #modules=`find . -name "*.ko" -o -name "*.ko.gz"`
        #/sbin/modinfo-25 -F 'description' $modules \
        #| perl -lne 'print "$1\t$3" if m|([^/]*)\.ko(\.gz)? "(.*)"|'  > modules.description
	popd
     done
popd


###
### clean
###

%clean
rm -rf %{buildroot}
# We don't want to remove this, the whole reason of its existence is to be 
# able to do several rpm --short-circuit -bi for testing install 
# phase without repeating compilation phase
#rm -rf %{temp_root} 

###
### scripts
###

%define options_preun -a -R -S -c
%define options_post -a -s -c -L

%preun
/sbin/installkernel %options_preun %{KVERREL}
exit 0

%post
/sbin/installkernel %options_post %{KVERREL}

%postun
/sbin/kernel_remove_initrd %{KVERREL}


%preun -n %{kname}-smp-%{mdkversion}
/sbin/installkernel %options_preun %{KVERREL}smp
exit 0

%post -n %{kname}-smp-%{mdkversion}
/sbin/installkernel %options_post %{KVERREL}smp

%postun -n %{kname}-smp-%{mdkversion}
/sbin/kernel_remove_initrd %{KVERREL}smp


%preun -n %{kname}-enterprise-%{mdkversion}
/sbin/installkernel %options_preun %{KVERREL}enterprise
exit 0

%post -n %{kname}-enterprise-%{mdkversion}
/sbin/installkernel %options_post %{KVERREL}enterprise

%postun -n %{kname}-enterprise-%{mdkversion}
/sbin/kernel_remove_initrd %{KVERREL}enterprise


%preun -n %{kname}-BOOT-%{mdkversion}
/sbin/installkernel %options_preun %{KVERREL}BOOT
exit 0

%post -n %{kname}-BOOT-%{mdkversion}
/sbin/installkernel %options_post %{KVERREL}BOOT

%postun -n %{kname}-BOOT-%{mdkversion}
/sbin/kernel_remove_initrd %{KVERREL}BOOT


%preun -n %{kname}-secure-%{mdkversion}
/sbin/installkernel %options_preun %{KVERREL}secure
exit 0

%post -n %{kname}-secure-%{mdkversion}
/sbin/installkernel %options_post %{KVERREL}secure

%postun -n %{kname}-secure-%{mdkversion}
/sbin/kernel_remove_initrd %{KVERREL}secure


%preun -n %{kname}-i686-up-4GB-%{mdkversion}
/sbin/installkernel %options_preun %{KVERREL}-i686-up-4GB
exit 0

%post -n %{kname}-i686-up-4GB-%{mdkversion}
/sbin/installkernel %options_post %{KVERREL}-i686-up-4GB

%postun -n %{kname}-i686-up-4GB-%{mdkversion}
/sbin/kernel_remove_initrd %{KVERREL}-i686-up-4GB


%preun -n %{kname}-p3-smp-64GB-%{mdkversion}
/sbin/installkernel %options_preun %{KVERREL}-p3-smp-64GB
exit 0

%post -n %{kname}-p3-smp-64GB-%{mdkversion}
/sbin/installkernel %options_post %{KVERREL}-p3-smp-64GB

%postun -n %{kname}-p3-smp-64GB-%{mdkversion}
/sbin/kernel_remove_initrd %{KVERREL}-p3-smp-64GB


%post -n %{kname}-source
cd /usr/src
rm -f linux
ln -snf linux-%{KVERREL} linux
/sbin/service kheader start 2>/dev/null >/dev/null || :
# we need to create /build only when there is a source tree.

for i in /lib/modules/%{KVERREL}*; do
	if [ -d $i ]; then
		ln -sf /usr/src/linux-%{KVERREL} $i/build
	fi
done

%postun -n %{kname}-source
if [ -L /usr/src/linux ]; then 
    if [ -L /usr/src/linux -a `ls -l /usr/src/linux 2>/dev/null| awk '{ print $11 }'` = "linux-%{KVERREL}" ]; then
	[ $1 = 0 ] && rm -f /usr/src/linux
    fi
fi
# we need to delete <modules>/build at unsinstall
for i in /lib/modules/%{KVERREL}*/build; do
	if [ -L $i ]; then
		rm -f $i
	fi
done
exit 0

###
### file lists
###

%if %build_up
%files -f kernel_files.%{KVERREL}
%endif

%if %build_smp
%files -n %{kname}-smp-%{mdkversion} -f kernel_files.%{KVERREL}smp
%endif

%if %build_enterprise
%files -n %{kname}-enterprise-%{mdkversion} -f kernel_files.%{KVERREL}enterprise
%endif

%if %build_BOOT
%files -n %{kname}-BOOT-%{mdkversion} -f kernel_files.%{KVERREL}BOOT
%endif

%if %build_secure
%files -n %{kname}-secure-%{mdkversion} -f kernel_files.%{KVERREL}secure
%endif

%if %build_i686_up_4GB
%files -n %{kname}-i686-up-4GB-%{mdkversion} -f kernel_files.%{KVERREL}-i686-up-4GB
%endif

%if %build_p3_smp_64GB
%files -n %{kname}-p3-smp-64GB-%{mdkversion} -f kernel_files.%{KVERREL}-p3-smp-64GB
%endif

%if %build_source
%files -n %{kname}-source
%defattr(-,root,root)
%dir %{_kerneldir}
%dir %{_kerneldir}/arch
%dir %{_kerneldir}/include
%{_kerneldir}/.config
%{_kerneldir}/COPYING
%{_kerneldir}/CREDITS
%{_kerneldir}/Documentation
%{_kerneldir}/MAINTAINERS
%{_kerneldir}/Makefile
%{_kerneldir}/README
%{_kerneldir}/REPORTING-BUGS
%ifarch alpha
%{_kerneldir}/arch/alpha
%endif
%ifarch %{ix86} x86_64 amd64
%{_kerneldir}/arch/i386
%endif
#%{_kerneldir}/arch/ia64
%ifarch ppc ppc64
%{_kerneldir}/arch/ppc
%{_kerneldir}/arch/ppc64
%endif
%ifarch sparc sparc64
%{_kerneldir}/arch/sparc
%{_kerneldir}/arch/sparc64
%endif
%ifarch %{ix86} x86_64 amd64
%{_kerneldir}/arch/x86_64
%endif
%{_kerneldir}/arch/um
%{_kerneldir}/crypto
%{_kerneldir}/drivers
%{_kerneldir}/fs
%{_kerneldir}/init
%{_kerneldir}/ipc
%{_kerneldir}/kdb
%{_kerneldir}/kernel
%{_kerneldir}/lib
%{_kerneldir}/mm
%{_kerneldir}/net
%{_kerneldir}/security
%{_kerneldir}/scripts
%{_kerneldir}/sound
%{_kerneldir}/usr
%{_kerneldir}/3rdparty
%{_kerneldir}/include/acpi
%{_kerneldir}/include/asm
%ifarch alpha
%{_kerneldir}/include/asm-alpha
%endif
%{_kerneldir}/include/asm-generic
%ifarch %{ix86} x86_64 amd64
%{_kerneldir}/include/asm-i386
%endif
#%{_kerneldir}/include/asm-ia64
%ifarch ppc ppc64
%{_kerneldir}/include/asm-m68k
%{_kerneldir}/include/asm-ppc
%{_kerneldir}/include/asm-ppc64
%endif
%ifarch sparc sparc64
%{_kerneldir}/include/asm-sparc
%{_kerneldir}/include/asm-sparc64
%endif
%ifarch %{ix86} x86_64 amd64
%{_kerneldir}/include/asm-x86_64
%endif
%{_kerneldir}/include/asm-um
%{_kerneldir}/include/linux
%{_kerneldir}/include/math-emu
%{_kerneldir}/include/net
%{_kerneldir}/include/pcmcia
%{_kerneldir}/include/scsi
%{_kerneldir}/include/sound
%{_kerneldir}/include/video
%{_kerneldir}/include/media
%{_kerneldir}/include/rxrpc
#%{_kerneldir}/.need_mrproper
%doc README.kernel-sources
%doc README.Mandrakelinux
#endif %build_source
%endif

%if %build_doc
%files -n %{kname}-doc
%defattr(-,root,root)
%doc linux-%{tar_version}/Documentation/*
%endif

%changelog
* Thu Jul 15 2004 Thomas Backlund <tmb@mandrake.org> 2.6.4-1.tmb.8mdk
- fix changelog versioning
- update squashfs to 2.0 Final (MC20)
  * Initrds are now supported for kernels 2.6.x.
  * amd64 bug fixes.
  * Check-data and gid bug fixes.

* Wed Jul 14 2004 Thomas Backlund <tmb@mandrake.org> 2.6.4-1.tmb.7mdk
- security and bugfix sync with main  2.6.3.15mdk
  * asus acpi fix.
  * airo fix.
  * decnet fix.
  * ia64 switch_to check.
  * chown DAC check.
  * redo VIA SATA patch, not it should work again(tm).
  * update SERIAL config to work with multiport cards.

* Mon Jun 21 2004 Thomas Backlund <tmb@mandrake.org> 2.6.4-1.tmb.6mdk
- iteraid 1.45
- squashfs 2.0
- isdn subsystem from 2.6.7
- fix zh_cn coding error in nls codepage 939 (FN10) (BugZilla #360)
- add workaround for ppp_mppe from 2.4 series
- selected sync with main 2.6.3.14mdk for security and other updates
  * netfilter patch sets.
  * remove obsolete sata via 8237 only on X86_64 for 10.0.
  * use ATA piix in combined mode for PATA devices.
  * 3c59x ATI IGP 9100 support.
  * fix cpu state (ZY68).
  * ia64 NaT consumption faults fix (ZY69).
  * e1000 ethtool gregs max length (ZY70).
  * cpufreq overflow fix (ZY66)
  * do_fork issue (ZY64)
  * fbmem issue (ZY67)
  * add quirk for arima noteboook audio chip
  * remove obsolete sata via 8237 entry from generic ide driver (nplanel)
  * acpi cardbus pci routing fix.
  * yenta irq routing fix for TI chipset.
  * oss cmpci driver update to 6.64.
  * set max symlink to 10.
  * gzloop (pixel).
  * changeloop (pixel).
  * vfat nobadchars option.
  * supermount no warning when busy.
  * sk98lin buggy vpd workaround. (bad eeprom on ASUS K8V)
  * psmouse usb quirks fix (svetljo).
  * CAN-2004-0075 vicam.
  * CAN-2004-0109 isofs rockridge fix.
  * CAN-2004-0177 ext3/jbd fix.
  * CAN-2004-0181 jfs filesystem issue (ZY62)
  * assorted libata fixes (SuSE)

* Wed Mar 24 2004 Thomas Backlund <tmb@mandrake.org> 2.6.4-1.tmb.5mdk
- fix iteraid module includes
- change descriptions to Mandrakelinux
- fix amd64 rpm building
- add the missing drm_ioctl32 fixes for amd64

* Wed Mar 24 2004 Thomas Backlund <tmb@mandrake.org> 2.6.4-1.tmb.4mdk
- add two new compile flags to src.rpm:
  * '--with win4lin' will compile the kernels with win4lin support,
    and the kernels will be named kernel-tmb-win4lin-...
  * '--with laptop' will compile the kernel with laptop-specific
    changes, currently the only change is to make USB support builtin,
    as it's currently needed for synaptics to work...
- merge x86_64 spec changes from main kernels
- use Dannys modules.description generation workaround until
  module-init-tools are updated...

* Tue Mar 23 2004 Thomas Backlund <tmb@mandrake.org> 2.6.4-1.tmb.3mdk
- fix specfile rm -rf for ppc(64) and missing 'asm-' in *x86* includes
  * thanks to Danny for reporting this
- remove orinoco 0.14alpha2 patch, it's to buggy at this stage...
- drop lirc patch MD07, as it's merged in the updated MD05
- fix ZS99 menu-cleanups patch to actually allow ppc builds (Danny)
- new ppc(64) configs (Danny)
- map sysrq to powerbutton on power and ibooks (Danny)
- acpi 20040311 (Svetljo)
- update packet writing support (Svetljo)
- support ITE it8212 RAID chip (Svetljo)

* Sun Mar 21 2004 Thomas Backlund <tmb@mandrake.org> 2.6.4-1.tmb.2mdk
- initial support for ppc64
- make smaller kernel-source package
  * initial patch by Svetljo ;-)
  * add even more rm -rf to the spec file based on arches groups
    - groups are: alpha, ix86/amd64, ppc/ppc64, sparc/sparc64
    - rebuilding for one group removes sources for the 3 others
- add newline to patch MD14
  * gets rid of 'patch unexpectedly ends in middle of line' message
- selected sync with main 2.6.3-7mdk
  * x86_64 really disable IO-APIC on NVIDIA boards (gb)
  * edd get legacy parameters.
  * ide-scsi error handling fixes.
  * tun name fix.
  * at76c503a 0.12 Beta8 with MSI6978 Wlan PC2PC support.
  * d_alloc_root, vma corruption, ramdisk memleak fixes.
  * loop setup race fix.
  * AMD 768MPX bootmem fix.
  * bootsplash 3.1.4
  * fix ipmi build
- drop CardServices Compability Layer (it's broken)
- fix ini9100u build
- fix kernel threading
- forcedeth 0.25
- orinoco 0.14alpha2
- pcmcia 2.6.5-rc2
- usb 2.6.5-rc2
- ndiswrapper 0.6
- ipw2100 v0.36
- always show kernel version in oops, as people tend to forget
  to report this crucial information
- drop patch DU02, it makes usb hang on shutdown

* Thu Mar 11 2004 Thomas Backlund <tmb@mandrake.org> 2.6.4-1.tmb.1mdk
- resync with kernel.org 2.6.4
  * dropped 103 patches merged upstream
- disable packet writing support :-(  until it's updated to 2.6.4

* Thu Mar 11 2004 Thomas Backlund <tmb@mandrake.org> 2.6.3-4.tmb.3mdk
- BadRAM support for ix86 (initial patch by Udo Rader)
  * fixed bug that disabled __free_page(page) if BadRAM is disabled
  * modified so it actually builds with tmb kernels
  * modified so that it's possible to build a kernel with it disabled
  * add BadRAM info to /proc/meminfo 
- clean 3rdparty mod_marvel tarball
- remove 3rdparty Makefile with mrproper, as it's autogenerated
- set CONFIG_8139_RXBUF_IDX=2, was set for embedded systems...  :-( 
- ndiswrapper 0.5
- Intel Pro Wireless 2100 (centrino) 0.29
- update sis190 and sis900 nics
- update pcnet32 to 1.28, fixes hangs
- updated alpha and sparc64 configs (Stefan)
- updated ppc config (Danny)
- aic79xx 20040209 (svetljo)
- acpi 2004020 (svetljo)
- add support for scsi media changers (svetljo)
- alsa 1.0.3 (svetljo)
  * update usx2y, msnd, pdplus patches
  * update to echoaudio 0.8.8rc1
  * add support for Intel8x0 and AMD768/8111 based modems
  * add support for RME Hammerfall DSP MADI soundcards
  * add support for ATI IXP 150/200/250 AC97 controller
- ieee1394 firewire rev 1181 (svetljo)
- update adaptec i2o dpt raid controllers (svetljo)
- add support for HP OmniBook (svetljo)
- update Permedia2 driver (svetljo)
- update ATI IXP IDE support (svetljo)
- fix matroxfb yres virtual (svetljo)
- add support for modular vesafb (svetljo)
- add support for tahoe 9xx serial cards (svetljo)
- add support for Berkshire Products USB-PC watchdog (svetljo)
- update video drivers: (svetljo)
  * cpia, v4l, bt832, tuner, bttv, saa7134, cx88, i2c, zoran
  * update documentation
- add saa5546a Teletext support (svetljo)
- update cifs to 1.04bk20040229 (svetljo)
- ext3 support for online resizing (svetljo)
- update hfs and add support for hfsplus (svetljo)
- update umsdos support (svetljo)
- add support for ufs2 filesystem (svetljo)
- update udf support (svetljo)
- update xfs support (svetljo)
- hostap 0.2.1 cvs 20040303 (svetljo)
- prism54 cvs 20040229 (svetljo)
- prism25 0.2.1-pre20 (svetljo)
- bcm5700 7.1.22 (svetljo)
- at76c503a 0.12Beta7 (svetljo)
- fuse 1.1 final (svetljo)
- usbvision 0.9.6 (svetljo)
- ogfs cvs20040302 (svetljo)
- Gatos ATI AIW capture driver (svetljo)
- cdfs 2.6.3 (svetljo)
- NOARP ARP filter 2.0.0 (svetljo)
- exaudio 1.58 (svetljo)
- updates and addons for device-mapper: (svetljo)
  * transparent device encryption
  * support mutipath hardware
  * snapshot, mirror, kcopycd support
  * bad block relocation support
  * evms support
  * lock fixes, bugfixes, updates...
- packet writing support (svetljo)
- add sysfs classes ppp, raw, vc (svetljo)
- add modular support to mce handler (svetljo)
- dbus over netlink socket support (svetljo)
- fix vc init race (svetljo)
- add support for Linux event logging (svetljo)
- mark mda console broken (svetljo)
- cloop 2.0.1 (svetljo)
- support IBM RAS Service processor (svetljo)
- add support for Cirrus PD6729 Compatible bridge support (svetljo)
- add support for IBM Power Linux RAID adapters (svetljo)
- add support for Swappiness Autoregulation (svetljo)
- add support for USB EPCAM Cameras (svetljo)
- acx100 0.2.0-pre7 + 20040219 updates and fixes (svetljo)
- spca5x video driver 20040228 (svetljo)
- quickcam-vc 1.0.7 (svetljo)
- fix Intel e1000 hang (svetljo)
- update dvb support: (svetljo)
  * docs, saa7134, skystar, frontends, stv0299, tda1004x, av7110, ttusb

* Sun Mar 07 2004 Thomas Backlund <tmb@mandrake.org> 2.6.3-4.tmb.2mdk
- quiet down atkbd warnings...
- require gcc 3.3.2-6mdk or newer since I build with -funit-at-a-time
- remove qla2xxx from 3rdparty as it's already in main kernel.org
  * move qla addons from 3rdparty to main scsi qla tree
- fix kdb kernel debugger (Douglas Wilkins)
  * minor -> MINOR
  * kdb belongs in kern_table, not in fs_table
- fix rmmod hang (svetljo)
- add support for mppe (svtljo)
- make quiet mode real quiet (svetljo)
- block ide-scsi for ide cdroms (svetljo)
- enable Silicon Image Serial ATA (svetljo)
- fix 3rdparty merge lost in sync with main (svetljo)

* Mon Mar 02 2004 Thomas Backlund <tmb@mandrake.org> 2.6.3-4.tmb.1mdk
- sync with main 2.6.3-4mdk
  * netfilter rtsp.
  * dcache security fix.
  * usb released wait on deregister bus.
  * usb-storage update.
  * ICH6 piix/libata support.
  * aacraid update.
  * sk98lin update.
  * mtp fusion update to 3.00.03.
  * ext3 fix access POSIX compiliant.
  * pm runtime deadlock fix.
  * sg direct io allowed as default.
  * bdclaim security oops fix.
  * blacklist Compaq ProLiant DL360 (acpi=off).
  * ipmi v30 (erwan request).
- fixed configs for alpha and sparc64 (Stefan)
-

* Tue Feb 24 2004 Thomas Backlund <tmb@mandrake.org> 2.6.3-2.tmb.1mdk
- sync with main 2.6.3-2mdk
  * bootsplash compil depend fix (chmou).
  * no more ide cdrom use ide-scsi.
  * fix libata pci quirks (remove 0x24d1).
  * parport updates.
  * enable ATM in BOOT kernel (tv request).
- a few fixes from alsa cvs
  * emu10k, ac97, cmipci

* Tue Feb 24 2004 Thomas Backlund <tmb@mandrake.org> 2.6.3-1.tmb.3mdk
- make sure scsi initio is built too
- add -funit-at-a-time back

* Sun Feb 22 2004 Thomas Backlund <tmb@mandrake.org> 2.6.3-1.tmb.2mdk
- fix bootsplash

* Sun Feb 22 2004 Thomas Backlund <tmb@mandrake.org> 2.6.3-1.tmb.1mdk
- fully synced with kernel-2.6.3.1mdk
- build i686-up-4GB kernel too
- i2c fixes
- add Asus P4B533-V to pci quirks

* Mon Feb 16 2004 Thomas Backlund <tmb@mandrake.org> 2.6.2-1.tmb.2mdk
- selected fixes from kernel-2.6.2.3mdk
  * pmpbios off by default
  * 8259 timer ack fix
  * selinux enforce node fix
  * xattr error checking fix
  * smb uid/gid permission fix
- modify alpha.config (stefan)
- disable ia64 support
- drop CP02_nforce2_disconnect_quirk
  * raises cpu temp about 6 degrees C according to acpi-devel ML :(
- drop CP03_nforce2_apic_io-edge_fix
  * does not work anymore
- redo CP05 for correct patches to mpparse on ix86 and amd64
- drop CA10_pcix-enhanced.patch
  * this is the one that breaks nforce2 systems
- drop DA20_sysfs-class-10-vc.patch
  * this still triggers the tty locking race (akpm)
- make sure kernel-source is readable by all (chmod -R a+rX)
- disable -funit-at-a-time for now, seems to break current gcc

* Sun Feb  8 2004 Thomas Backlund <tmb@mandrake.org> 2.6.2-1.tmb.1mdk
- fully synced with kernel-2.6.2.1mdk
- add 2.6.3-rc1 as a patch (so we don't change version)
  * includes alsa 1.0.2c
  * network fixes, netfilter fixes
  * sisfb updated
  * scsi fixes, aha152x fixes
  * + lots of other fixes...
- add sparc/sparc64 configs & fixes done on sparc.eijk.nu
- switch on smp and BOOT for sparc/sparc64
- add alpha configs & fixes done on alpha.eijk.nu
- switch on smp and BOOT for alpha
- modifications to lufs 0.9.7 (jaco)
  * Preserve LUFS filesystem uid/gid's if configured
  * Allow external links if configured
- usb pwc 9.0 beta1 (request by Warly)
- pci.ids 20040207tmb
- build i386 and amd64 with -funit-at-a-time if compiler supports it
- updated requirements for build / install:
  * module-init-tools >= 3.0-0.pre9.2mdk
  * modutils >= 2.4.26-3mdk
  * mkinitrd >= 3.5.18-3mdk
  * bootloader-utils >= 1.6-4mdk

* Wed Jan 28 2004 Thomas Backlund <tmb@mandrake.org> 2.6.2-0.rc2.1.tmb.2mdk
- fix pre/rc kernel versioning...
- redo DA10: alsa 1.0.2 patch
  * alsa developers reuploaded the tarball with a few fixes
    without other notice than the bugtracker :(
  * make sure we display correct alsa version: 1.0.2

* Tue Jan 27 2004 Thomas Backlund <tmb@mandrake.org> 2.6.2-0.rc2.1.tmb.1mdk
- 2.6.2-rc2
- alsa 1.0.2
- forcedeth 0.22
- squashfs 1.3r3
- pci.ids 20040125tmb
- sync with 2.6.2-0.rc1.1mdk
  * force inline memcmp when use Os (gb)
  * slim BOOT kernel.
  * ndis wrapper 0.4.
  * acpi 20031203.
  * raid6 20040107.
  * nfs/nfsd updates.

* Wed Jan 20 2004 Thomas Backlund <tmb@mandrake.org> 2.6.1-1.tmb.10mdk
- argh... me sucks... agp stuff should stay as modules

* Tue Jan 20 2004 Thomas Backlund <tmb@mandrake.org> 2.6.1-1.tmb.9mdk
- 2.6.1-bk6
- sync with -mm5
- dropped ramdisk leak patches CF03, CF04 (mm5: was wrong)
- dropped DA32_ide-siimage-stack-fix (mm5: needs to be reworked)
- dropped ppc64 fixes CB01-CB07 (merged upstream)
- dropped CF01, CF02, DA33, DA41, DF02, DF03, DN21 (merged upstream)
- dropped remove_CardServices DO01 - DO07 (merged upstream)
- dropped v4l patches DV21-DV30 (merged upstream)
- dropped ext2/3 fixes FE01-FE04, xfs FX01 (merged upstream)
- dropped BA01, BA03, BI03, FA05, FJ01, ME01, ME02 (merged upstream)
- dropped acpi CE05-CE08, kdb CK01-CK03, CM01, CM03 (merged upstream)
- dropped sysfs patches MS01-MS05, MS07-MS09 (merged upstream)
- resync DA10_alsa_1.0.1, DA22_alsa_bt87x
- resync DC01 pci.ids.tmb
- resync FA04_invalidate_inodes-speedup
- resync FA08_O_DIRECT-race-fixes-rollup
- CA02: define MAX_INIT_ARGS/ENVS 32 to support more kernel args (Jaco)
- FS01: upgrade supermount-ng to 2.0.4-2.6.1

* Mon Jan 19 2004 Thomas Backlund <tmb@mandrake.org> 2.6.1-1.tmb.8mdk
- 2.6.1-bk4
- drop patches: (merged upstream)
  * DA01-DA07, DA19, DA36-DA38, DF05
- resynced patches DV01-DV16 and moved to DV20-DV30 (v4l)
- make some more drivers modules instead of builtin...
- from -mm4:
  * update libata 0.52
  * pcmcia CardService updates
  * sysfs support
  * readd alsa sysfs
  * md blockdevice fixes
  * restore HT detection algoritm
  * ramdisk and fixes and cleanup
  * ali m1533 dma hang fix
  * change BUG to BUG_ON calls for code speedup
  * laptop mode support
  * fix msi megaraid id
  * fix keyboard scancode to keep 2.4 compability
  * fix kernel-locking doc tmplate
- scsi aic79xx 20031222 (svetljo)
- cifs 1.00 (svetljo)
- 3rdparty qc-usb 0.6.0 (svetljo)

* Tue Jan 13 2004 Thomas Backlund <tmb@mandrake.org> 2.6.1-1.tmb.7mdk
- fix changelog for 5mdk
- add initial support more arches
  * alpha, ia64, x86_64, sparc, sparc64
  * add configs for all above (based on 2.6.1 defconfigs)
  * enable them in the scripts
  * please tell me what you want changed in the configs,
    as I don't have the h/w myself...
- drop loop related patches DB21-DB27 gotten from -mm as they 
  are broken (svetljo)
- gzip modules to minimize needed space for installed kernel
- make apm support builtin, not as module

* Mon Jan 12 2004 Thomas Backlund <tmb@mandrake.org> 2.6.1-1.tmb.6mdk
- back out drm/dri 20040107cvs (seems to cause xfree hangs)
- fix changelog typos for 1mdk to 4mdk

* Sun Jan 11 2004 Thomas Backlund <tmb@mandrake.org> 2.6.1-1.tmb.5mdk
- drop pnp-fix-1, makes kernel oops with Bad EIP (svetljo)
- dont depend on udev and sysfsutils, atleast for now (svetljo)

* Sun Jan 11 2004 Thomas Backlund <tmb@mandrake.org> 2.6.1-1.tmb.4mdk
- keep BLK_DEV_MD builtin, not as a module

* Sun Jan 11 2004 Thomas Backlund <tmb@mandrake.org> 2.6.1-1.tmb.3mdk
- another quick fix... (me sux again :-()
- fix 3rdparty config... (svetljo)
- fix unpackaged files
- disable BLK_DEV_IDEPNP
- sync some more of the configs from kernel-2.6 in contribs

* Sat Jan 10 2004 Thomas Backlund <tmb@mandrake.org> 2.6.1-1.tmb.2mdk
- bugfix for broken sound, me sux :-(
- drop the alsa sysfs patch until all sysfs patches are added...

* Sat Jan 10 2004 Thomas Backlund <tmb@mandrake.org> 2.6.1-1.tmb.1mdk
- 2.6.1
- add --with nosrc option to build nosrc.rpm
- fix typo in description (jaco)
- disable CONFIG_REISERFS_CHECK
- disable IEEE1394_OUI_DB
- disable MTD_DOC2000 (wont build)
- build agp drivers as modules
- dropped a lot of patches (merged upstream):
  * CA09-CA11, CA13, CA15, CA17, CA19-CA24, CA27-CA28, CA35, CA37-CA40,
  * CA43-CA44, CB10, CC01, CI01, CM04-CM09, CS01, DA04, DA11-DA12, 
  * DA16, DA18, DA21-DA22, DB01-DB04, DB16-DB23, DF03, DI01-DI02,
  * DM01-DM02, DN01, DN05, DP01, DS01, DU01, DV13-DV14, FA01, FA03,
  * FA07, FA09, FE01-FE03, FQ01 
- dropped patches that needs verification:
  * CA08, CA12, CA14, CA33, CA36, CB11-CB12, DA15, DA20, 
  * DB05-DB06, DB08
- rediffed patches:
  * DS02, DV02
- replaced patches with newer ones:
  * DB09-DB14 replaced with DB21-DB27 (from mm1)
  * DA17 with DA37-DA38
- forcedeth 0.20
- pci.ids 20040109tmb
- supermount-ng 2.0.3a
- ieee1394 rev 1092
  * typos fixed, updated oui.db
- ext2 / ext3 fixes (from mm1)
  * inode fixes, debug fixes, next generation fixes
- libata sata_sil 0.52 updates (from mm1) 
  * support 3114, add another 3112 model (from mm1)
- add support for radeon Yd (from mm1)
- drm/dri 20040107 cvs (from mm1)
- NetGear FA311 mac byte swap address fix (from mm1)
- scsi fixes (from mm1)
  * inia100 fixes
  * qla1280 fixes
- misc fixes (from mm1)
  * rmmod race fix
  * rtc leak fix
  * vc init race fix
- nforce2 fixes for disconnect_quirk, io_apic edge (svetljo)
- alsa 1.0.1 (from mm1)
- alsa 1.0.1 addons (svetljo)
  * nforce 3 support
  * add sysfs class
  * aureal/vortex/vortex2
  * usx2y, pdplus, mixart, msnd, pdaudio, bt87x
  * echoaudio 0.8.3
- hpt374 autotune fix (svetljo)
- 3rparty drivers (svetljo)
  * bcm5700 7.1.9
  * bcm4400 3.0.7
  * qla2xxx-8.00.00b8
  * ivtv-281103cvs
  * hfsplus_20030930
  * viahss-0.92
  * ogfs
  * w9968cf-1.24
  * vt_ar5k-20030509
  * fuse-1.1_pre1
  * airo_mpi-20031220
  * svgalib_helper-1.9.18
- 3rdparty Makefile, Kconfig, misc fixes (svetljo)

* Thu Jan  1 2004 Thomas Backund <tmb@mandrake.org> 2.6.0-1.tmb.1mdk
- first kernel-tmb based on 2.6.0 final made by Nicholas
- squashfs 1.3r2
- pci.ids 2003-12-09 + my addons
- use some specfile and scripts magic from Juans 2.4.spec
- fix %postun macros
- merge changes from contrib kernel-2.6-2.6.0-1mdk
  * thanks to Oliver Blin and Oliver Thauvin for their great work
  * keep preemptive and cramfs buitin for now...
  * supermount 2.0.3

* Thu Dec 18 2003 Nicolas Planel <nplanel@mandrakesoft.com> 2.6.0-1mdk
- 2.6.0 final version ;)
- ndis wrapper 0.3.
- fix uss725.

* Wed Dec 17 2003 Nicolas Planel <nplanel@mandrakesoft.com> 2.6.0-0.5mdk
- bk13.
- acecad 1.3.
- uss725.
- bttv videodev i2c videobuf updates 20031216.
- dvb timeout fix.
- mod_marvel (Kevin O'Connor).
- matrox_fb fixes (Kevin O'Connor).
- forcedeth v19.
- kdb build fix.
- add siimage 3114 support.
- prism25 0.2.1-pre16.
- qc-usb cvs20031216.

* Fri Dec 12 2003 Nicolas Planel <nplanel@mandrakesoft.com> 2.6.0-0.4mdk
- bk8.
- add vt|ar5k wireless chipset support.
- dos partition table consistency.
- warly touch boot logo ;)
- ndis wrapper 0.2. (only for up kernel)
- alsa 1.0.0rc2.
- agpgart and mousedev as built-in.

* Thu Dec 04 2003 Nicolas Planel <nplanel@mandrakesoft.com> 2.6.0-0.3mdk
- bk1:
  * ide-scsi.c uninitialized variable
  * x86 kernel page fault error codes
  * lost wakeups problem
  * missing initialization of /proc/net/tcp seq_file
- rework merge version.h (now all kernel have UTS_RELEASE defined)
- 2.6.0-test11q2 :
  * libata update
  * pwc 8.12
  * prism54 cvs20031203
  * alsa 1.0.0rc1

* Fri Nov 28 2003 Nicolas Planel <nplanel@mandrakesoft.com> 2.6.0-0.2mdk
- re-support on the fly module building (great for properitary packages)
- 2.6.0-test11q2 :
  * lots of mm patches
  * import somes 3rdparty and patches : (svetoslav)
    * lirc
    * at76c503a
    * bcm5700
    * dfg1394
    * dxr3
    * iscsi-mod
    * lufs
    * ov511
    * prism25
    * prism54
    * qc-usb

* Mon Nov 24 2003 Nicolas Planel <nplanel@mandrakesoft.com> 2.6.0-0.1mdk
- First version to move on kernel-2.6.0. (aka: ready for a new age).
- 2.6.0-test10q1 :
  * only i386 config for the moment
  * bootsplash 3.1.3
  * mdk logo
  * forcedeth v18
  * adiusbadsl 1.0.4 (untested)
  * acx100 0.2.0pre6
  * hostap 0.1.2

# Local Variables:
# rpm-spec-insert-changelog-version-with-shell: t
# End: