trinity-users@lists.pearsoncomputing.net

Message: previous - next
Month: February 2011

Current Build Times & Quick & Dirty build script outline - just FYI

From: "David C. Rankin" <drankinatty@...>
Date: Sat, 19 Feb 2011 11:25:19 -0600
All,

  Here are recent build times for Trinity svn on a middle of the road P4 3.2G
box. (nothing special - old Dell GX280 'small form factor'):

10:55 supersff:~/tblds> grep Feb bldlog.txt
Feb 19 01:44:45 building:  trinity-qt3
Feb 19 02:06:12 building:  trinity-pyqt3
Feb 19 02:17:05 building:  trinity-tqtinterface
Feb 19 02:18:16 building:  trinity-arts
Feb 19 02:22:02 building:  trinity-kdelibs
Feb 19 03:01:01 building:  trinity-kdebase
Feb 19 03:36:42 building:  trinity-kdevelop
Feb 19 03:51:13 building:  trinity-kdewebdev
Feb 19 03:58:21  done!

  2:14 beginning to end. For anyone packaging Trinity, the basic 'outline' of
the build script layout I used was (link to full script below):

#!/bin/bash
<snip>

# array of build directories -- in order
declare -a blddirs
blddirs=('trinity-qt3'
        'trinity-pyqt3'
        'trinity-tqtinterface'
	'trinity-arts'
	'trinity-kdelibs'
	'trinity-kdebase'
	'trinity-kdevelop'
	'trinity-kdewebdev')

# loop through the blddirs to build each in order
for((i=0;i<${#blddirs[@]};i++)); do

  # copy your dev dir to the build dir (I don't build in my original dev dir)
  # if working with srpms, you could either install them at this point and
  # build with 'rpmbuild -bb specfile' or just 'rpmbuild --rebuild srpm'.
  cp -a ${pbbase}/${blddirs[$i]} $bldbase

  # if the dir got copied (or spec file exists) -- use it, if not skip it
  if [[ -d  ${bldbase}/${blddirs[$i]} ]]; then

    # start time to screen & log
    echo -e "\n$(date '+%b %e %T') building:  ${blddirs[$i]}\n" | tee -a ${bldlog}

    # change into the build dir
    cd ${bldbase}/${blddirs[$i]}

    # move any existing packages out to pkgdir (adjust for .rpm or .deb)
    echo -e "\n Testing for old packages and moving to ${binsavdir}\n"
    if ls *tar.xz &>/dev/null; then
      mv -fv *tar.xz ${binsavdir} | tee -a ${bldlog}
    fi

    # build the new package (adjust for rpbbuild -bb or whatever deb uses)
    (makepkg -s)

    # install and move new package to $pkgbin dir  (adjust as needed)
    # if the build failed, issue warning an move on
    echo -e "\n Testing for new packages, installing, and moving to ${binpkgdir}\n"
    if ls *tar.xz &>/dev/null; then
      sudo pacman -U --noconfirm *tar.xz | tee -a ${bldlog}
      mv -fv *tar.xz ${binpkgdir} | tee -a ${bldlog}
    else
      echo "WARNING: Build of '${blddirs[$i]}' produced no package, skipping..."
| tee -a ${bldlog}
    fi
  else
    echo "WARNING: Directory '${bldbase}/${blddirs[$i]}' not found - skipping" |
tee -a ${bldlog}
  fi
done

exit 0

  The link to the full script is:

http://www.3111skyline.com/dl/dt/trinity/arch/scr/bldtrinsvn-all.sh

  It should be able to be easily adapted for rpm based builds or whatever debian
and slackware use. The PKGBUILD scripts that Arch Linux uses with "makepkg" work
the same way SPEC files work with "rpmbuild" on rpm based distros.


-- 
David C. Rankin, J.D.,P.E.