Репозиторий Sisyphus
Последнее обновление: 29 мая 2023 | Пакетов: 18431 | Посещений: 27865621
en ru br
Репозитории ALT

Группа :: Система/Ядро и оборудование
Пакет: kernel-image-wks26-up

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

# Version options
%define kernel_base_version 2.6.11
%define kernel_extra_version %nil
# Numeric extra version scheme developed by Alexander Bokovoy:
# 0.0.X -- preX
# 0.X.0 -- rcX
# 1.0.0 -- release
%define kernel_extra_version_numeric 1.0.0
%define krelease alt4

%define base_flavour wks26
%define flavour %base_flavour-up

# Build options

# You can change compiler version by editing this line:
%define kgcc_version 3.4

# Enable/disable SGML docs formatting

%def_enable docs

# Fixes:

%add_patch_list kernel-fix-build
%add_patch_list kernel-fix-core
%add_patch_list kernel-fix-acpi
%add_patch_list kernel-fix-fs
%add_patch_list kernel-fix-net
#add_patch_list kernel-fix-drivers-atm
%add_patch_list kernel-fix-drivers-block
%add_patch_list kernel-fix-drivers-char
%add_patch_list kernel-fix-drivers-net
%add_patch_list kernel-fix-drivers-usb
%add_patch_list kernel-fix-drivers-i2c
%add_patch_list kernel-fix-drivers-ide
%add_patch_list kernel-fix-drivers-ieee1394
%add_patch_list kernel-fix-drivers-input
%add_patch_list kernel-fix-drivers-md
%add_patch_list kernel-fix-drivers-media
%add_patch_list kernel-fix-drivers-pci
%add_patch_list kernel-fix-drivers-sound
#add_patch_list kernel-fix-drivers-serial
%add_patch_list kernel-fix-drivers-scsi
#add_patch_list kernel-fix-drivers-parport
%add_patch_list kernel-fix-drivers-video
%add_patch_list kernel-fix-security

# Features:

#add_patch_list kernel-feat-drivers-drm

%add_patch_list kernel-feat-drivers-video-splash
%add_patch_list kernel-feat-drivers-input
%add_patch_list kernel-feat-drivers-lirc
%add_patch_list kernel-feat-drivers-net-sk98lin
%add_patch_list kernel-feat-drivers-pktcdvd
%add_patch_list kernel-feat-fs-squashfs
%add_patch_list kernel-feat-net-ppp-mppe
%add_patch_list kernel-feat-evms-nodm

# imz: Unicode support in VT/console

#add_patch_list kernel-feat-drivers-console-unicode
# Although this patch changes the interface between the kernel and loadkeys,
# I do not put a Conflicts for the old console-tools here,
# because the old loadkeys works fine the new kernel interface.

%add_patch_list kernel-feat-fs-squashfs
%add_patch_list kernel-feat-fs-reiser4
#add_patch_list kernel-feat-fs-supermount-ng
%add_patch_list kernel-feat-fs-tmpfs-lookup-traps
#add_patch_list kernel-feat-core-win4lin
%add_patch_list kernel-feat-core-lowlatency
%add_patch_list kernel-feat-core-realtime
%add_patch_list kernel-feat-swsusp
%add_patch_list kernel-feat-core-badmem

## Don't edit below this line ##################################

%define kversion %kernel_base_version%kernel_extra_version
%define modules_dir /lib/modules/%kversion-%flavour-%krelease

Name: kernel-image-%flavour
Version: %kversion
Release: %krelease

Summary: The Linux kernel (the core of the Linux operating system)
License: GPL
Group: System/Kernel and hardware
Url: http://www.kernel.org/
Packager: Konstantin A. Lepikhov <lakostis at altlinux.ru>

Source1: config-%kernel_base_version-%flavour

ExclusiveOS: Linux

BuildRequires: dev86 flex
BuildRequires: libdb4-devel
BuildRequires: gcc%kgcc_version
BuildRequires: kernel-source-%{kernel_base_version} = %{kernel_extra_version_numeric}
BuildRequires: kernel-build-tools >= 0.7, modutils >= 2.4.27-alt1
BuildRequires: %get_patch_list

%if_enabled docs
BuildRequires: docbook-utils transfig ghostscript

%if_enabled ccache
BuildRequires: ccache

%ifdef use_ccache
BuildRequires: ccache

