autospec/patches/autospec-1.4.6-relocate_RPM_dirs.patch
2011-04-26 21:39:44 +02:00

58 lines
2.6 KiB
Diff

diff -Nru autospec-1.4.6.orig/autospec.conf.in autospec-1.4.6/autospec.conf.in
--- autospec-1.4.6.orig/autospec.conf.in 2009-02-25 22:42:41.000000000 +0100
+++ autospec-1.4.6/autospec.conf.in 2009-04-19 14:47:37.000000000 +0200
@@ -533,8 +533,9 @@
#------------------------------------------------------------------------------
# Directories used by the rpm tool to read and save files to
-srpms_dir=`rpm --eval %_srcrpmdir 2>/dev/null`
-rpms_dir=`rpm --eval %_rpmdir 2>/dev/null`
-spec_dir=`rpm --eval %_specdir 2>/dev/null`
-source_dir=`rpm --eval %_sourcedir 2>/dev/null`
-tmppath_dir=`rpm --eval %_tmppath 2>/dev/null`
+srpms_dir="`rpm --eval %_srcrpmdir 2>/dev/null`"
+rpms_dir="`rpm --eval %_rpmdir 2>/dev/null`"
+spec_dir="`rpm --eval %_specdir 2>/dev/null`"
+source_dir="`rpm --eval %_sourcedir 2>/dev/null`"
+build_dir="`rpm --eval %_builddir 2>/dev/null`"
+tmppath_dir="`rpm --eval %_tmppath 2>/dev/null`"
diff -Nru autospec-1.4.6.orig/plugins/pck-update.in autospec-1.4.6/plugins/pck-update.in
--- autospec-1.4.6.orig/plugins/pck-update.in 2009-02-01 22:35:33.000000000 +0100
+++ autospec-1.4.6/plugins/pck-update.in 2009-04-19 14:49:05.000000000 +0200
@@ -1181,7 +1181,10 @@
$spec_dir/${SRPM_SPECFILE}.0.old
fi
- rpm -hiv $srpms_dir/$got_SPEC_FILENAME 2>&1 >/dev/null ||
+ rpm -hiv \
+ --define "%_specdir $spec_dir" \
+ --define "%_sourcedir $source_dir" \
+ $srpms_dir/$got_SPEC_FILENAME 2>&1 >/dev/null ||
notify.error $"\
an error occurred while installing \`$got_SPEC_FILENAME'"
@@ -2106,7 +2109,13 @@
$sdflag "$fullURL" "$source_dir" "$totfilenum"
done
- local rpmbuild_opts
+ local rpmbuild_opts="\
+ --define \"%_srcrpmdir $srpms_dir\" \
+ --define \"%_rpmdir $rpms_dir\" \
+ --define \"%_specdir $spec_dir\" \
+ --define \"%_sourcedir $source_dir\" \
+ --define \"%_builddir $build_dir\" \
+ --define \"%_tmppath $tmppath_dir\""
# check if we are cross-compiling
[ "$BUILD_ARCH" != "$target_cpu" ] &&
@@ -2116,7 +2125,7 @@
# note: exit with error when build requirements are missing
notify.note "${NOTE}"$"testing out specfile""${NORM}..."
- rpmbuild --nobuild $spec_dir/$SRPM_SPECFILE 2>&1 ||
+ rpmbuild --nobuild --define "%_sourcedir $source_dir" $spec_dir/$SRPM_SPECFILE 2>&1 ||
notify.error $"rpmbuild exited with error code \`$?'"
notify.debug "define_list_name = (${define_list_name[*]})"