On Sep 1, 2009, at 12:20 AM, Mattias Ellert wrote:

mån 2009-08-31 klockan 23:07 -0700 skrev Scott Frankel:
The %build section must not create files or directories in the
$RPM_BUILD_ROOT. That must only be done in the %install section.

The Fedora packaging guidelines says that the first command in the
%install section must be "rm -rf $RPM_BUILD_ROOT". If you are using a
recent RPM version this will be enforced automatically, which is what
happens in this case.

%build

%install
rm -rf $RPM_BUILD_ROOT
mkdir $RPM_BUILD_ROOT
mkdir $RPM_BUILD_ROOT/opt
mkdir $RPM_BUILD_ROOT/opt/foo
cp -r schema $RPM_BUILD_ROOT/opt/foo

Thanks for the information!
Scott