linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* make rpm
@ 2001-07-29  0:20 Alan Cox
  2001-07-29  0:33 ` Horst von Brand
                   ` (4 more replies)
  0 siblings, 5 replies; 12+ messages in thread
From: Alan Cox @ 2001-07-29  0:20 UTC (permalink / raw)
  To: linux-kernel

I've been meaning to do this one for a while and I now have it working so
that with my current -ac kernel working tree I can type

	make rpm

and out puts kernel-2.4.7ac3-1.i386.rpm

All this took was the pieces below.

Anyone care to knock up a "make dpkg" to go with it ?

Alan

---

#
# RPM target
#
#	If you do a make spec before packing the tarball you can rpm -ta it
#
spec:
 	. scripts/mkspec >kernel.spec

#
# 	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
        find . \( -size 0 -o -name .depend \) -type f -print | xargs rm -f
        cd $(TOPDIR)/.. ; \
        ln -s $(TOPDIR) $(KERNELPATH) ; \
        tar cvfz $(KERNELPATH).tar.gz $(KERNELPATH)/. ; \
        rpm -ta $(TOPDIR)/../$(KERNELPATH).tar.gz


--

scripts/mkspec


#!/bin/sh
#
#	Output a simple RPM spec file that uses no fancy features requring
#	RPM v4. This is intended to work with any RPM distro.
#
#	The only gothic bit here is redefining install_post to avoid 
#	stripping the symbols from files in the kernel which we want
#
echo "Name: kernel"
echo "Summary: The Linux Kernel"
echo "Version: "$VERSION.$PATCHLEVEL.$SUBLEVEL$EXTRAVERSION | sed -e "s/-//"
echo -n "Release: "
cat .version
echo "Copyright: 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 "%description"
echo "The Linux Kernel, the operating system core itself"
echo ""
echo "%prep"
echo "%setup -q"
echo ""
echo "%build"
echo "make oldconfig dep clean bzImage modules"
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 ""
echo "%clean"
echo '#echo -rf $RPM_BUILD_ROOT'
echo ""
echo "%files"
echo '%defattr (-, root, root)'
echo "%dir /lib/modules"
echo "/lib/modules/$VERSION.$PATCHLEVEL.$SUBLEVEL$EXTRAVERSION"
echo ""

^ permalink raw reply	[flat|nested] 12+ messages in thread
[parent not found: <no.id>]

end of thread, other threads:[~2001-07-30 19:35 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-07-29  0:20 make rpm Alan Cox
2001-07-29  0:33 ` Horst von Brand
2001-07-29  1:05 ` Ben Pfaff
2001-07-29  2:53   ` Mike Touloumtzis
2001-07-29  8:22 ` Kai Henningsen
2001-07-29 11:58 ` Jean Charles Delepine
2001-07-29 12:19   ` Wichert Akkerman
2001-07-29 14:49     ` Steve Kowalik
2001-07-29 15:26       ` Wichert Akkerman
2001-07-29 21:23         ` Dominik Kubla
2001-07-30 19:34 ` Andreas Dilger
     [not found] <no.id>
2001-07-29  0:38 ` Alan Cox

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).