Merged revisions 2136-2200,2202-2290,2292-2301 via svnmerge from
[scons.git] / test / packaging / rpm / tagging.py
index 198799a1dcbcfd05a046262af30ee3fc24dc6bb0..d0fce837c6b1be03487d332bc744b4bcdd4fc0b6 100644 (file)
@@ -45,6 +45,8 @@ rpm = test.Environment().WhereIs('rpm')
 if not rpm:
     test.skip_test('rpm not found, skipping test\n')
 
+rpm_build_root = test.workpath('rpm_build_root')
+
 #
 # Test adding an attr tag to the built program.
 #
@@ -61,7 +63,10 @@ test.write('SConstruct', """
 import os
 
 env = Environment(tools=['default', 'packaging'])
+
 env.Prepend(RPM = 'TAR_OPTIONS=--wildcards ')
+env.Append(RPMFLAGS = r' --buildroot %(rpm_build_root)s')
+
 install_dir= os.path.join( ARGUMENTS.get('prefix', '/'), 'bin/' )
 prog_install = env.Install( install_dir , Program( 'src/main.c' ) )
 env.Tag( prog_install, UNIX_ATTR = '(0755, root, users)' )