Репозиторий Sisyphus
Последнее обновление: 22 ноября 2019 | Пакетов: 17516 | Посещений: 15824012
en ru br
Репозитории ALT
S:4.19.82-alt1
5.1: 2.6.30-alt14
4.1: 2.6.25-alt8.M41.5
4.0: 2.6.18-alt12.M40.3
+updates:2.6.18-alt12.M40.3
www.altlinux.org/Changes

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

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

Name: kernel-image-std-pae
Version: 2.6.18
Release: alt12.M40.3

%define kernel_base_version %version
%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 %release

%define flavour %( s='%name'; printf %%s "${s#kernel-image-}" )
%define base_flavour %( s='%flavour'; printf %%s "${s%%%%-*}" )
%define sub_flavour %( s='%flavour'; printf %%s "${s#*-}" )

# Build options

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

# Enable/disable SGML docs formatting

%def_disable docs

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


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

%define kheaders_dir %_prefix/include/linux-%kversion-%flavour
%define kbuild_dir %_prefix/src/linux-%kversion-%flavour-%krelease
%define old_kbuild_dir %_prefix/src/linux-%kversion-%flavour

Summary: The Linux kernel (the core of the Linux operating system)
License: GPL
Group: System/Kernel and hardware
Url: http://www.kernel.org/
Packager: Kernel Maintainers Team <kernel at packages.altlinux.org>

Patch0: %name-%version-%release.patch

ExclusiveArch: i586

ExclusiveOS: Linux

BuildRequires(pre): rpm-build-kernel
BuildRequires: dev86 flex
BuildRequires: libdb4-devel
BuildRequires: gcc%kgcc_version
BuildRequires: kernel-source-%kernel_base_version = %kernel_extra_version_numeric
BuildRequires: module-init-tools >= 3.1

%if_enabled docs
BuildRequires: xmlto transfig ghostscript
%endif

%if_enabled ccache
BuildRequires: ccache
%endif

%ifdef use_ccache
BuildRequires: ccache
%endif

Requires: bootloader-utils >= 0.3-alt1
Requires: module-init-tools >= 3.1
Requires: mkinitrd >= 1:2.9.9-alt1
Requires: startup >= 0.8.3-alt1

Provides: kernel = %kversion

Prereq: coreutils
Prereq: module-init-tools >= 3.1
Prereq: mkinitrd >= 1:2.9.9-alt1

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

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).

The "std" variant of kernel packages is a generic 2.6.x kernel which
should support wide range of hardware, but does not contain patches
which are useful only for some special applications (and may have
undesirable side effects in other cases).  This is the default 2.6.x
kernel variant for ALT Linux distributions.

The "std-pae" variant supports SMP systems, but should also work on
uniprocessor systems without noticeable overhead (the SMP alternatives
code automatically removes most of the SMP overhead if an uniprocessor
system is detected).

This kernel is configured for i686 (Intel Pentium Pro or higher)
processors and supports up to 64 GB physical RAM using PAE mode.
WARNING: This kernel will not boot on processors without PAE support
(this includes old Pentium-class processors and first variants of
Intel Pentium M); use the "std-smp" kernel variant on such systems.

You may also want to use the "std-smp" kernel even if your processor
supports PAE, but you have 4 GB or less physical RAM - in this case
using PAE is not required, but PAE introduces some overhead in memory
management and is incompatible with the Software Suspend support.

%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: module-init-tools >= 3.1
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
Provides: kernel-headers-%base_flavour = %version-%release

%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
adjust_kernel_headers).

Since Linux 2.6.18 the kernel build system supports creation of
sanitized kernel headers for use in userspace (by deleting headers
which are not usable in userspace and removing #ifdef __KERNEL__
blocks from installed headers).  This package contains sanitized
headers instead of raw kernel headers which were present in some
previous versions of similar packages.

If possible, try to use glibc-kernheaders instead of this package.

%package -n kernel-headers-modules-%flavour
Summary: Headers and other files needed for building kernel modules
Group: System/Kernel and hardware
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 %kbuild_dir as the kernel source
directory.

%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.

%prep
%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
%patch0 -p1

# 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

%build
export ARCH=%base_arch
KernelVer=%kversion-%flavour-%krelease

echo "Building Kernel $KernelVer"

%make_build mrproper

cp -vf config-%_target_cpu .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
%endif

%install
export ARCH=%base_arch
KernelVer=%kversion-%flavour-%krelease

install -Dp -m644 System.map %buildroot/boot/System.map-$KernelVer
install -Dp -m644 arch/%base_arch/boot/bzImage \
%buildroot/boot/vmlinuz-$KernelVer
install -Dp -m644 .config %buildroot/boot/config-$KernelVer

make modules_install INSTALL_MOD_PATH=%buildroot

install -d %buildroot%kbuild_dir
cp -a include %buildroot%kbuild_dir/include

