Changeset 1033 for rpmbuild-bot


Ignore:
Timestamp:
Feb 24, 2017, 11:50:35 PM (8 years ago)
Author:
dmik
Message:

rpmbuild-bot: Add RPMBUILD_BOT_SPEC_DIR variable.

This variable may be used in rpmbuild-bot-local.sh to override
%_specdir (which defaults to $HOME/rpmbuild/SPECS).

Location:
rpmbuild-bot
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • rpmbuild-bot/rpmbuild-bot-local.sh

    r889 r1033  
    1818#
    1919
     20# Local directory to look for .spec files w/o path.
     21# This is normall an SVN repository where .spec files will be committed
     22# by the upload command.
     23RPMBUILD_BOT_SPEC_DIR="D:/Coding/rpm/spec/SPECS"
     24
    2025# Local netdrive directory that maps to rpm.netlabs.org over WEBDAV.
    2126RPM_NETLABS_ORG_DIR="Y:/webdav/rpm.netlabs.org"
  • rpmbuild-bot/rpmbuild-bot.sh

    r1032 r1033  
    888888esac
    889889
     890# Set up the rpmbuild-bot environment.
     891. "${0%%.sh}-env.sh"
     892
     893# Check common env settings.
     894test -n "$RPMBUILD_BOT_ARCH_LIST" || die "RPMBUILD_BOT_ARCH_LIST is empty."
     895
    890896# Query all rpmbuild macros in a single run as it may be slow.
    891897eval `rpmbuild.exe --eval='rpmbuild_dir="%_topdir" ; spec_dir="%_specdir" ; src_dir="%_sourcedir" ; dist_mark="%dist"' | tr '\\\' /`
     
    894900[ -n "$spec_dir" -a -d "$spec_dir" ] || die "Falied to get %_specdir from rpmbuild or not directory ($spec_dir)."
    895901[ -n "$src_dir" -a -d "$src_dir" ] || die "Falied to get %_sourcedir from rpmbuild or not directory ($src_dir)."
     902[ -n "$dist_mark" -a -d "$src_dir" ] || die "Falied to get %dist from rpmbuild, build command wouldn't differ from test."
     903
     904# RPMBUILD_BOT_SPEC_DIR overrides %_specdir
     905if [ -n "$RPMBUILD_BOT_SPEC_DIR" ] ; then
     906  [ -d "$RPMBUILD_BOT_SPEC_DIR" ] || die "RPMBUILD_BOT_SPEC_DIR is not directory ($RPMBUILD_BOT_SPEC_DIR)."
     907  spec_dir="$RPMBUILD_BOT_SPEC_DIR"
     908fi
    896909
    897910log_dir="$rpmbuild_dir/logs"
     
    929942echo "Command:   $command $options"
    930943
    931 # Set up the rpmbuild-bot environment.
    932 . "${0%%.sh}-env.sh"
    933 
    934 # Check common settings.
    935 test -n "$RPMBUILD_BOT_ARCH_LIST" || die "RPMBUILD_BOT_ARCH_LIST is empty."
    936 
    937944run eval "${command_name}_cmd"
    938945
Note: See TracChangeset for help on using the changeset viewer.