Commit b8520a79 authored by Vitaly Lipatov's avatar Vitaly Lipatov

introduce prepare_rpmdir, use in for create RPMDIR

parent efee2d2f
...@@ -72,10 +72,7 @@ LISTRPMARGS=$@ ...@@ -72,10 +72,7 @@ LISTRPMARGS=$@
parse_cmd_pre_spec "$@" parse_cmd_pre_spec "$@"
mygetopts $LISTARGS mygetopts $LISTARGS
prepare_rpmdir
mkdir -p "$LOGDIR"
mkdir -p "$RPMTOPDIR/RPMS"
test -L "$RPMTOPDIR/tmp" || ln -s $RPMTMPDIR $RPMTOPDIR/tmp
test -z "$LISTNAMES" && fatal "Please run with spec(s) name" test -z "$LISTNAMES" && fatal "Please run with spec(s) name"
test -n "$LISTRPMARGS" && echog "Run $RPMBUILD with options: '$LISTRPMARGS'" test -n "$LISTRPMARGS" && echog "Run $RPMBUILD with options: '$LISTRPMARGS'"
......
...@@ -218,7 +218,10 @@ if [ "$PKGVENDOR" != "alt" ] ; then ...@@ -218,7 +218,10 @@ if [ "$PKGVENDOR" != "alt" ] ; then
# Due possible using %release in Source: and Patch: names # Due possible using %release in Source: and Patch: names
subst "s|^\(Source.*\)%release|\1$RELEASE|g" $SPECNAME subst "s|^\(Source.*\)%release|\1$RELEASE|g" $SPECNAME
subst "s|^\(Patch.*\)%release|\1$RELEASE|g" $SPECNAME subst "s|^\(Patch.*\)%release|\1$RELEASE|g" $SPECNAME
subst "s|^%setup|%setup -q|g" $SPECNAME subst "s|^%setup|%setup -q|g" $SPECNAME
# obsoletes since Slackware/13 (rpm 4.10)
subst "s|^BuildPreReq:|BuildRequires:|g" $SPECNAME
fi fi
# Auto*=yes,nomingw32 works only since ALT 4.1 # Auto*=yes,nomingw32 works only since ALT 4.1
......
...@@ -194,6 +194,8 @@ parse_cmd_pre_spec "$@" ...@@ -194,6 +194,8 @@ parse_cmd_pre_spec "$@"
# quotes brokes option handling # quotes brokes option handling
mygetopts $LISTARGS mygetopts $LISTARGS
prepare_rpmdir
############################# #############################
LISTBUILT="" LISTBUILT=""
CURDIR=`pwd` CURDIR=`pwd`
...@@ -332,8 +334,6 @@ fi ...@@ -332,8 +334,6 @@ fi
cat $RPMDIR/uploaded.log.tmp | grep task | head -n2 | tail -n1 >> $RPMDIR/uploaded.log cat $RPMDIR/uploaded.log.tmp | grep task | head -n2 | tail -n1 >> $RPMDIR/uploaded.log
for i in $LISTBUILT ; do for i in $LISTBUILT ; do
# FIXME: more general way
mkdir -p $LOGDIR
LOGFILE="$LOGDIR/`basename $i .src.rpm`$MENVARG.log" LOGFILE="$LOGDIR/`basename $i .src.rpm`$MENVARG.log"
echo >>$LOGFILE echo >>$LOGFILE
date >>$LOGFILE date >>$LOGFILE
......
...@@ -96,6 +96,15 @@ assert_var() ...@@ -96,6 +96,15 @@ assert_var()
done done
} }
prepare_rpmdir()
{
assert_var RPMTOPDIR LOGDIR
mkdir -p $(realpath $RPMDIR)
mkdir -p $(realpath $RPMTOPDIR)
mkdir -p "$LOGDIR"
mkdir -p "$RPMTOPDIR/RPMS"
test -L "$RPMTOPDIR/tmp" || ln -s $RPMTMPDIR $RPMTOPDIR/tmp
}
get_root_git_dir() get_root_git_dir()
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment