Sophie

Sophie

distrib > Mandriva > 8.2 > i586 > media > main-src > by-pkgid > 42fec54946f56dffe41914a0b2b90bdb > files > 6

kernel-linus2.2-2.2.20-4mdk.src.rpm

%define srcversion 2.2.20
%define kversion 2.2.20
%define oversion 2.2.15
%define release 4mdk
%define major 2.2


URL: http://www.kernel.org/
Summary: The Linux kernel without patch (the real core of the Linux operating system).
Name: kernel-linus%{major}
Version: %{kversion}
Release: %{release}
%define KVERREL %{version}-%{release}
License: GPL
Group: System/Kernel and hardware
ExclusiveArch: %{ix86} alpha sparc sparc64
ExclusiveOS: Linux
Obsoletes: kernel-modules, kernel-sparc
Provides: kernel-modules, kernel-sparc
Source0: ftp://ftp.kernel.org/pub/linux/kernel/v2.2/linux-%{srcversion}.tar.bz2
#Source19: linux_logo.h.bz2
Source20: kernel-%{version}-i586.config
Source22: kernel-%{version}-alpha.config
Source23: kernel-%{oversion}-sparc.config
Source24: kernel-%{oversion}-sparc64.config
Source25: kernel-%{version}-i586.config
Source21: rhkmvtag.c
# Make the Mandrake Logo as default logo
Patch137: linux-2.2.19-linux-mandrake-logo.patch.bz2
Patch200: 00_alpha-pci-compile-1

BuildRoot: %{_tmppath}/%{name}-buildroot
BuildRequires: egcs

%define _builddir %{_topdir}/BUILD/%name/
%define __spec_prep_pre mkdir %_builddir

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

This version of kernel is a version without any patch just the kernel
like linus out of the press.

%prep
%setup -q -n linux

%patch137 -b .badz -p1

# fix 2.2.20 alpha build
%patch200 -p1

#mv include/linux/linux_logo.h include/linux/linux_logo.h.logomdk
#bzcat %{SOURCE19} > include/linux/linux_logo.h
cp %{SOURCE21} .
make clean -C scripts/ksymoops/
find . -name "*.orig" -o -name "*~" |xargs rm -f

%build
rm -rf $RPM_BUILD_ROOT

if [ -x /usr/bin/getconf ] ; then
    NRPROC=$(/usr/bin/getconf _NPROCESSORS_ONLN)
    if [ $NRPROC -eq 0 ] ; then
		NRPROC=1
    fi
else	NRPROC=1
fi

%ifarch %{ix86}
cp %{SOURCE20} arch/%{_arch}/defconfig
%endif
%ifarch alpha
cp %{SOURCE22} arch/%{_arch}/defconfig
%endif
%ifarch sparc
cp %{SOURCE23} arch/%{_arch}/defconfig
%endif
%ifarch sparc64
cp %{SOURCE24} arch/%{_arch}/defconfig
%endif

rm -f .config
perl -p -i -e "s/^EXTRAVERSION.*/EXTRAVERSION = -%{release}linus/" Makefile

make mrproper
make oldconfig

make dep
make include/linux/version.h
%ifarch %{ix86}
%make bzImage
%else
%make boot
%endif
%make modules
find include/linux/modules -size 0 | while read file ; do echo > $file;  done
make INSTALL_MOD_PATH=%{buildroot} modules_install KERNELRELEASE=$KernelVer

%install
rm -rf %buildroot
mkdir -p $RPM_BUILD_ROOT/boot

install -m 644 System.map $RPM_BUILD_ROOT/boot/System.map-%{KVERREL}linus
%ifarch %{ix86}
cp arch/i386/boot/bzImage $RPM_BUILD_ROOT/boot/vmlinuz-%{KVERREL}linus
%else
# Only copy the raw version
cp vmlinux $RPM_BUILD_ROOT/boot/vmlinux-%{KVERREL}linus
%endif
make INSTALL_MOD_PATH=$RPM_BUILD_ROOT modules_install
%ifnarch sparc64
cc -o rhkmvtag rhkmvtag.c init/version.o
./rhkmvtag > $RPM_BUILD_ROOT/lib/modules/%{KVERREL}linus/.rhkmvtag
rm -f rhkmvtag
%endif

rm -f %buildroot/lib/modules/%{KVERREL}linus/build

cat <<EOF > README.linus
The kernel package contains the Linux kernel (vmlinuz), the core of your
Mandrake Linux operating system.  The kernel handles the basic functions
of the operating system:  memory allocation, process allocation, device
input and output, etc.

This version of kernel is a version without any patch just the kernel
like linus out of the press.
EOF

%clean
rm -rf $RPM_BUILD_ROOT

