Commit f59f5cc3 authored by Vitaly Lipatov's avatar Vitaly Lipatov

rpmbb: add directory support

parent 3dbc96c7
...@@ -87,6 +87,9 @@ assert_var PKGFORMAT ...@@ -87,6 +87,9 @@ assert_var PKGFORMAT
# Set nodeps if run in non rpm system # Set nodeps if run in non rpm system
[ "$PKGFORMAT" = "rpm" ] && NODEPS="" || NODEPS="--nodeps" [ "$PKGFORMAT" = "rpm" ] && NODEPS="" || NODEPS="--nodeps"
# assure we have only specs or src.rpm
LISTNAMES=$(repodirs_to_specs $LISTNAMES)
# instead cbuild req # instead cbuild req
if [ -n "$BUILDREQ" ] ; then if [ -n "$BUILDREQ" ] ; then
uni_buildreq $BUILDREQ $LISTNAMES uni_buildreq $BUILDREQ $LISTNAMES
...@@ -104,9 +107,13 @@ if [ -n "$BUILDOPT" ] ; then ...@@ -104,9 +107,13 @@ if [ -n "$BUILDOPT" ] ; then
fi fi
for i in $LISTNAMES for ln in $LISTNAMES
do do
build_rpms_name "$i" # force SPECDIR
set_specdir $ln
cd $SPECDIR || fatal
build_rpms_name "$ln"
if ! is_alt ; then if ! is_alt ; then
if ! build_buildroot ; then if ! build_buildroot ; then
LISTRPMARGS="--buildroot $BUILDROOT $LISTRPMARGS" LISTRPMARGS="--buildroot $BUILDROOT $LISTRPMARGS"
...@@ -116,9 +123,9 @@ do ...@@ -116,9 +123,9 @@ do
rm -rf "$BUILDROOT" rm -rf "$BUILDROOT"
fi fi
LOGFILE="$LOGDIR/`basename $NAMESRPMIN .src.rpm`$MENVARG.log" LOGFILE="$LOGDIR/`basename $NAMESRPMIN .src.rpm`$MENVARG.log"
echo "Build in native system" >$LOGFILE #echo "Build in native system" >$LOGFILE
rm -f $LOGFILE.ok rm -f $LOGFILE.ok
(uni_rpmbuild --commit $i -bb $LISTRPMARGS $NODEPS --target $BUILDARCH 2>&1 && touch $LOGFILE.ok) | tee -a $LOGFILE | colorify (uni_rpmbuild --commit $ln -bb $LISTRPMARGS $NODEPS --target $BUILDARCH 2>&1 && touch $LOGFILE.ok) | tee -a $LOGFILE | colorify
[ -r "$LOGFILE.ok" ] [ -r "$LOGFILE.ok" ]
RET=$? RET=$?
...@@ -127,14 +134,14 @@ do ...@@ -127,14 +134,14 @@ do
if [ "$RET" = "0" ] ; then if [ "$RET" = "0" ] ; then
check_log $LOGFILE check_log $LOGFILE
RET=$? RET=$?
fi else
if [ "$RET" != "0" ]
then
echo echo
echog "!!!!!!!! ERROR !!!!!!!" echog "!!!!!!!! ERROR !!!!!!!"
fatal "Build failed with $i" fatal "Build failed with $ln"
fi fi
echog "Done with build $NAMESRPMIN"
date
cd - >/dev/null
done done
echog "Build is done correctly"
date
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