On 30 April 2011 06:48, Baho Utot baho-utot@columbus.rr.com wrote:
On 04/29/2011 11:59 PM, Calvin Morrison wrote:
Also Baho,
you don't seem to have included mkarchchroot, so i can't even use your system.
Calvin Morrison
by running make in the scripts directory gives you the instructions for using the system.
All that is needed is to
add the user to sudo - visudo, the build system requires sudo
pacman -S devtools - install devtools for building in clean chroot
mkdir -vp /home/build/scripts - create build directory
cp -var <where scripts are> /home/build/scripts - copy the scripts into build directory
cd /home/build/scripts -
make mkchroot - uses mkarchroot to create clean chroot and checks out the svn code - if svn co failes then use make update to complete the svn check out
make trinity - builds packages
here is the entry in the Makefile that installs the archroot create a local repo and checks out the source
mkchroot: sudo mkarchroot $(CHROOTDIR)/root base base-devel sudo sudo mkdir $(CHROOTDIR)/root/repo sudo chmod 777 $(CHROOTDIR)/root/repo sudo mkdir $(CHROOTDIR)/trinity.source sudo chmod 777 $(CHROOTDIR)/trinity.source sudo mkdir -vp $(CHROOTDIR)/root/trinity.source sudo chmod 777 $(CHROOTDIR)/root/trinity.source (cd $(CHROOTDIR)/trinity.source; svn checkout svn://anonsvn.kde.org/home/kde/branches/trinity ./) (cd $(CHROOTDIR)/trinity.source; svn cleanup) (cd $(CHROOTDIR)/trinity.source; svn update)
The mkarchroot is handled by the Builder.sh script
This updates the chroot ( sudo /usr/sbin/mkarchroot -u ${_chroot}/root 2>&1 | tee ${_date}build.log && exit ${PIPESTATUS} )
This builds the package in a clean chroot ( sudo /usr/sbin/makechrootpkg -c -r ${_chroot} 2>&1 | tee -a ${_date}build.log && exit ${PIPESTATUS} )
#!/bin/bash -e _pgm=${0##*/} # whoami _path=${0%/*} # fetch directory name = module name _pwd=$(pwd) _chroot="/home/build" _date=$(date +%F)"-"$(date +%R)"-" _repos="/home/build/root/repo" _pkgname="*.pkg.tar*" # Check parameters #[ -n ${1} ] || ( echo "Missing package name arg: ${1}";exit 1 ) #[ -d ${_svnsrc}/${_module} ] || ( echo "Missing source directory: ${_svnsrc}/${_module}";exit 1 ) [ -d ${_path} ] || ( echo "Missing directory: ${_path}";exit 2 ) [ -f "${_path}/PKGBUILD" ] ||( echo "Missing PKGBUILD";exit 3 ) cd ${_path} _date="" rm build.log namcap.log filelist.log || true # update chroot and build package echo "Building---> ${_path}" ( sudo /usr/sbin/mkarchroot -u ${_chroot}/root 2>&1 | tee ${_date}build.log && exit ${PIPESTATUS} ) ( sudo /usr/sbin/makechrootpkg -c -r ${_chroot} 2>&1 | tee -a ${_date}build.log && exit ${PIPESTATUS} ) # Namcap package _pkg=$(find . -name "${_pkgname}" -print) [ -f ${_pkg} ] || ( echo "Missing package: ${_pkgname}";exit 4 ) ( /usr/bin/namcap ${_pkg} 2>&1 | tee ${_date}namcap.log && exit ${PIPESTATUS} ) ( /bin/tar -tf ${_pkg} 2>&1 | tee ${_date}filelist.log && exit ${PIPESTATUS} ) # Me and my repo mv -vf ${_pkg} ${_repos} /usr/bin/repo-add ${_repos}/local.db.tar.gz ${_repos}/${_pkg} exit 0
If you want to build without a clean chroot then just set the following in each PKGBUILD file
_source="/trinity.source" - where the source is ex: _source="/home/build/trinity.source/dependencies/tqtinterface" _prefix="/usr" - where you want the package to install _builddir=BUILD - where you want the out of source build directory ex: _builddir="/tmp/builddir"
then makepkg -c - builds it package will be in the build directory
Thanks for explaining it!