As it seems to be rather hype currently to speaks about tools for making rpm build easier, let me share also some trivial trick i use to switch between different rpm build environment.
All actual files (.rpmrc, .rpmmacros, .rpmlintrc, .rpmprocrc) for foo environment have their name postfixed with .foo (.rpmrc.foo, .rpmmacros.foo, .rpmlintrc.foo, .rpmprocrc). The attached script use symlinks to create correct configuration. #!/bin/bash # Change current rpm profile profile=$1 if [ -z "$profile" ] ; then echo "usage: `basename $0` <profile>" exit 1 fi cd $HOME files=`ls .rpm*.$profile` if [ -z "$files" ] ; then echo "unknown profile $profile" exit 1 fi echo "switching rpm profile to $profile" for file in $files; do ln -nsf `basename $file` `basename $file .$profile` done cd $OLDPWD -- If such a program has not crashed yet, it is waiting for a critical moment before it crashes. -- Murphy's Computer Laws n°6