SPECS: builder - don't pollute specdir with builder macros
baggins
baggins at pld-linux.org
Sun May 13 17:49:35 CEST 2007
Author: baggins Date: Sun May 13 15:49:35 2007 GMT
Module: SPECS Tag: HEAD
---- Log message:
- don't pollute specdir with builder macros
---- Files affected:
SPECS:
builder (1.505 -> 1.506)
---- Diffs:
================================================================
Index: SPECS/builder
diff -u SPECS/builder:1.505 SPECS/builder:1.506
--- SPECS/builder:1.505 Sun May 13 17:27:48 2007
+++ SPECS/builder Sun May 13 17:49:29 2007
@@ -131,8 +131,10 @@
SU_SUDO=""
if [ -n "$HOME_ETC" ]; then
USER_CFG="$HOME_ETC/.builderrc"
+ BUILDER_MACROS="$HOME_ETC/.builder-rpmmacros"
else
USER_CFG=~/.builderrc
+ BUILDER_MACROS=~/.builder-rpmmacros
fi
[ -f "$USER_CFG" ] && . "$USER_CFG"
@@ -384,7 +386,7 @@
safe_macrofiles=$(rpm --showrc | awk -F: '/^macrofiles/ { gsub(/^macrofiles[ \t]+:/, "", $0); gsub(/:.*macros.build:/, ":", $0); print $0 } ')
# TODO: move these to /usr/lib/rpm/macros
- cat > .builder-rpmmacros <<'EOF'
+ cat > $BUILDER_MACROS <<'EOF'
%x8664 x86_64 amd64 ia32e
%alt_kernel %{nil}
%_alt_kernel %{nil}
@@ -424,12 +426,12 @@
%{nil}
EOF
if [ "$NOINIT" = "yes" ] ; then
- cat >> .builder-rpmmacros <<'EOF'
+ cat >> $BUILDER_MACROS <<'EOF'
%_specdir ./
%_sourcedir ./
EOF
fi
- eval $RPMBUILD --macros "$safe_macrofiles:.builder-rpmmacros" $QUIET $RPMOPTS $RPMBUILDOPTS $BCOND $TARGET_SWITCH $* 2>&1
+ eval $RPMBUILD --macros "$safe_macrofiles:$BUILDER_MACROS" $QUIET $RPMOPTS $RPMBUILDOPTS $BCOND $TARGET_SWITCH $* 2>&1
}
cache_rpm_dump() {
================================================================
---- CVS-web:
http://cvs.pld-linux.org/SPECS/builder?r1=1.505&r2=1.506&f=u
More information about the pld-cvs-commit
mailing list