Requires: bootloader-utils >= 0.3-alt1
Requires: modutils >= 2.4.27-alt1
Requires: mkinitrd >= 1:2.9.2-alt1
Requires: startup >= 0.8.3-alt1

Provides: kernel = %kversion

Prereq: coreutils
Prereq: modutils >= 2.4.27
Prereq: mkinitrd >= 1:2.9.2-alt1
ExclusiveArch: %ix86

This package contains the Linux kernel that is used to boot and run
your system.

The "wks26" variant of kernel packages is a generic 2.6.x kernel which
should support most of desktop hardware and contain patches which reduce kernel
latency and improve i/o perfomance. Also it contains swsusp2 patches for support
ACPI sleep states. Please note: "wks26" updates only due functional uncrease
and kernel version change. Use "std26" variant if you want secure kernel or
intend use 2.6 on servers!

Most hardware drivers for this kernel are built as modules.  Some of
these drivers are built separately from the kernel; they are available
in separate packages (kernel-modules-*-%flavour).

Patches included:%format_patch_list

%package -n kernel-modules-oss-%flavour
Summary: OSS sound driver modules (obsolete)
Group: System/Kernel and hardware
Provides:  kernel-modules-oss-%kversion-%flavour-%krelease = %version-%release
Conflicts: kernel-modules-oss-%kversion-%flavour-%krelease < %version-%release
Conflicts: kernel-modules-oss-%kversion-%flavour-%krelease > %version-%release
Prereq: coreutils
Prereq: modutils
Prereq: %name = %version-%release
Requires(postun): %name = %version-%release

%description -n kernel-modules-oss-%flavour
This package contains OSS sound driver modules for the Linux kernel
package %name-%version-%release.

These drivers are declared obsolete by the kernel maintainers; ALSA
drivers should be used instead.  However, the older OSS drivers may be
still useful for some hardware, if the corresponding ALSA drivers do
not work well.

Install this package only if you really need it.

%package -n kernel-headers-%flavour
Summary: Header files for the Linux kernel
Group: System/Kernel and hardware
Requires: kernel-headers-common >= 1.1.5
Provides: kernel-headers = %version

