On 02/19/2011 11:25 AM, David C. Rankin wrote:
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):
<snip>
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.
I love this build script -- Rebuild times (with svn up on each module):
18:57 supersff:~/tblds> grep Feb bldlog.txt Feb 19 18:50:18 building: trinity-tqtinterface Feb 19 18:50:27 building: trinity-arts Feb 19 18:50:43 building: trinity-kdelibs Feb 19 18:53:30 building: trinity-kdebase Feb 19 18:56:37 building: trinity-kdevelop Feb 19 18:57:25 building: trinity-kdewebdev Feb 19 18:57:49 done!
The relevant build() and package() functions of the build script (Arch PKGBUILD for makepkg) are:
<snip>
_svnmod=kdebase _svntrunk="svn://anonsvn.kde.org/home/kde/branches/trinity/${_svnmod}"
trinity_prefix="/opt/trinity"
build() {
cd ${srcdir}
msg "Connecting to SVN server to update or checkout ${_svnmod}...." if [ -d ${_svnmod}/.svn ]; then (cd ${_svnmod} && svn up) [[ $? -eq 0 ]] || _co_failed=1 else (svn co $_svntrunk ${_svnmod}) [[ $? -eq 0 ]] || _co_failed=1 fi
# if update or checkout failed - bail... if [[ $_co_failed -ne 1 ]]; then msg "SVN checkout of revision $pkgver -- Complete." else msg "SVN checkout of revision $pkgver -- Failed or server timeout." exit 1 fi
msg "Setting PATH, CMAKE and Trinity Environment variables" export CMAKE_PREFIX_PATH=/opt/qt:/opt/trinity
CMAKE_INCLUDE_PATH=/opt/qt/include:/opt/qt/include/tqt:/usr/include/dbus-1.0:/opt/trinity/include:/opt/trinity/include/libkrandr export LD_LIBRARY_PATH=/opt/trinity/lib:/opt/trinity/lib/kde3:$LD_LIBRARY_PATH export PKG_CONFIG_PATH=:/opt/trinity/lib/pkgconfig:/opt/qt/lib/pkgconfig
cd ${srcdir}/${_svnmod}
cmake ./ \ -DCMAKE_INSTALL_PREFIX=${trinity_prefix} \ -DCMAKE_VERBOSE_MAKEFILE=ON \ -DWITH_QT3=ON \ -DQTDIR=/opt/qt \ -DQT_LIBRARY_DIRS=/opt/qt/lib \ -DWITH_PAM=ON \ -DBUILD_ALL=ON make }
package() { msg "Packaging - $pkgname-$pkgver" cd ${srcdir}/${_svnmod}
make DESTDIR="$pkgdir/" install
cd ${startdir}
# install desktop and update kdmrc and Xsession [[ -f trinity.desktop ]] && { mkdir -p ${pkgdir}/etc/X11/sessions cp trinity.desktop ${pkgdir}/etc/X11/sessions }
_kdmdir=${trinity_prefix}/share/config/kdm [[ -d ${pkgdir}/${_kdmdir} ]] || mkdir -p ${pkgdir}/${_kdmdir}
[[ -f kdmrc ]] && cp kdmrc ${pkgdir}/${_kdmdir}
[[ -f Xsession ]] && { cp Xsession ${pkgdir}/${_kdmdir} chmod 0755 ${pkgdir}/${_kdmdir}/Xsession }
[[ -d ${pkgdir}/usr/bin ]] || mkdir -p ${pkgdir}/usr/bin cd ${pkgdir}/usr/bin ln -sf /opt/trinity/bin/startkde starttrinity
cd ${startdir}
# rm -r ${srcdir}/${_svnmod} }
Note: the package() function includes updated trinity.desktop, kdmrc, Xsession and links for /usr/bin/starttrinity that allow Trinity kdm to work by simply modifying inittab, setting initial boot to runlevel 5 and specifying the desktop login manager as:
x:5:respawn:/opt/trinity/bin/kdm -nodaemon
The trinity.desktop, kdmrc and Xsession being used can all be found here:
http://www.3111skyline.com/dl/dt/trinity/arch/cfg/