%post
cd /boot
/bin/ln -sf vmlinuz-%{KVERREL}linus vmlinuz-2.2
if [ -x /sbin/installkernel ];then
	      /sbin/installkernel -L -a -c %{KVERREL}linus
fi
depmod -q -a %{KVERREL}linus


%preun
/sbin/modprobe loop 2> /dev/null > /dev/null
/bin/rm -f /lib/modules/%{KVERREL}linus/modules.dep
exit 0

%files
%defattr(-,root,root)
%doc README.linus
%ifarch %{ix86}
/boot/vmlinuz-%{KVERREL}linus
%else
/boot/vmlinux-%{KVERREL}linus
%endif
/boot/System.map-%{KVERREL}linus
/lib/modules/%{KVERREL}linus

%changelog
* Mon Feb 11 2002 Thierry Vignaud <tvignaud@mandrakesoft.com> 2.2.20-4mdk
- build release

* Tue Dec 11 2001 Jeff Garzik <jgarzik@mandrakesoft.com> 2.2.20-3mdk
- add i686 config

* Mon Dec  3 2001 Jeff Garzik <jgarzik@mandrakesoft.com> 2.2.20-2mdk
- Patch200: fix alpha build

* Fri Nov  2 2001 Thierry Vignaud <tvignaud@mandrakesoft.com> 2.2.20-1mdk
- new version
- remove patch1 (toshiba compile fix), included
- update i586 and alpha configs
- add URL tag

* Thu Oct 18 2001 Thierry Vignaud <tvignaud@mandrakesoft.com> 2.2.19-6mdk
- rpmlint fixes

* Tue Aug 07 2001 Thierry Vignaud <tvignaud@mandrakesoft.com> 2.2.19-5mdk
- enable to build more than a kernel at a time

* Mon Jul 16 2001 Thierry Vignaud <tvignaud@mandrakesoft.com> 2.2.19-4mdk
- s!Copyright!License!
- add a README.Linus

* Sat May 05 2001 Stefan van der Eijk <stefan@eijk.nu> 2.2.19-3mdk
- updated alpha .config

* Fri Apr 13 2001 Matthias Badaire <mbadaire@mandrakesoft.com> 2.2.19-2mdk
- clean spec 

* Mon Apr  2 2001 Matthias Badaire <mbadaire@mandrakesoft.com> 2.2.19-1mdk
- update to 2.2.19

* Sun Feb 11 2001 Thierry Vignaud <tvignaud@mandrakesoft.com> 2.2.18-2mdk
- Update alpha config
- Use ix86 macro

* Thu Dec 14 2000 Thierry Vignaud <tvignaud@mandrakesoft.com> 2.2.18-1mdk
- new version
- %%prep cleaning
- add Documentation/*
- remove ownership of system directory /lib/modules

* Wed Oct 11 2000 Chmouel Boudjnah <chmouel@mandrakesoft.com> 2.2.17-2mdk
- Fix some bugs. in build process (thnks to flepied).

* Thu Sep 14 2000 Chmouel Boudjnah <chmouel@mandrakesoft.com> 2.2.17-1mdk
- 2.2.17.

* Tue Jun 13 2000 Chmouel Boudjnah <chmouel@mandrakesoft.com> 2.2.16-2mdk
- Apply errata patches.

* Fri Jun  9 2000 Chmouel Boudjnah <chmouel@mandrakesoft.com> 2.2.16-1mdk
- 2.2.16.

* Wed Jun  7 2000 Frederic Lepied <flepied@mandrakesoft.com> 2.2.15-2mdk
- added config for sparc32.

* Fri May  5 2000 Chmouel Boudjnah <chmouel@mandrakesoft.com> 2.2.15-1mdk
- 2.2.15 final.

* Fri Mar 31 2000 Chmouel Boudjnah <chmouel@mandrakesoft.com> 2.2.14-4mdk
- Adjust groups.

* Wed Jan 26 2000 Chmouel Boudjnah <chmouel@mandrakesoft.com> 2.2.14-3mdk
- don't link to default vmlinu{xz} in %post.
- Don't build rhkmvtag on sparc64.
- Sparc support.

* Thu Jan 20 2000 Chmouel Boudjnah <chmouel@mandrakesoft.com> 2.2.14-2mdk
- Make alpha compatible (next time for sparc i promise you son of sun).
- Keep linus CFLAGS when compiling the kernel of linus.

* Tue Jan  4 2000 Chmouel Boudjnah <chmouel@mandrakesoft.com> 2.2.14-1mdk
- 2.2.14.

* Tue Dec 21 1999 Chmouel Boudjnah <chmouel@mandrakesoft.com>

- Build on kernel normal.
- Only one patch to build with gcc2.95.