--- linux.orig/Makefile Wed Aug 29 22:06:32 2001 +++ linux/Makefile Fri Aug 31 14:59:52 2001 @@ -308,11 +308,7 @@ $(TOPDIR)/include/linux/compile.h: include/linux/compile.h newversion: - @if [ ! -f .version ]; then \ - echo 1 > .version; \ - else \ - expr 0`cat .version` + 1 > .version; \ - fi + . scripts/mkversion > .version include/linux/compile.h: $(CONFIGURATION) include/linux/version.h newversion @echo -n \#define UTS_VERSION \"\#`cat .version` > .ver @@ -525,20 +521,23 @@ # If you do a make spec before packing the tarball you can rpm -ta it # spec: - [ -e .version ] || echo 1 > .version . scripts/mkspec >kernel.spec # -# Build a tar ball , generate an rpm from it and pack the result +# Build a tar ball, generate an rpm from it and pack the result # There arw two bits of magic here # 1) The use of /. to avoid tar packing just the symlink # 2) Removing the .dep files as they have source paths in them that # will become invalid # -rpm: clean newversion spec +rpm: clean spec 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 + tar -cvz --exclude CVS -f $(KERNELPATH).tar.gz $(KERNELPATH)/. ; \ + rm $(KERNELPATH) ; \ + cd $(TOPDIR) ; \ + . scripts/mkversion > .version ; \ + rpm -ta $(TOPDIR)/../$(KERNELPATH).tar.gz ; \ + rm $(TOPDIR)/../$(KERNELPATH).tar.gz diff -uN linux.orig/scripts/mkspec linux/scripts/mkspec --- linux.orig/scripts/mkspec Sun Aug 19 22:58:29 2001 +++ linux/scripts/mkspec Thu Aug 30 21:52:19 2001 @@ -9,8 +9,9 @@ echo "Name: kernel" echo "Summary: The Linux Kernel" echo "Version: "$VERSION.$PATCHLEVEL.$SUBLEVEL$EXTRAVERSION | sed -e "s/-//" -echo -n "Release: " -cat .version +# we need to determine the NEXT version number so that uname and +# rpm -q will agree +echo "Release: `. scripts/mkversion`" echo "License: GPL" echo "Group: System Environment/Kernel" echo "Vendor: The Linux Community" diff -uN linux.orig/scripts/mkversion linux/scripts/mkversion --- linux.orig/scripts/mkversion Wed Dec 31 18:00:00 1969 +++ linux/scripts/mkversion Wed Aug 29 20:34:55 2001 @@ -0,0 +1,6 @@ +if [ ! -f .version ] +then + echo 1 +else + expr 0`cat .version` + 1 +fi