# remove asm-* include files for other architectures

pushd %buildroot%kbuild_dir/include
for dir in asm-*; do
[ "$dir" = "asm-generic" ] && continue
[ "$dir" = "asm-%base_arch" ] && continue
rm -rf -- "$dir"
done
popd

# drivers-headers install

install -d %buildroot%kbuild_dir/drivers/scsi
install -d %buildroot%kbuild_dir/drivers/char/drm
install -d %buildroot%kbuild_dir/drivers/md
install -d %buildroot%kbuild_dir/drivers/media/dvb/dvb-core
install -d %buildroot%kbuild_dir/drivers/media/video/{bt8xx,cx88,saa7134}
install -d %buildroot%kbuild_dir/drivers/usb/core
cp -a drivers/scsi/{{scsi,hosts,scsi_typedefs}.h,scsi_module.c} \
%buildroot%kbuild_dir/drivers/scsi/
cp -a drivers/char/drm/{drm,drm_os_linux,drmP}.h \
%buildroot%kbuild_dir/drivers/char/drm/
cp -a drivers/md/dm*.h \
%buildroot%kbuild_dir/drivers/md/
cp -a drivers/media/dvb/dvb-core/*.h \
%buildroot%kbuild_dir/drivers/media/dvb/dvb-core/
cp -a drivers/media/video/btcx-risc.h \
%buildroot%kbuild_dir/drivers/media/video/
cp -a drivers/media/video/bt8xx/{bt848,bttv,bttvp}.h \
%buildroot%kbuild_dir/drivers/media/video/bt8xx/
cp -a drivers/media/video/cx88/{cx88,cx88-reg}.h \
%buildroot%kbuild_dir/drivers/media/video/cx88/
cp -a drivers/media/video/saa7134/{saa7134,saa7134-reg}.h \
%buildroot%kbuild_dir/drivers/media/video/saa7134/
cp -a drivers/usb/core/*.h \
%buildroot%kbuild_dir/drivers/usb/core/

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

KbuildFiles="
Makefile
Module.symvers
arch/%base_arch/Makefile
arch/%base_arch/Makefile.cpu

scripts/pnmtologo
scripts/mod/modpost
scripts/mkmakefile
scripts/mkversion
scripts/mod/mk_elfconfig
scripts/kconfig/conf
scripts/mkcompile_h
scripts/makelst
scripts/Makefile.modpost
scripts/Makefile.modinst
scripts/Makefile.lib
scripts/Makefile.host
scripts/Makefile.clean
scripts/Makefile.build
scripts/Makefile
scripts/Kbuild.include
scripts/kallsyms
scripts/genksyms/genksyms
scripts/basic/fixdep
scripts/extract-ikconfig
scripts/conmakehash
scripts/checkversion.pl
scripts/checkincludes.pl
scripts/checkconfig.pl
scripts/bin2c
scripts/gcc-version.sh

.config
.kernelrelease
gcc_version.inc
"
for f in $KbuildFiles; do
[ -e "$f" ] || continue
[ -x "$f" ] && mode=755 || mode=644
install -Dp -m$mode "$f" %buildroot%kbuild_dir/"$f"
done

# Fix symlinks to kernel sources in /lib/modules

rm -f %buildroot%modules_dir/{build,source}
ln -s %kbuild_dir %buildroot%modules_dir/build

# Provide kbuild directory with old name (without %%krelease)

ln -s "$(relative %kbuild_dir %old_kbuild_dir)" %buildroot%old_kbuild_dir

# Provide kernel headers for userspace

make headers_install INSTALL_HDR_PATH=%buildroot%kheaders_dir

# install documentation

%if_enabled docs
install -d %buildroot%_docdir/kernel-doc-%base_flavour-%version/
cp -a Documentation/* %buildroot%_docdir/kernel-doc-%base_flavour-%version/
find %buildroot%_docdir/kernel-doc-%base_flavour-%version/DocBook \
-maxdepth 1 -type f -not -name '*.html' -delete
%endif # if_enabled docs

%post
%post_kernel_image %kversion-%flavour-%krelease

%preun
%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

%files
/boot/vmlinuz-%kversion-%flavour-%krelease
/boot/System.map-%kversion-%flavour-%krelease
/boot/config-%kversion-%flavour-%krelease
%modules_dir
%exclude %modules_dir/build

# OSS drivers

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

%files -n kernel-modules-oss-%flavour
%modules_dir/kernel/sound/oss
%ifarch %ix86
%modules_dir/kernel/drivers/media/radio/miropcm20.ko
%modules_dir/kernel/drivers/media/radio/miropcm20-rds.ko
%endif

%files -n kernel-headers-%flavour
%kheaders_dir

%files -n kernel-headers-modules-%flavour
%kbuild_dir
%old_kbuild_dir
%dir %modules_dir
%modules_dir/build

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

%changelog

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

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