--- linux/Makefile.orig Sat Aug 18 17:09:23 2001 +++ linux/Makefile Sat Aug 18 18:24:39 2001 @@ -5,8 +5,6 @@ KERNELRELEASE=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION) -KERNELPATH=kernel-$(shell echo $(KERNELRELEASE) | sed -e "s/-//") - # SUBARCH tells the usermode build what the underlying arch is. That is set # first, and if a usermode build is happening, the "ARCH=um" on the command # line overrides the setting of ARCH below. If a native build is happening, @@ -539,6 +537,7 @@ find . \( -size 0 -o -name .depend -o -name .hdepend \) -type f -print | xargs rm -f set -e; \ cd $(TOPDIR)/.. ; \ - ln -sf $(TOPDIR) $(KERNELPATH) ; \ - tar cvfz $(KERNELPATH).tar.gz $(KERNELPATH)/. ; \ - rpm -ta $(TOPDIR)/../$(KERNELPATH).tar.gz + ln -sf $(TOPDIR) kernel-$(KERNELRELEASE) ; \ + tar cfz kernel-$(KERNELRELEASE).tar.gz kernel-$(KERNELRELEASE)/. + set -e; \ + rpm -tb $(TOPDIR)/../kernel-$(KERNELRELEASE).tar.gz --- linux/scripts/mkspec.orig Sat Aug 18 17:09:18 2001 +++ linux/scripts/mkspec Sun Aug 19 08:21:15 2001 @@ -6,41 +6,62 @@ # The only gothic bit here is redefining install_post to avoid # stripping the symbols from files in the kernel which we want # +# TODO: +# + Add -smp to packagename if SMP +# + Make it non i386-specific +# +echo "%define __spec_install_post /usr/lib/rpm/brp-compress || :" +echo -n "%define arch " +echo $CFLAGS | sed "s/^.*[:space:]\?-march=\(.*\)[:space:]\?.*$/\1/" +echo echo "Name: kernel" echo "Summary: The Linux Kernel" -echo "Version: "$VERSION.$PATCHLEVEL.$SUBLEVEL$EXTRAVERSION | sed -e "s/-//" +echo "Version: "$VERSION.$PATCHLEVEL.$SUBLEVEL$EXTRAVERSION | sed -e "s/-/_/" echo -n "Release: " cat .version echo "License: GPL" echo "Group: System Environment/Kernel" echo "Vendor: The Linux Community" -echo "URL: http://www.kernel.org" -echo -n "Source: kernel-$VERSION.$PATCHLEVEL.$SUBLEVEL" -echo "$EXTRAVERSION.tar.gz" | sed -e "s/-//" -echo "BuildRoot: /var/tmp/%{name}-%{PACKAGE_VERSION}-root" -echo "%define __spec_install_post /usr/lib/rpm/brp-compress || :" -echo "" +echo "URL: http://www.kernel.org/" +echo "Source: kernel-$VERSION.$PATCHLEVEL.$SUBLEVEL$EXTRAVERSION.tar.gz" +echo "BuildRoot: %{_tmppath}/%{name}-%{version}" +echo "BuildArch: %{arch}" +echo "Requires: binutils" +echo echo "%description" echo "The Linux Kernel, the operating system core itself" -echo "" +echo +echo "%package doc" +echo "Summary: The Linux Kernel documentation" +echo "Group: Documentation" +echo "BuildArch: noarch" +echo +echo "%description doc" +echo "The Linux Kernel documentation." +echo echo "%prep" -echo "%setup -q" -echo "" +echo "%setup -q -n kernel-$VERSION.$PATCHLEVEL.$SUBLEVEL$EXTRAVERSION" +echo echo "%build" echo "make oldconfig dep clean bzImage modules" -echo "" +echo echo "%install" -echo 'mkdir -p $RPM_BUILD_ROOT/boot $RPM_BUILD_ROOT/lib $RPM_BUILD_ROOT/lib/modules' -echo 'INSTALL_MOD_PATH=$RPM_BUILD_ROOT make modules_install' -echo 'cp arch/i386/boot/bzImage $RPM_BUILD_ROOT'"/boot/vmlinuz-$VERSION.$PATCHLEVEL.$SUBLEVEL$EXTRAVERSION" -echo 'cp System.map $RPM_BUILD_ROOT'"/boot/System.map-$VERSION.$PATCHLEVEL.$SUBLEVEL$EXTRAVERSION" -echo "" +echo "rm -rf %{buildroot}" +echo "mkdir -p %{buildroot}/boot %{buildroot}/lib/modules" +echo "INSTALL_MOD_PATH=%{buildroot} make modules_install" +echo "cp arch/$ARCH/boot/bzImage %{buildroot}/boot/kernel-$VERSION.$PATCHLEVEL.$SUBLEVEL$EXTRAVERSION-%{release}" +echo "cp System.map %{buildroot}/boot/System.map-$VERSION.$PATCHLEVEL.$SUBLEVEL$EXTRAVERSION-%{release}" +echo "cp .config %{buildroot}/boot/config-$VERSION.$PATCHLEVEL.$SUBLEVEL$EXTRAVERSION-%{release}" +echo echo "%clean" -echo '#echo -rf $RPM_BUILD_ROOT' -echo "" +echo "rm -rf %{buildroot}" +echo echo "%files" -echo '%defattr (-, root, root)' +echo "%defattr (-, root, root)" +echo "%doc COPYING CREDITS MAINTAINERS README REPORTING-BUGS" echo "%dir /lib/modules" echo "/lib/modules/$VERSION.$PATCHLEVEL.$SUBLEVEL$EXTRAVERSION" echo "/boot/*" -echo "" +echo +echo "%files doc" +echo "%doc Documentation/*/*/*"