%define name kernel-uml %define branch 2.6 %define minor 0 # Do we use a pre version %define ispre 1 %define prepatch test5 %define umlver 1 # the rpm-release %define rpmrel 3mdk %if %ispre %define ver %branch.%minor %define rel 0.%prepatch.%rpmrel %else %define ver %branch.%minor %define rel %rpmrel %endif %define version %ver %define release %rel %if %ispre %define kernel_source linux-%{ver}-%prepatch.tar.bz2 %define uml_patch uml-patch-%{ver}-%{prepatch}-%{umlver}.bz2 %else %define kernel_source linux-%{ver}.tar.bz2 %define uml_patch uml-patch-%{ver}-%{umlver}.bz2 %endif Summary: The user mode linux kernel Name: %{name} Version: %{version} Release: %{release} Group: Emulators Source0: %kernel_source Patch0: %uml_patch Source1: %name-config.bz2 License: GPL Url: http://user-mode-linux.sourceforge.net/ BuildRoot: %{_tmppath}/%{name}-buildroot BuildRequires: glibc-static-devel %description User-Mode Linux is a safe, secure way of running Linux versions and Linux processes. Run buggy software, experiment with new Linux kernels or distributions, and poke around in the internals of Linux, all without risking your main Linux setup. User-Mode Linux gives you a virtual machine that may have more hardware and software virtual resources than your actual, physical computer. Disk storage for the virtual machine is entirely contained inside a single file on your physical machine. You can assign your virtual machine only the hardware access you want it to have. With properly limited access, nothing you do on the virtual machine can change or damage your real computer, or its software. %package -n %name-%ver-%rel Summary: The user mode linux kernel Group: Emulators Version: 1 Release: 1mdk Provides: kernel-uml Requires: uml-utilities %description -n %name-%ver-%rel User-Mode Linux is a safe, secure way of running Linux versions and Linux processes. Run buggy software, experiment with new Linux kernels or distributions, and poke around in the internals of Linux, all without risking your main Linux setup. User-Mode Linux gives you a virtual machine that may have more hardware and software virtual resources than your actual, physical computer. Disk storage for the virtual machine is entirely contained inside a single file on your physical machine. You can assign your virtual machine only the hardware access you want it to have. With properly limited access, nothing you do on the virtual machine can change or damage your real computer, or its software. %prep %if %ispre %setup -q -n linux-%{ver}-%prepatch %else %setup -q -n linux-%{ver} %endif %patch0 -p1 bzcat %SOURCE1 > .config %build %make oldconfig ARCH=um make all ARCH=um make linux ARCH=um %install rm -rf $RPM_BUILD_ROOT mkdir -p %buildroot/%_bindir cp linux %buildroot/%_bindir/linux-%ver-%rel %post -n %name-%ver-%rel cd %_bindir [ -L linux ] && rm -f linux ln -s linux-%ver-%rel linux %postun -n %name-%ver-%rel [ -L %_bindir/linux ] && rm -f %_bindir/linux %clean rm -rf $RPM_BUILD_ROOT %files -n %name-%ver-%rel %defattr(-,root,root) %_bindir/linux-%ver-%rel %changelog * Thu Oct 09 2003 Olivier Thauvin <thauvin@aerov.jussieu.fr> 2.6.0-0.test5.3mdk - reupload * Wed Oct 08 2003 Olivier Thauvin <thauvin@aerov.jussieu.fr> 2.6.0-0.test5.2mdk - cleanup * Tue Oct 07 2003 Olivier Thauvin <thauvin@aerov.jussieu.fr> 2.6.0-0.test5.1mdk - First mdk spec