Re: make rpm

From: Andreas Dilger (
Date: Mon Jul 30 2001 - 14:34:28 EST

Alan writes:
> scripts/mkspec

Probably clearer to make it a "here" document (untested). EXTRASHORT could
have been left inline (inside ``), but it is a bit clearer this way, I think.

# 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
EXTRASHORT=`echo $EXTRAVERSION | sed -e "s/-//"`

cat - << EOT
Name: kernel
Summary: The Linux Kernel
Release: `cat .version`
Copyright: GPL
Group: System Environment/Kernel
Vendor: The Linux Community
BuildRoot: /var/tmp/%{name}-%{PACKAGE_VERSION}-root
%define __spec_install_post /usr/lib/rpm/brp-compress || :

The Linux Kernel, the operating system core itself

%setup -q

make oldconfig dep clean bzImage modules

mkdir -p $RPM_BUILD_ROOT/boot $RPM_BUILD_ROOT/lib $RPM_BUILD_ROOT/lib/modules
INSTALL_MOD_PATH=$RPM_BUILD_ROOT make modules_install

#echo -rf $RPM_BUILD_ROOT

%defattr (-, root, root)
%dir /lib/modules


Andreas Dilger  \ "If a man ate a pound of pasta and a pound of antipasto,
                 \  would they cancel out, leaving him still hungry?"               -- Dogbert

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to More majordomo info at Please read the FAQ at

This archive was generated by hypermail 2b29 : Tue Jul 31 2001 - 21:00:45 EST