%description -n kernel-headers-%flavour
This package makes Linux kernel headers corresponding to the Linux
kernel package %name-%version-%release available for building
userspace programs (if this version of headers is selected by

Note that such usage of kernel headers in userspace is not supported
by the upstream kernel maintainers and often breaks compilation.
Therefore installing and using this package is not recommended.

%package -n kernel-headers-modules-%flavour
Summary: Headers and other files needed for building kernel modules
Group: System/Kernel and hardware
Requires: kernel-headers-%flavour = %version-%release
Requires: gcc%kgcc_version

%description -n kernel-headers-modules-%flavour
This package contains header files, Makefiles and other parts of the
Linux kernel build system which are needed to build kernel modules for
the Linux kernel package %name-%version-%release.

If you need to compile a third-party kernel module for the Linux
kernel package %name-%version-%release, install this package
and specify %_prefix/src/linux-%version-%flavour as the kernel source

%package -n kernel-doc-%base_flavour
Summary: Linux kernel %kversion-%base_flavour documentation
Group: System/Kernel and hardware

%description -n kernel-doc-%base_flavour
This package contains documentation files for ALT Linux kernel packages:
* kernel-image-%base_flavour-up-%kversion-%krelease
* kernel-image-%base_flavour-smp-%kversion-%krelease

The documentation files contained in this package may be different
from the similar files in upstream kernel distributions, because some
patches applied to the corresponding kernel packages may change things
in the kernel and update the documentation to reflect these changes.

%setup -cT -n kernel-image-%flavour-%kversion-%krelease
%__rm -rf kernel-source-%kernel_base_version
%__tar -jxf %kernel_src/kernel-source-%kernel_base_version.tar.bz2
%setup -D -T -n kernel-image-%flavour-%kversion-%krelease/kernel-source-%kernel_base_version

echo "patches = %_patch_list"

%apply_patches 2.6

# this file should be usable both with make and sh (for broken modules

# which do not use the kernel makefile system)
echo 'export GCC_VERSION=%kgcc_version' > gcc_version.inc

%__subst 's/EXTRAVERSION[[:space:]]*=.*/EXTRAVERSION = %kernel_extra_version-%flavour-%krelease/g' Makefile
%__subst 's/CC.*$(CROSS_COMPILE)gcc/CC         := $(shell echo $${GCC_USE_CCACHE:+ccache}) gcc-%kgcc_version/g' Makefile

# get rid of unwanted files resulting from patch fuzz

find . -name "*.orig" -delete -or -name "*~" -delete


echo "Building Kernel $KernelVer"

%make_build mrproper

%__cp -vf %SOURCE1 .config

%make_build oldconfig
%make_build include/linux/version.h
%make_build bzImage
%make_build modules

echo "Kernel built $KernelVer"

%if_enabled docs
# psdocs, pdfdocs don't work yet
%make_build htmldocs


%__install -Dp -m644 System.map %buildroot/boot/System.map-$KernelVer
%__install -Dp -m644 arch/i386/boot/bzImage %buildroot/boot/vmlinuz-$KernelVer
%__install -Dp -m644 .config %buildroot/boot/config-$KernelVer

%__make modules_install INSTALL_MOD_PATH=%buildroot

%__install -d %buildroot%_prefix/include/linux-%version-%flavour/include

pushd include
%__cp -a . %buildroot%_prefix/include/linux-%version-%flavour/include

# remove asm-* include files for other architectures

pushd %buildroot%prefix/include/linux-%version-%flavour/include
for dir in asm-*; do
[ "$dir" = "asm-generic" ] && continue
[ "$dir" = "asm-%base_arch" ] && continue
%__rm -rf -- "$dir"

# drivers-headers install

%__install -d %buildroot%_prefix/src/linux-%version-%flavour/drivers/scsi
%__install -d %buildroot%_prefix/src/linux-%version-%flavour/drivers/net/wireless
%__install -d %buildroot%_prefix/src/linux-%version-%flavour/drivers/char/drm
%__cp -a drivers/scsi/{{scsi,hosts,scsi_obsolete,scsi_typedefs}.h,scsi_module.c} \
%__cp -a drivers/net/wireless/ieee802_11.h \
%__cp -a drivers/char/drm/{drm,drm_os_linux,drmP}.h \

%__install -d %buildroot%_prefix/src/linux-%version-%flavour
pushd %buildroot%_prefix/src/linux-%version-%flavour
%__ln_s -f ../../include/linux-%version-%flavour/include ./include

# Install files required for building external modules (in addition to headers)



for f in $KbuildFiles; do
[ -x "$f" ] && mode=755 || mode=644
%__install -Dp -m$mode "$f" \

%__rm -f %buildroot%modules_dir/{build,source}
%__ln_s %_prefix/src/linux-%version-%flavour %buildroot%modules_dir/build

# install documentation

%if_enabled docs
%__install -d %buildroot%_docdir/kernel-doc-%base_flavour-%version/
%__cp -a Documentation/* %buildroot%_docdir/kernel-doc-%base_flavour-%version/
%__install -d %buildroot%_docdir/kernel-doc-%base_flavour-%version/scsi/
for dir in aacraid; do
%__install -d \
%__cp -a drivers/scsi/$dir/README* \
find %buildroot%_docdir/kernel-doc-%base_flavour-%version/DocBook \
-maxdepth 1 -type f -not -name '*.html' -delete
%endif # if_enabled docs

%post_kernel_image %kversion-%flavour-%krelease

%preun_kernel_image %kversion-%flavour-%krelease

%post -n kernel-modules-oss-%flavour
%post_kernel_modules %kversion-%flavour-%krelease

%postun -n kernel-modules-oss-%flavour
%postun_kernel_modules %kversion-%flavour-%krelease

%post -n kernel-headers-%flavour
%post_kernel_headers %kversion-%flavour-%krelease

%postun -n kernel-headers-%flavour
%postun_kernel_headers %kversion-%flavour-%krelease

%exclude %modules_dir/build

# OSS drivers

%exclude %modules_dir/kernel/sound/oss
%exclude %modules_dir/kernel/drivers/media/radio/miropcm20.ko
%exclude %modules_dir/kernel/drivers/media/radio/miropcm20-rds.ko

%files -n kernel-modules-oss-%flavour

%files -n kernel-headers-%flavour

%files -n kernel-headers-modules-%flavour

%if_enabled docs
%files -n kernel-doc-%base_flavour
%doc %_docdir/kernel-doc-%base_flavour-%version


Полный changelog можно просмотреть здесь

дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin