# Enable/disable distro wide bconds based on ~/.distbcond
process_distbcond "$specdir/$SPECFILE"
# Add %tld macro to release to allow release control
- sed -i -r -e 's/^Release:\s+(.*)$/Release:\t\1%{?tld}/' $specdir/$SPECFILE
+ sed -i -r -e '/^Release:/s/%\{\?tld\}//g; s/^Release:\s+(.*)$/Release:\t\1%{?tld}/;' $specdir/$SPECFILE
# FIXME: eval here is exactly why?
PATH=$CLEAN_PATH eval teeboth "'$logfile'" ${TIME_COMMAND} ${NICE_COMMAND} $RPMBUILD $TARGET_SWITCH $BUILD_SWITCH -v $QUIET $CLEAN $RPMOPTS $RPMBUILDOPTS $BCOND --define \'_specdir $PACKAGE_DIR\' --define \'_sourcedir $PACKAGE_DIR\' $specdir/$SPECFILE
retval=$?