scripts: use %_tmppath in "make rpm-pkg"
authorJohn Saalwaechter <saalwaechter@gmail.com>
Mon, 1 Feb 2010 00:18:58 +0000 (16:18 -0800)
committerMichal Marek <mmarek@suse.cz>
Tue, 2 Feb 2010 13:33:56 +0000 (14:33 +0100)
The mkspec script hardcodes "/var/tmp" into the generated rpm spec file's
BuildRoot. The user, however, may have a custom setting for %_tmppath,
which should be used in BuildRoot.  This patch changes mkspec's
BuildRoot output to appropriately use %_tmppath.

Signed-off-by: John Saalwaechter <saalwaechter@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
scripts/package/mkspec

index 47bdd2f99b780dad38d946bbbfde5685d630d7b8..16ae0dd746e19fee0440a55ea53f92b577cf69dc 100755 (executable)
@@ -39,7 +39,7 @@ if ! $PREBUILT; then
 echo "Source: kernel-$__KERNELRELEASE.tar.gz"
 fi
 
-echo "BuildRoot: /var/tmp/%{name}-%{PACKAGE_VERSION}-root"
+echo "BuildRoot: %{_tmppath}/%{name}-%{PACKAGE_VERSION}-root"
 echo "Provides: $PROVIDES"
 echo "%define __spec_install_post /usr/lib/rpm/brp-compress || :"
 echo "%define debug_package %{nil}"