On 04/03/2011 12:17 AM, David C. Rankin wrote:
All,
Finally have a bit of time to dive back in. The out-of-source change
couldn't have hit at a worse time - end of 1st quarter and TAX time
:( Still have 10 days to 2-weeks of commitment there.
Changing the PKGBUILDS to work with the out-of-source requirement
will be simple - thankfully, but I want to know what is the preferred
way to specify which Qt version to use. Building tqtinterface tonight,
I am presented with:
#################################################
You must select a Qt version, like this:
cmake -DQT_VERSION=3 [arguments...]
or
cmake -DUSE_QT3=ON [arguments...]
Before I change everything -- which one is the preferred way that
will work best with future changes with the Qt4 implementation? Does
the change also deprecate:
-DWITH_QT3=ON \
Also, Calvin, Baho, I'm going to try the following to satisfy the
OOS build requirement (eg.):
build() {
<snip>
cd $srcdir
msg "Creating out-of-source build directory: ${srcdir}/build"
mkdir -p build
cd build
msg "Starting cmake..."
cmake ${srcdir}/${_svnmod} \
-DCMAKE_INSTALL_PREFIX=/opt/qt \
-DQT_VERSION=3 \
-DWITH_QT3=ON \
-DQT_LIBRARY_DIRS=/opt/qt/lib \
-DCMAKE_SKIP_RPATH=ON || return 1
make
}
Let me know on the preferred Qt designation...
For tqtinterface here is the build scripts
excerpt from the Makefile
tqtinterface:
sudo mkdir -vp $(CHROOTDIR)/root/trinity.source
sudo rm -rf $(CHROOTDIR)/root/trinity.source/
sudo rsync -var
$(CHROOTDIR)/trinity.source/dependencies/tqtinterface
$(CHROOTDIR)/root/trinity.source
sudo chmod -R o+rw $(CHROOTDIR)/root/trinity.source
dependencies/tqtinterface/Builder.sh
@touch $@
Builder.sh
#!/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
[ -d ${_path} ] || ( echo "Missing directory: ${_path}";exit 2 )
[ -f "${_path}/PKGBUILD" ] ||( echo "Missing PKGBUILD";exit 3 )
# Build package
cd ${_path}
( sudo /usr/sbin/mkarchroot -u ${_chroot}/root 2>&1 | tee -a
${_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} )
# Mv and add to repo
mv -vf ${_pkg} ${_repos}
/usr/bin/repo-add ${_repos}/local.db.tar.gz ${_repos}/${_pkg}
exit 0
The PKGBUILD
# $Id$
# Maintainer: Baho Utot <baho-utot(a)columbus.rr.com>
_module=tqtinterface
_source="/trinity.source"
pkgname=${_module}
pkgver=0
pkgrel=0
arch=(i686 x86_64)
url="http://trinity.pearsoncomputing.net"
license=(GPL2)
groups=(trinity)
pkgdesc="Trinity - ${_module}"
depends=(qt3)
makedepends=(pkgconfig cmake autoconf subversion libxi libxft libxrandr
libxcursor libxinerama mesa)
source=()
#options=(!makeflags)
_pwd=$(pwd)
_builddir=BUILD
build() {
cd ${_source}/${_module}
pkgver=$(svnversion)
msg "SVN checkout of revision $pkgver -- Complete."
msg "Setting PATH, CMAKE and Trinity Environment variables"
export _prefix="/usr"
cd ${_pwd}
mkdir -vp ${_pwd}/${_builddir}
cd ${_pwd}/${_builddir}
msg "Starting cmake..."
cmake ${_source}/${_module}/ \
-DCMAKE_INSTALL_PREFIX=${_prefix} \
-DQT_VERSION=3 \
-DQT_INCLUDE_DIR=/usr/include/qt
# -DCMAKE_VERBOSE_MAKEFILE=ON \
make
}
package() {
cd ${_source}/${_module}
pkgver=$(svnversion)
msg "Packaging - $pkgname-$pkgver"
cd ${_pwd}/${_builddir}
make DESTDIR="$pkgdir/" install
}