Difference between revisions of "TDE 14.0.0 prerequisites"

From Studiosg
Jump to navigationJump to search
(Added page about the build procedure of the Prerequisites packages for TDE 14.0.0)
 
(Page updated to new template)
Line 1: Line 1:
Welcome to Simone Giustetti's wiki pages.
+
{{header_en|title=How-to build TDE base packages| keyword={{Template:keyword_en_tde}}| description=Building, installing and configuring working packages for TDE base on Slackware Linux | link_page=TDE_14.0.0_pacchetti_base}}
  
 +
== '''Base Packages''' ==
 +
[[En/trinity_desktop_environment_14.0.0 | Trinity Desktop Environment 14.0.0]]
  
Languages: '''English''' - [http://www.giustetti.net/wiki/index.php?title=TDE_14.0.0_prerequisiti Italiano]
+
You built and installed '''TDE prerequisites''' packages it's now time to move on to the real '''desktop environment'''. Being a huge and complex environment its source code is split among several packages, around thirty, depending on its scope and the functions it provides. All main daemons and bulk applications are grouped among two packages only labeled '''base packages''': '''tdelibs''' and '''tdebase'''. The two packages together make up the '''Trinity Desktop Environment''' skeleton and should be installed first. After installing both packages it will be possible to start the desktop environment and test some basic functionality like creating and moving a window, starting an application, but not much more. All of the programs and configuration tools making TDE useful and productive won't be available.
 
 
----
 
 
 
== '''Prerequisites''' ==
 
[[En/trinity_desktop_environment_14.0.0]]
 
 
 
Packages grouped with the generic name '''Prerequisites''' include all of the desktop environment base libraries and some optional components needed for advanced features. The base libraries obviously include '''TQt3''', the Qt fork developed and maintained by the Trinity project members, '''tqtinterface''', a library providing an abstraction layer between TQt and TDE, '''arts''', the TDE sound server and sound stream mixer, '''dbus-tqt''' and '''dbus-1-tqt''', which tie the desktop environment with the hardware subsystem. The remaining libraries: '''avahi-tqt''', '''libart-lgpl''', '''libcaldav''', '''libcarddav''', '''python-tqt''', '''sip4-tqt''', '''tqca''', '''tqca-tls''' and '''tqscintilla''' are optional ones. The desktop environment could be built without them, but will miss some useful functionality.
 
  
 
=== Build System ===
 
=== Build System ===
  
One among the Trinity project main goals consists of porting the package build system from '''autotools''' to '''[http://www.cmake.org/ cmake]'''. The migration is still a work in progress partially concluded only for a bunch of the previously listed packages. A package list matched with the used build system follows:
+
In accordance to the Trinity project goals, '''both packages were successfully migrated to [http://www.cmake.org/ cmake]''' a tool that can be used to configure and build the source code.
 
 
{| style="width: 80%;"
 
|+ '''BUILD SYSTEM'''
 
! Package !! Package Type !! Build System
 
|- style="text-align: center;"
 
| arts || Base || Cmake
 
|- style="text-align: center;"
 
| avahi-tqt || Add-on || Autotools
 
|- style="text-align: center;"
 
| dbus-1-tqt || Base || Cmake
 
|- style="text-align: center;"
 
| dbus-tqt || Base || Cmake
 
|- style="text-align: center;"
 
| libart-lgpl || Add-on || Autotools
 
|- style="text-align: center;"
 
| libcaldav || Add-on || Autotools
 
|- style="text-align: center;"
 
| libcarddav || Add-on || Autotools
 
|- style="text-align: center;"
 
| python-tqt || Add-on || configure.py script <br> Python interpreter required
 
|- style="text-align: center;"
 
| sip4-tqt || Add-on || configure.py script  <br> Python interpreter required
 
|- style="text-align: center;"
 
| tqca || Add-on || Autotools
 
|- style="text-align: center;"
 
| tqca-tls || Add-on || Autotools
 
|- style="text-align: center;"
 
| tqscintilla || Add-on || Uses script qscintilla.pro for qmake <br> TQt3 library required
 
|- style="text-align: center;"
 
| tqt3 || Base || Autotools
 
|- style="text-align: center;"
 
| tqtinterface || Base || Cmake
 
|}
 
 
 
The need for four different build script templates is evident. Templates should share as much code as possible, but differences will surely arise while invoking the build process because of both the different employed build systems and the need for package specific options. The common SlackBuild script structure, global options and finally package specific options all will be discussed and detailed below.
 
  
 
=== Common Build Script Structure ===
 
=== Common Build Script Structure ===
  
Scripts for version 3.5.13.2 of TDE ([[En/trinity_desktop_environment#Prerequisites]]) were updated and adapted to the last available release. The script skeleton is nearly untouched:
+
Code written for the prerequisite packages build scripts was reused as much as possible to maintain a certain degree of homogeneity. Please check the corresponding page for better details: [[TDE_14.0.0_prerequisites#Common_Build_Script_Structure |Common Build Script Structure]].
* Introduction where a brief description and license information are provided for the script.
 
* External files containing global and local build options are loaded:
 
  if [ -r ../../TDE.options ]; then
 
      . ../../TDE.options
 
  fi
 
  PREFIX_TDE=${PREFIX}
 
  if [ -r ./local.options ]; then
 
      . ./local.options
 
  fi
 
* Declare some global variables for the script:
 
  ARCHIVE_FORMAT=${ARCHIVE_FORMAT:-"tar.bz2"}
 
  BUILD=${BUILD:-"1"}
 
  LD_LIBRARY_PATH=""  # Will be defined later on
 
  PRGNAM="tqtinterface"
 
  PREFIX=${PREFIX:-"/usr"}
 
  MANDIR=${MANDIR:-"${PREFIX}/man"}
 
  SOURCE_SUBDIR=${SOURCE_SUBDIR:-"dependencies"}
 
  SRCVER=${SRCVER:-"R14.0.0"}
 
  TAG=${TAG:-"sg"}
 
  TAR_OPTION=${TAR_OPTION:-"-xjvf"}
 
  VERSION=$(echo ${SRCVER} | tr '-' '.')
 
 
 
  DOCS="AUTHORS COPYING HOW.TO.BUILD NAMING README TODO TRINITY.RELEASE tqtinterface.lsm"
 
: Some variables were added since release 3.5.13.2, among them: the archive format and options for the '''tar''' program. All of the additions are meant to ease the build procedure once the project will settle on a compression format for source code archives.
 
* Determine the target architecture for the package and set proper parameters for the compiler, linker, included libraries, etc.:
 
  if [ -z "${MARCH}" ]; then
 
      MARCH=`uname -m`
 
  fi
 
  if [ -z "${ARCH}" ]; then
 
      case "${MARCH}" in
 
        i?86)
 
            export ARCH=i486
 
        ;;
 
        arm*)
 
            export ARCH=arm
 
        ;;
 
        *)
 
            export ARCH=${MARCH}
 
        ;;
 
      esac
 
  fi
 
: Code was updated in order to read the target architecture from global parameters thus providing a suitable script for '''chroot''' environments.
 
* Create a directory build tree:
 
  mkdir -p ${TMP}/tmp-${PRGNAM}  # Location to build the source
 
  rm -rf ${TMP}/tmp-${PRGNAM}/*  # Remove the remnants of previous build and continue
 
  mkdir -p ${PKG}                # Place for the package to be built
 
  rm -rf ${PKG}/*                # We always erase old package's contents
 
  mkdir -p ${OUTPUT}            # Place for the package to be saved
 
* Assign sane permissions to files:
 
  chown -R root:root .
 
  find . \
 
  \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
 
  -exec chmod 755 {} \; -o \
 
  \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
 
  -exec chmod 644 {} \;
 
* Configure, build and install the package.
 
* Add some documentation, links, examples and whatever is needed to obtain a fully functional package:
 
  mkdir -p ${PKG}/usr/doc/${PRGNAM}"-"$VERSION
 
  cp -a ${DOCS} ${PKG}/usr/doc/${PRGNAM}"-"${VERSION}
 
  chown -R root:root ${PKG}/usr/doc/${PRGNAM}"-"${VERSION}
 
  find ${PKG}/usr/doc -type f -exec chmod 644 {} \;
 
 
 
  # Add a package description.
 
  mkdir -p ${PKG}/install
 
  cat ${SRCDIR}/slack-desc > ${PKG}/install/slack-desc
 
 
 
  # Set sane permissions for the include files.
 
  if [ -d ${PKG}/${PREFIX}/include ]; then
 
      find ${PKG}/${PREFIX}/include -type f -exec chmod 0644 {} \;
 
  fi
 
* Crete the package.
 
  
 
=== Generic Options ===
 
=== Generic Options ===
  
Generic build options will vary depending on the adopted build system only. '''Autotools''' related packages require the following:
+
Generic options used for both packages uniform to the ones detailed in the [http://www.cmake.org/ cmake] section of the TDE prerequisites page. You are again welcome to check the related page for further details: [[TDE_14.0.0_prerequisites#Generic_Options |Generic Options]].
* Rebuild the '''Autoconf / Automake''' used files:
 
  '''cp''' ''-Rp'' /usr/share/aclocal/libtool.m4 <pkg_path_build>/admin/libtool.m4.in
 
  '''cp''' ''-Rp'' <path to your system's ltmain.sh file> admin/ltmain.sh
 
  '''make''' ''-f'' admin/Makefile.common
 
* Set options for the compiler and linker, set paths for include files, libraries and man pages:
 
  '''export''' LD_LIBRARY_PATH=${PREFIX}/lib${LIBDIRSUFFIX}:${PREFIX}/lib${LIBDIRSUFFIX}/trinity:${LD_LIBRARY_PATH}
 
  '''export''' LIBDIR=${PREFIX}/lib${LIBDIRSUFFIX}
 
  '''export''' MANDIR
 
  '''export''' PATH=${PREFIX}/bin:${PATH}
 
  '''export''' PKG_CONFIG_PATH=:${PREFIX}/lib${LIBDIRSUFFIX}/pkgconfig:${PKG_CONFIG_PATH}
 
  '''export''' PREFIX
 
  '''export''' QTDIR=${PREFIX}
 
  '''export''' SYSCONFDIR=/etc/trinity
 
  # Enable only one of the following:
 
  # export DEBUG_AUTOTOOL_OPT="--enable-debug=full"
 
  '''export''' DEBUG_AUTOTOOL_OPT="''--disable-debug''"
 
* Configure source code:
 
  CFLAGS="${SLKCFLAGS}" \
 
  CXXFLAGS="${SLKCFLAGS}" \
 
  ./'''configure''' \
 
      ''--prefix=''${PREFIX} \
 
      ''--libdir=''${LIBDIR} \
 
      ''--mandir=''${MANDIR} \
 
      ''--build=''$ARCH-slackware-linux \
 
      2>&1 | '''tee''' -a ${OUTPUT}/${PRGNAM}_configure.log
 
* Build and install:
 
  '''make''' VERBOSE=1 2>&1 | '''tee''' ${OUTPUT}/${PRGNAM}_make.log
 
  '''make''' install DESTDIR=${PKG} 2>&1 | '''tee''' ${OUTPUT}/${PRGNAM}_install.log
 
 
 
 
 
Steps for '''[http://www.cmake.org/ Cmake]''' consist of:
 
* Clean the cmake cache:
 
  '''find''' . ''-name'' CMakeCache.txt ''-exec'' '''rm''' {} \;
 
* Set options for the compiler and linker, set paths for include files, libraries and man pages:
 
  '''export''' LD_LIBRARY_PATH=${PREFIX}/lib${LIBDIRSUFFIX}:${PREFIX}/lib${LIBDIRSUFFIX}/trinity:${LD_LIBRARY_PATH}
 
  '''export''' LIBDIR=${PREFIX}/lib${LIBDIRSUFFIX}
 
  '''export''' MANDIR
 
  '''export''' PATH=${PREFIX}/bin:${PATH}
 
  '''export''' PKG_CONFIG_PATH=${PREFIX}/lib${LIBDIRSUFFIX}/pkgconfig:${PKG_CONFIG_PATH}
 
  '''export''' PREFIX
 
  '''export''' QTDIR=${PREFIX}
 
  '''export''' SYSCONFDIR=/etc/trinity
 
  # Enable only one of the following:
 
  # export DEBUG_AUTOTOOL_OPT="--disable-debug"
 
  '''export''' DEBUG_CMAKE_OPT=""
 
* Configure source code:
 
  '''cmake''' ${TMP}/tmp-${PRGNAM}/${DIR_SRC} \
 
      ''-DCMAKE_C_FLAGS:STRING=''"${SLKCFLAGS}" \
 
      ''-DCMAKE_CXX_FLAGS:STRING=''"${SLKCFLAGS} $DEBUG_CMAKE_OPT" \
 
      ''-DCMAKE_INSTALL_PREFIX=''${PREFIX} \
 
      ''-DLIB_SUFFIX=''${LIBDIRSUFFIX} \
 
      ''-DMAN_INSTALL_DIR=''${MANDIR} \
 
      ''-DSYSCONF_INSTALL_DIR=''${SYSCONFDIR} \
 
      ''-DBUILD_ALL=ON'' \
 
      2>&1 | '''tee''' ${OUTPUT}/${PRGNAM}_configure.log
 
* Build and install:
 
  '''make''' VERBOSE=1 2>&1 | '''tee''' ${OUTPUT}/${PRGNAM}_make.log
 
  '''make''' install DESTDIR=${PKG} 2>&1 | '''tee''' ${OUTPUT}/${PRGNAM}_install.log
 
 
 
 
 
Packages '''python-tqt''' and '''sip4-tqt''' use a script written in Python language to configure source code. Both scripts only accept options for the compiler and linker.
 
* Configure source code:
 
  '''python''' configure.py \
 
      CFLAGS="${SLKCFLAGS}" \
 
      CXXFLAGS="${SLKCFLAGS}" \
 
      2>&1 | '''tee''' ${OUTPUT}/${PRGNAM}_configure.log
 
* Build and install:
 
  '''make''' VERBOSE=1 2>&1 | '''tee''' ${OUTPUT}/${PRGNAM}_make.log
 
  '''make''' install DESTDIR=${PKG} 2>&1 | '''tee''' ${OUTPUT}/${PRGNAM}_install.log
 
 
 
 
 
Last is '''tqscintilla''', the only package to use '''tqmake''', which requires options for the compiler and linker.
 
* Configure source code:
 
  CFLAGS="${SLKCFLAGS}" \
 
  CXXFLAGS="${SLKCFLAGS} ''-fno-exceptions''" \
 
  '''tqmake''' qscintilla.pro \
 
      2>&1 | '''tee''' ${OUTPUT}/${PRGNAM}_configure.log
 
* Build and install:
 
  '''make''' VERBOSE=1 2>&1 | '''tee''' ${OUTPUT}/${PRGNAM}_make.log
 
  '''make''' install INSTALL_ROOT=${PKG} 2>&1 | '''tee''' ${OUTPUT}/${PRGNAM}_install.log
 
  
 
=== Custom Options ===
 
=== Custom Options ===
  
The generic options used to configure and build each package in the prerequisites group were discussed above. Package specific options instead are detailed below together with some tips to attain a successful build. Moreover a download link for each SlackBuild is provided in order to help whoever wishes to test a full build.
+
Building both '''tdebase''' and '''tedelibs''' obviously required for some custom options. The former of the two in greater part, due to its targeted goal, required quite a lot of customization. Package specific options are detailed below together with links to download each SlackBuild script. Scripts are provided in order to help whoever wishes to build working packages from the source code archives.
  
==== ARTS ====
+
==== TDEBASE ====
  
The '''A'''nalog '''R'''eal '''T'''ime '''S'''ynthesizer is a sound library providing '''an integrated sound server''', a sound streams mixer and some configuration tools. Used since KDE 2, Arts was replaced by '''Phonon''' in KDE 4 and later adopted by TDE. To build Arts You need to set the '''-DCMAKE_SKIP_RPATH="OFF"''' option while running the configuration script. The '''[http://www.cmake.org/ cmake]''' invocation command is:
+
'''Tdebase is the Trinity Desktop Environment main package'''. It contains base libraries, files, configuration tools and all of the applications needed to run the environment. Together with tdelibs, tdebase makes up a minimal desktop environment which other TDE packages grow and expand adding functionality and tools. Tdebase includes some general purpose applications such as the file manager and the configuration programs. Among the many included programs are:
  '''cmake''' ${TMP}/tmp-${PRGNAM}/${DIR_SRC} \
+
* The control center ('''kcontrol''').
      ''-DCMAKE_C_FLAGS:STRING=''"${SLKCFLAGS}" \
+
* The desktop log-in manager ('''tdm''').
      ''-DCMAKE_CXX_FLAGS:STRING=''"${SLKCFLAGS} $DEBUG_CMAKE_OPT" \
+
* TDE integrated manual ('''khelpcenter''').
      ''-DCMAKE_INSTALL_PREFIX''=${PREFIX} \
+
* TDE panel ('''kicker''').
      ''-DCMAKE_SKIP_RPATH="OFF"'' \
+
* TDE web browser and integrated file manager ('''konqueror''').
      ''-DLIB_SUFFIX=''${LIBDIRSUFFIX} \
+
* The terminal emulator ('''konsole''').
      ''-DMAN_INSTALL_DIR=''${MANDIR} \
+
* The window manager ('''twin''').
      ''-DSYSCONF_INSTALL_DIR=''${SYSCONFDIR} \
+
* The desktop environment start-up script ('''starttde''').
      ''-DBUILD_ALL=ON''
 
A compressed archive containing the SlackBuild script and the related configuration files can be downloaded from the following [http://www.giustetti.net/resource/slackbuild/tde/1400/arts.tar.gz link].
 
  
==== AVAHI-TQT ====
+
The tdebase package includes some '''window managers''': programs that draw application windows on screen. A new window manager was introduced in TDE 14.0.0: '''[https://github.com/chjj/compton Compton]''' that replaces the old,
 +
out of support, no more in development '''Kompmgr composition manager''' which once shipped with '''KDE 3'''. Sadly the TDE distributed version of Compton is afflicted by some compile issues making it impossible to build a working binary file. As a temporary work around '''the SlackBuild script removes the Compton dependency''':
 +
<syntaxhighlight lang="bash">
 +
  ( cd ${TMP}/tmp-${PRGNAM}/${DIR_SRC}; sed -i "twin/CMakeLists.txt" -e "/compton-tde/ s/^/#/" )
 +
</syntaxhighlight>
 +
Therefore the window manager '''won't be built'''.
  
A library providing DNS resolution capabilities to the base TDE packages tdebase and tdelibs. Avahi-tqt requires the '''avahi''' library as a dependency, but the latter is not part of a standard Slackware release. A build script for avahi can be downloaded from the [http://slackbuilds.org slackbuilds.org] web page. Once installed the dependency, '''avahi-tqt''' can be built setting some environment variables:
+
It is worth mentioning that the standard Compton version, unlike the one shipped with TDE, presents no issue. Were You interested in testing the window manager Your best bet consists of building the standard package recurring to the build scripts available from the project [http://slackbuilds.org slackbuilds.org] web page.
  PREFIX="/usr/local"
 
  MANDIR="/usr/man"
 
Exporting the '''tqt3''' path:
 
  '''export''' QTDIR=${PREFIX_TDE}
 
Running the autogen.sh script to create all of the build scripts and configuration files:
 
  '''sh''' ./autogen.sh
 
Then configuring the source code passing some parameters to the script:
 
  CFLAGS="${SLKCFLAGS}" \
 
  CXXFLAGS="${SLKCFLAGS}" \
 
  ./'''configure''' \
 
      ''--prefix=''${PREFIX} \
 
      ''--libdir=''${LIBDIR} \
 
      ''--mandir=''${MANDIR} \
 
      ''--build=''$ARCH-slackware-linux
 
A compressed archive containing the SlackBuild script and the related configuration files can be downloaded from the following [http://www.giustetti.net/resource/slackbuild/tde/1400/avahi-tqt.tar.gz link]. Please note: The script is provided for reference only. I don't usually build optional packages nor set on add-on functionality if I can do without. Having no avahi package installed, I could not test the SlackBuild script behavior, just its syntax.
 
  
==== DBUS-TQT ====
+
To configure and build the package recurring to [http://www.cmake.org/ cmake] a lot of parameters are required. A likely command line should look something like:
 +
<syntaxhighlight lang="bash">
 +
  cmake ${TMP}/tmp-${PRGNAM}/${DIR_SRC} \
 +
      -DCMAKE_C_FLAGS:STRING="${SLKCFLAGS}" \
 +
      -DCMAKE_CXX_FLAGS:STRING="${SLKCFLAGS} $DEBUG_CMAKE_OPT" \
 +
      -DCMAKE_INSTALL_PREFIX=${PREFIX} \
 +
      -DCMAKE_SKIP_RPATH="OFF" \
 +
      -DLIB_SUFFIX=${LIBDIRSUFFIX} \
 +
      -DMAN_INSTALL_DIR=${MANDIR} \
 +
      -DSYSCONF_INSTALL_DIR=${SYSCONFDIR} \
 +
      -DBUILD_CRASHTEST=ON \
 +
      -DWITH_ARTS=ON \
 +
      -DWITH_HAL=OFF \
 +
      -DWITH_LDAP=ON \
 +
      -DWITH_LIBRAW1394=ON \
 +
      -DWITH_OPENEXR=ON \
 +
      -DWITH_PAM=OFF \
 +
      -DWITH_GCC_VISIBILITY=OFF \
 +
      -DWITH_SAMBA=ON \
 +
      -DWITH_SASL=ON \
 +
      -DWITH_SHADOW=ON \
 +
      -DWITH_TDEHWLIB=ON \
 +
      -DWITH_USBIDS="/usr/share/hwdata/usb.ids" \
 +
      -DWITH_XCOMPOSITE=ON \
 +
      -DWITH_XCURSOR=ON \
 +
      -DWITH_XDAMAGE=ON \
 +
      -DWITH_XDMCP=ON \
 +
      -DWITH_XEXT=ON \
 +
      -DWITH_XFIXES=ON \
 +
      -DWITH_XINERAMA=ON \
 +
      -DWITH_XRANDR=ON \
 +
      -DWITH_XRENDER=ON \
 +
      -DWITH_XTEST=ON \
 +
      -DBUILD_ALL=ON
 +
</syntaxhighlight>
  
A library interfacing to the '''dbus''' daemon included in most modern '''Linux''' distributions to manage hardware and provide a common messaging infrastructure for applications. Dbus is a replacement for '''HAL'''. To configure and build the package using '''[http://www.cmake.org/ cmake]''' you should:
+
After compiling the source code and installing the obtained binary files some tasks need taking care of: adding scripts, configuration files and some more stuff needed by the environment to work flawlessly:
 
+
<syntaxhighlight lang="bash">
Clean the cmake cache:
+
   # Add some configuration files / scripts needed by TDE.
  '''find''' . ''-name'' CMakeCache.txt ''-exec'' '''rm''' {} \;
+
   mkdir -p ${PKG}/etc/trinity
Pass the '''-DCMAKE_SKIP_RPATH="OFF"''' option to cmake. The cmake command line should be something like:
+
  mkdir -p ${PKG}/etc/rc.d
  '''cmake''' ${TMP}/tmp-${PRGNAM}/${DIR_SRC} \
+
   mv ${PKG}/${PREFIX}/share/config/tdm ${PKG}/etc/trinity/tdm
      ''-DCMAKE_C_FLAGS:STRING=''"${SLKCFLAGS}" \
+
   ( cd ${PKG}/${PREFIX}/share/config ; ln -sf /etc/trinity/tdm tdm )
      ''-DCMAKE_CXX_FLAGS:STRING=''"${SLKCFLAGS} $DEBUG_CMAKE_OPT" \
+
    
      ''-DCMAKE_INSTALL_PREFIX=''${PREFIX} \
+
   # Set sane permissions for the include files.
      ''-DCMAKE_SKIP_RPATH="OFF"'' \
+
   if [ -d ${PKG}/${PREFIX}/include ]; then
      ''-DLIB_SUFFIX=''${LIBDIRSUFFIX} \
+
       find ${PKG}/${PREFIX}/include -type f -exec chmod 0644 {} \;
      ''-DMAN_INSTALL_DIR=''${MANDIR} \
 
      ''-DSYSCONF_INSTALL_DIR=''${SYSCONFDIR} \
 
      ''-DBUILD_ALL=ON''
 
A compressed archive containing the SlackBuild script and the related configuration files can be downloaded from the following [http://www.giustetti.net/resource/slackbuild/tde/1400/dbus-tqt.tar.gz link].
 
 
 
==== DBUS-1-TQT ====
 
 
 
A '''dbus-tqt''' related library adding an abstraction layer between the dbus daemon and the TQt3 library. The package can be configured recurring to '''[http://www.cmake.org/ cmake]'''. Follow some easy steps:
 
 
 
Clean the cmake cache:
 
  '''find''' . ''-name'' CMakeCache.txt ''-exec'' '''rm''' {} \;
 
Pass the '''-DCMAKE_SKIP_RPATH="OFF"''' option to cmake. The cmake command line should be something like:
 
   '''cmake''' ${TMP}/tmp-${PRGNAM}/${DIR_SRC} \
 
      ''-DCMAKE_C_FLAGS:STRING=''"${SLKCFLAGS}" \
 
      ''-DCMAKE_CXX_FLAGS:STRING=''"${SLKCFLAGS} $DEBUG_CMAKE_OPT" \
 
      ''-DCMAKE_INSTALL_PREFIX=''${PREFIX} \
 
      ''-DCMAKE_SKIP_RPATH=''"OFF" \
 
      ''-DLIB_SUFFIX=''${LIBDIRSUFFIX} \
 
      ''-DMAN_INSTALL_DIR=''${MANDIR} \
 
      ''-DSYSCONF_INSTALL_DIR=''${SYSCONFDIR} \
 
      ''-DBUILD_ALL=ON''
 
A compressed archive containing the SlackBuild script and the related configuration files can be downloaded from the following [http://www.giustetti.net/resource/slackbuild/tde/1400/dbus-1-tqt.tar.gz link].
 
 
 
==== LIBART-LGPL ====
 
 
 
'''Libart''' is a library for high-performance 2D graphics used by '''Gnome''', '''KDE''' and '''TDE'''. The library release distributed with TDE is different from the standard one included in many Linux distributions. You are recommended to replace the installed version if any with the TDE provided one. To build a libart package please define some environment variables:
 
   PREFIX="/usr"
 
  MANDIR="/usr/man"
 
Then configure the source code:
 
  CFLAGS="${SLKCFLAGS}" \
 
  CXXFLAGS="${SLKCFLAGS}" \
 
  ./'''configure''' \
 
      ''--prefix=''${PREFIX} \
 
      ''--libdir=''${LIBDIR} \
 
      ''--build=''$ARCH-slackware-linux
 
A compressed archive containing the SlackBuild script and the related configuration files can be downloaded from the following [http://www.giustetti.net/resource/slackbuild/tde/1400/libart-lgpl.tar.gz link].
 
 
 
==== LIBCALDAV ====
 
 
 
The '''Libcaldav''' library implements the client side '''CALDAV''' protocol defined in the '''rfc4791''' paper. The library is used by the shared calendar included in the '''tdepim''' package. It is an add-on package. Some environment variables are needed to build '''libcaldav''':
 
  PREFIX="/usr/local"
 
  MANDIR="/usr/man"
 
Define the TQt3 library path:
 
  '''export''' QTDIR=${PREFIX_TDE}
 
Run the autogen.sh script to create all of the build scripts and configuration files:
 
  '''sh''' ./autogen.sh
 
Then configure the source code passing some parameters to the script:
 
   CFLAGS="${SLKCFLAGS}" \
 
  CXXFLAGS="${SLKCFLAGS}" \
 
  ./'''configure''' \
 
      ''--prefix=''${PREFIX} \
 
      ''--libdir=''${LIBDIR} \
 
      ''--mandir=''${MANDIR} \
 
      ''--build=''$ARCH-slackware-linux
 
A compressed archive containing the SlackBuild script and the related configuration files can be downloaded from the following [http://www.giustetti.net/resource/slackbuild/tde/1400/libcaldav.tar.gz link].
 
 
 
==== LIBCARDDAV ====
 
 
 
The '''Libcarddav''' library implements the '''CARDDAV''' protocol used by the '''tdepim''' package. '''Libcarddav''' is an add-on package providing some optional functionality. To build the package set some environment variables:
 
  PREFIX="/usr/local"
 
  MANDIR="/usr/man"
 
Define the TQt3 library path:
 
  '''export''' QTDIR=${PREFIX_TDE}
 
Run the autogen.sh script to create all of the build scripts and configuration files:
 
  '''sh''' ./autogen.sh
 
And configure the source code passing some parameters to the script:
 
  CFLAGS="${SLKCFLAGS}" \
 
  CXXFLAGS="${SLKCFLAGS}" \
 
  ./'''configure''' \
 
      ''--prefix=''${PREFIX} \
 
      ''--libdir=''${LIBDIR} \
 
      ''--mandir=''${MANDIR} \
 
      ''--build=''$ARCH-slackware-linux
 
Some lines of code in the script '''install the man pages'''. Those ''' should be commented out''' to avoid an error that aborts the whole build procedure.
 
   # Add man pages (No man page => Comment the following lines to avoid errors)
 
  # if [ -d ${PKG}/${MANDIR} ]; then
 
  #  gzip -9 $PKG/${MANDIR}/man?/*
 
  # fi
 
A compressed archive containing the SlackBuild script and the related configuration files can be downloaded from the following [http://www.giustetti.net/resource/slackbuild/tde/1400/libcarddav.tar.gz link].
 
 
 
==== SIP4-TQT ====
 
 
 
'''Sip''' is a tool that eases the creation of '''Python''' bindings for '''C''' or '''C++''' libraries. It was originally developed to bind Python to Qt, but can be used for any C or C++ library. As many other previously discussed packages, sip can be built setting some environment variables:
 
  PREFIX="/usr/local"
 
  MANDIR="/usr/man"
 
Setting a target path for man pages:
 
  '''export''' MANDIR
 
Adding to the standard compiler options some paths where to search for include files:
 
  SLKCFLAGS="${SLKCFLAGS} ''-I''/usr/include/tqt ''-I''/opt/trinity/include"
 
and finally running a configuration script written in Python:
 
  '''python''' configure.py \
 
      CFLAGS="${SLKCFLAGS}" \
 
      CXXFLAGS="${SLKCFLAGS}"
 
A compressed archive containing the SlackBuild script and the related configuration files can be downloaded from the following [http://www.giustetti.net/resource/slackbuild/tde/1400/sip4-tqt.tar.gz link].
 
 
 
==== TQCA ====
 
 
 
Another optional library, '''Tqca''' (TQt Cryptographic Architecture), provides an API to add cryptographic features to the Trinity Desktop Environment. Tqca has a small fingerprint and can be built recurring to some package specific steps:
 
 
 
Set some environment variables:
 
   PREFIX="/usr/local"
 
   MANDIR="/usr/man"
 
Set the installation path for the TQt library:
 
   '''export''' QTDIR=${PREFIX_TDE}
 
Pass the aforementioned variables as parameters to the configuration script:
 
  CFLAGS="${SLKCFLAGS}" \
 
  CXXFLAGS="${SLKCFLAGS}" \
 
  ./'''configure''' \
 
      ''--prefix=''${PREFIX} \
 
      ''--qtdir=''${QTDIR} \
 
Another peculiarity consists of the variable used to set the produced binary packages destination: '''INSTALL_ROOT''' in place of '''DESTDIR''', used by almost all of the packages.
 
  '''make''' install INSTALL_ROOT=${PKG}
 
When all variables are set the build process can be started running the '''make''' command.
 
 
 
A compressed archive containing the SlackBuild script and the related configuration files can be downloaded from the following [http://www.giustetti.net/resource/slackbuild/tde/1400/tqca.tar.gz link].
 
 
 
==== TQCA-TLS ====
 
 
 
'''Tqca-tls''' is a plug-in providing support for cryptography through a SSL/TLS channel for programs using the '''TQt Cryptographic Architecture'''. Perhaps the easiest package to build as the configure script sets sane values for all of its options. To build a working package you need to set the TQt library installation path:
 
  '''export''' QTDIR=${PREFIX}
 
Then execute the build script:
 
  CFLAGS="${SLKCFLAGS}" \
 
  CXXFLAGS="${SLKCFLAGS}" \
 
  ./'''configure''' \
 
       ''--qtdir=''${QTDIR}
 
As for '''tqca''', the only package peculiarity consists of the variable used to set a target directory for produced binary files: '''INSTALL_ROOT'''
 
  '''make''' install INSTALL_ROOT=${PKG}
 
 
 
A compressed archive containing the SlackBuild script and the related configuration files can be downloaded from the following [http://www.giustetti.net/resource/slackbuild/tde/1400/tqca-tls.tar.gz link].
 
 
 
==== TQT3 ====
 
 
 
'''TQt''' is a library providing all of the base widgets used by the desktop environment and as such has a fundamental importance. Building the package requires a great deal of time, but it relatively straightforward. First of all some environment variables are required:
 
  '''export''' LD_LIBRARY_PATH=/usr/lib${LIBDIRSUFFIX}:${TMP}/tmp-${PRGNAM}/${DIR_SRC}/lib:${TMP}/tmp-${PRGNAM}/build/lib
 
  '''export''' QTDIR=${PREFIX}
 
The '''LD_LIBRARY_PATH''' variable requires special care as it should point to the directory where intermediate binary files are stored. Files which are needed in later steps of the procedure. Set the wrong value and the build procedure will fail returning an error. Given the library complexity, the '''configure''' script is invoked with an option dense command line:
 
  LDFLAGS="${SLKLDFLAGS}" \
 
  CFLAGS="${SLKCFLAGS}" \
 
  CXXFLAGS="${SLKCFLAGS}" \
 
  ../${DIR_SRC}/'''configure''' \
 
      ''-cups'' \
 
      ''-dlopen-opengl'' \
 
      ''-enable-opengl'' \
 
      ''-I/usr/include/freetype2/freetype'' \
 
      ''-I/usr/include/mysql'' \
 
      ''-inputmethod'' \
 
      ''-ipv6'' \
 
      ''-L/usr/lib${LIBDIRSUFFIX}'' \
 
      ''-lfontconfig'' \
 
      ''-libdir ${PREFIX}/lib${LIBDIRSUFFIX}'' \
 
      ''-nis'' \
 
      ''-no-g++-exceptions'' \
 
      ''-no-pch'' \
 
      ''-platform linux-g++'' \
 
      ''-plugin-imgfmt-mng'' \
 
      ''-plugin-sql-mysql'' \
 
      ''-plugin-sql-sqlite'' \
 
      ''-plugin-style-cde'' \
 
      ''-plugin-style-compact'' \
 
      ''-plugin-style-motifplus'' \
 
      ''-plugin-style-platinum'' \
 
      ''-plugin-style-sgi'' \
 
      ''-plugin-style-windows'' \
 
      ''-prefix ${PREFIX}'' \
 
      ''-qt-gif'' \
 
      ''-qt-imgfmt-jpeg'' \
 
      ''-qt-imgfmt-mng'' \
 
      ''-qt-imgfmt-png'' \
 
      ''-qt-style-motif'' \
 
      ''-release'' \
 
      ''-R${TMP}/tmp-${PRGNAM}/lib'' \
 
      ''-shared'' \
 
      ''-sm'' \
 
      ''-stl'' \
 
      ''-system-libjpeg'' \
 
      ''-system-libmng'' \
 
      ''-system-libpng'' \
 
      ''-system-zlib'' \
 
      ''-thread'' \
 
      ''-tablet'' \
 
      ''-v'' \
 
      ''-xcursor'' \
 
      ''-xft'' \
 
      ''-xinerama'' \
 
      ''-xkb'' \
 
      ''-xrandr'' \
 
      ''-xrender'' \
 
      ''-xshape''
 
The '''make''' command requires running twice. The second time around to create symbolic links and some other stuff:
 
  '''make''' VERBOSE=1
 
  '''make''' install INSTALL_ROOT=${PKG}
 
  '''make''' -i symlinks sub-src sub-tool
 
  '''make''' install INSTALL_ROOT=${PKG}
 
Some other post build actions should be taken to add other symbolic links, configuration scripts,  and some files needed to ensure everything will run smoothly once installed:
 
  # Some configure scripts seem unable to find lib64 => Create a symlink to lib
 
  if [[ "x86_64" = "${ARCH}" ]]; then
 
      ln -sf ${PREFIX}/lib${LIBDIRSUFFIX} ${PKG}/${PREFIX}/lib
 
 
   fi
 
   fi
 
    
 
    
   # Adding a link to the include folder
+
   # Ensure correct login manager session file is available.
   mkdir -p ${PKG}/usr/include
+
   mkdir -p ${PKG}/usr/share/apps/tdm/sessions
   ln -sf ${PREFIX}/include ${PKG}/usr/include/${PRGNAM}
+
   cp ${PKG}/${PREFIX}/share/apps/tdm/sessions/tde.desktop ${PKG}/usr/share/apps/tdm/sessions/
 
    
 
    
   # Move the qt-mt.pc in the pkgconfig directory
+
   cat ${SRCDIR}/rc.4 | sed "s|PREFIX/|${PREFIX}/|g" > ${PKG}/etc/rc.d/rc.4.new
  if [[ ! -f ${PKG}/${PREFIX}/lib${LIBDIRSUFFIX}/pkgconfig/tqt-mt.pc ]]; then
+
 
      mkdir -p ${PKG}/${PREFIX}/lib${LIBDIRSUFFIX}/pkgconfig
+
  # In the old days these files were copied over existing ones. Folks who
      mv ${PKG}/${PREFIX}/lib${LIBDIRSUFFIX}/tqt-mt.pc ${PKG}/${PREFIX}/lib${LIBDIRSUFFIX}/pkgconfig/tqt-mt.pc
+
  # customized these files got smacked. Now they are created as *.new files.
  fi
+
  # The doinst.sh install script will either remove the .new extension or leave
  # Link for qt-mt.pc to the /usr/lib[64] directory
+
  # things be for the user to decide.
   mkdir -p ${PKG}/usr/lib${LIBDIRSUFFIX}/pkgconfig
+
  mkdir -p ${PKG}/etc/X11/xinit ${PKG}/etc/profile.d
  ln -sf ${PREFIX}/lib${LIBDIRSUFFIX}/pkgconfig/tqt-mt.pc ${PKG}/usr/lib${LIBDIRSUFFIX}/pkgconfig/tqt-mt.pc
+
  cat ${SRCDIR}/xinit/xinitrc.trinity | sed "s|PREFIX|${PREFIX}|g" > ${PKG}/etc/X11/xinit/xinitrc.trinity.new
 +
  cat ${SRCDIR}/profile.d/trinity.sh  | sed "s|PREFIX|${PREFIX}|g" > ${PKG}/etc/profile.d/trinity.sh.new
 +
   cat ${SRCDIR}/profile.d/trinity.csh | sed "s|PREFIX|${PREFIX}|g" > ${PKG}/etc/profile.d/trinity.csh.new
 +
  # Assign some sane permissions to the scripts.
 +
  chmod 755 ${PKG}/etc/X11/xinit/xinitrc.*.new ${PKG}/etc/profile.d/*.*.new
 
    
 
    
   # Fix some bad links
+
   # Copy desktop environment start script.
   if [[ -d ${PKG}/${PREFIX}/lib${LIBDIRSUFFIX}/${PRGNAM}/mkspecs/linux-g++ ]]; then
+
   if [[ -f ${PKG}/${PREFIX}/bin/starttde ]]; then
      if [[ -L ${PKG}/${PREFIX}/lib${LIBDIRSUFFIX}/${PRGNAM}/mkspecs/linux-g++/linux-g++ ]]; then
+
       mkdir -p ${PKG}/usr/bin
        unlink ${PKG}/${PREFIX}/lib${LIBDIRSUFFIX}/${PRGNAM}/mkspecs/linux-g++/linux-g++
+
       cp ${PKG}/${PREFIX}/bin/starttde ${PKG}/usr/bin/starttde.new
      fi
 
      ln -sf ${PREFIX}/lib${LIBDIRSUFFIX}/${PRGNAM}/mkspecs/linux-g++ ${PKG}/${PREFIX}/lib${LIBDIRSUFFIX}/${PRGNAM}/mkspecs/linux-g++/linux-g++
 
      if [[ -L ${PKG}/${PREFIX}/lib${LIBDIRSUFFIX}/${PRGNAM}/mkspecs/default ]]; then
 
        unlink ${PKG}/${PREFIX}/lib${LIBDIRSUFFIX}/${PRGNAM}/mkspecs/default
 
      fi
 
      ln -sf ${PREFIX}/lib${LIBDIRSUFFIX}/${PRGNAM}/mkspecs/linux-g++ ${PKG}/${PREFIX}/lib${LIBDIRSUFFIX}/${PRGNAM}/mkspecs/default
 
  elif [[ -d ${PKG}/${PREFIX}/mkspecs/linux-g++ ]]; then
 
       if [[ -L ${PKG}/${PREFIX}/mkspecs/linux-g++/linux-g++ ]]; then
 
        unlink ${PKG}/${PREFIX}/mkspecs/linux-g++/linux-g++
 
      fi
 
      ln -sf ${PREFIX}/mkspecs/linux-g++ ${PKG}${PREFIX}/mkspecs/linux-g++/linux-g++
 
       if [[ -L ${PKG}/${PREFIX}/mkspecs/default ]]; then
 
        unlink ${PKG}/${PREFIX}/mkspecs/default
 
      fi
 
      ln -sf ${PREFIX}/mkspecs/linux-g++ ${PKG}/${PREFIX}/mkspecs/default
 
 
   fi
 
   fi
 
+
   mkdir -p ${PKG}/usr/bin
  # Create and populate the profile.d directory
+
   cat ${SRCDIR}/xinit/xwmconfig > ${PKG}/usr/bin/xwmconfig.new
   mkdir -p ${PKG}/etc/profile.d
+
   chmod +x ${PKG}/usr/bin/xwmconfig.new
  # Put profile.d scripts in package TQT installation path.
+
</syntaxhighlight>
   cat ${SRCDIR}/profile.d/tqt3.sh  | sed -e "s:TDE_PREFIX:${PREFIX}:" > ${PKG}/etc/profile.d/tqt3.sh
+
 
   cat ${SRCDIR}/profile.d/tqt3.csh | sed -e "s:TDE_PREFIX:${PREFIX}:" > ${PKG}/etc/profile.d/tqt3.csh
+
A compressed archive containing the SlackBuild script and the related configuration files can be downloaded from the following [http://www.giustetti.net/resource/slackbuild/tde/1400/tdebase.tar.gz link].
 
+
 
  chmod 755 ${PKG}/etc/profile.d/*
+
==== TDELIBS ====
As usual a compressed archive containing the SlackBuild script and the related configuration files can be downloaded from the following [http://www.giustetti.net/resource/slackbuild/tde/1400/tqt3.tar.gz link].
+
 
 +
Package '''tdelibs''' includes a set of libraries serving as foundation for the Trinity Desktop Environment. Tdelibs were built upon the '''TQt3''' framework with the intent to ease application writing while maintaining consistency in look and base functionality. Among other functionality tdelibs provides:
 +
* Classes for inter process communication handling ('''dcop''').
 +
* Shared access to the TDE address book ('''tdeabc''').
 +
* Standard widgets for application interfaces design adding to the QT provided ones ('''tdedeui''').
 +
* Feature rich '''HTML and Javascript engines''' ('''tdehtml''' and '''kjs''').
 +
* A program to start the environment ('''tdeinit''').
 +
* Low level access to input / output network data streams ('''tdeio''').
 +
* A standard way to reuse parts of an application in another one ('''tdeparts''').
 +
* Printing process control functions ('''tdeprint''').
 +
* OpenSSL integration ('''kssl''').
 +
* High level reusable functions as "Find and Replace" ('''tdeutils''').
 +
* A '''MIDI''' management library ('''libtdemid''').
  
==== TQTINTERFACE ====
+
To configure the source code, please run [http://www.cmake.org/ cmake] passing it the '''-DCMAKE_SKIP_RPATH''' option and some other useful parameters:
 +
<syntaxhighlight lang="bash">
 +
  cmake ${TMP}/tmp-${PRGNAM}/${DIR_SRC} \
 +
      -DCMAKE_C_FLAGS:STRING="${SLKCFLAGS}" \
 +
      -DCMAKE_CXX_FLAGS:STRING="${SLKCFLAGS} $DEBUG_CMAKE_OPT" \
 +
      -DCMAKE_INSTALL_PREFIX=${PREFIX} \
 +
      -DCMAKE_SKIP_RPATH="OFF" \
 +
      -DLIB_SUFFIX=${LIBDIRSUFFIX} \
 +
      -DMAN_INSTALL_DIR=${MANDIR} \
 +
      -DSYSCONF_INSTALL_DIR=${SYSCONFDIR} \
 +
      -DBUILD_ALL=ON
 +
</syntaxhighlight>
 +
Then run the '''make''' command.
  
The '''Trinity Qt Interface''' is a library that abstracts Qt from Trinity. The abstraction layer allows to use both applications linked to TQt and Qt4 in a transparent way permitting both environments to coexist. To work correctly '''TQtinterface''' should be installed in directory '''/usr'''. To build the package set some environment variables:
+
A compressed archive containing the SlackBuild script and the related configuration files can be downloaded from the following [http://www.giustetti.net/resource/slackbuild/tde/1400/tdelibs.tar.gz link].
  PREFIX="/usr"
 
  MANDIR="/usr/man"
 
Then run '''[http://www.cmake.org/ cmake]''' passing it some configuration options of which '''-DQT_VERSION=3''' is worth mentioning:
 
  '''cmake''' ${TMP}/tmp-${PRGNAM}/${DIR_SRC} \
 
      ''-DCMAKE_C_FLAGS:STRING=''"${SLKCFLAGS}" \
 
      ''-DCMAKE_CXX_FLAGS:STRING=''"${SLKCFLAGS} $DEBUG_CMAKE_OPT" \
 
      ''-DCMAKE_INSTALL_PREFIX=''${PREFIX} \
 
      ''-DLIB_SUFFIX=''${LIBDIRSUFFIX} \
 
      ''-DMAN_INSTALL_DIR=''${MANDIR} \
 
      ''-DQT_VERSION=3'' \
 
      ''-DSYSCONF_INSTALL_DIR=''${SYSCONFDIR} \
 
      ''-DBUILD_ALL=ON''
 
A compressed archive containing the SlackBuild script and the related configuration files can be downloaded from the following [http://www.giustetti.net/resource/slackbuild/tde/1400/tqtinterface.tar.gz link].
 
  
 
=== Conclusions ===
 
=== Conclusions ===
  
The present paper presented and discussed the procedure to build '''Prerequisites''' packages for the '''Trinity Desktop Environment'''. Some general rules common to the whole project were described along with options specific to packages. Finally links for all of the used '''SlackBuild''' scripts were provided in the hope for them to be useful to '''Slackware Linux''' users wishing to give a try at building the desktop environment from scratch.
+
This paper presented and discussed the procedure to build '''Base''' packages for the '''Trinity Desktop Environment'''. Options specific to each package were discussed and a copy of all the used '''SlackBuild''' scripts were provided in the hope for them to be useful to '''Slackware Linux''' users wishing to give a try at building the desktop environment from scratch.
  
  
Line 533: Line 167:
 
* [http://www.slackware.com Slackware home page]
 
* [http://www.slackware.com Slackware home page]
 
* [http://slackbuilds.org SlackBuilds.org home page]
 
* [http://slackbuilds.org SlackBuilds.org home page]
 +
* [https://github.com/chjj/compton Compton home page]
  
 
----
 
----
  
Languages: '''English''' - [http://www.giustetti.net/wiki/index.php?title=TDE_14.0.0_prerequisiti Italiano]
+
{{footer_en | link_page=TDE_14.0.0_pacchetti_base}}

Revision as of 14:09, 21 December 2016

Welcome to Simone Giustetti's wiki pages.


Languages: English - Italiano


Base Packages

Trinity Desktop Environment 14.0.0

You built and installed TDE prerequisites packages it's now time to move on to the real desktop environment. Being a huge and complex environment its source code is split among several packages, around thirty, depending on its scope and the functions it provides. All main daemons and bulk applications are grouped among two packages only labeled base packages: tdelibs and tdebase. The two packages together make up the Trinity Desktop Environment skeleton and should be installed first. After installing both packages it will be possible to start the desktop environment and test some basic functionality like creating and moving a window, starting an application, but not much more. All of the programs and configuration tools making TDE useful and productive won't be available.

Build System

In accordance to the Trinity project goals, both packages were successfully migrated to cmake a tool that can be used to configure and build the source code.

Common Build Script Structure

Code written for the prerequisite packages build scripts was reused as much as possible to maintain a certain degree of homogeneity. Please check the corresponding page for better details: Common Build Script Structure.

Generic Options

Generic options used for both packages uniform to the ones detailed in the cmake section of the TDE prerequisites page. You are again welcome to check the related page for further details: Generic Options.

Custom Options

Building both tdebase and tedelibs obviously required for some custom options. The former of the two in greater part, due to its targeted goal, required quite a lot of customization. Package specific options are detailed below together with links to download each SlackBuild script. Scripts are provided in order to help whoever wishes to build working packages from the source code archives.

TDEBASE

Tdebase is the Trinity Desktop Environment main package. It contains base libraries, files, configuration tools and all of the applications needed to run the environment. Together with tdelibs, tdebase makes up a minimal desktop environment which other TDE packages grow and expand adding functionality and tools. Tdebase includes some general purpose applications such as the file manager and the configuration programs. Among the many included programs are:

  • The control center (kcontrol).
  • The desktop log-in manager (tdm).
  • TDE integrated manual (khelpcenter).
  • TDE panel (kicker).
  • TDE web browser and integrated file manager (konqueror).
  • The terminal emulator (konsole).
  • The window manager (twin).
  • The desktop environment start-up script (starttde).

The tdebase package includes some window managers: programs that draw application windows on screen. A new window manager was introduced in TDE 14.0.0: Compton that replaces the old, out of support, no more in development Kompmgr composition manager which once shipped with KDE 3. Sadly the TDE distributed version of Compton is afflicted by some compile issues making it impossible to build a working binary file. As a temporary work around the SlackBuild script removes the Compton dependency:

   ( cd ${TMP}/tmp-${PRGNAM}/${DIR_SRC}; sed -i "twin/CMakeLists.txt" -e "/compton-tde/ s/^/#/" )

Therefore the window manager won't be built.

It is worth mentioning that the standard Compton version, unlike the one shipped with TDE, presents no issue. Were You interested in testing the window manager Your best bet consists of building the standard package recurring to the build scripts available from the project slackbuilds.org web page.

To configure and build the package recurring to cmake a lot of parameters are required. A likely command line should look something like:

   cmake ${TMP}/tmp-${PRGNAM}/${DIR_SRC} \
      -DCMAKE_C_FLAGS:STRING="${SLKCFLAGS}" \
      -DCMAKE_CXX_FLAGS:STRING="${SLKCFLAGS} $DEBUG_CMAKE_OPT" \
      -DCMAKE_INSTALL_PREFIX=${PREFIX} \
      -DCMAKE_SKIP_RPATH="OFF" \
      -DLIB_SUFFIX=${LIBDIRSUFFIX} \
      -DMAN_INSTALL_DIR=${MANDIR} \
      -DSYSCONF_INSTALL_DIR=${SYSCONFDIR} \
      -DBUILD_CRASHTEST=ON \
      -DWITH_ARTS=ON \
      -DWITH_HAL=OFF \
      -DWITH_LDAP=ON \
      -DWITH_LIBRAW1394=ON \
      -DWITH_OPENEXR=ON \
      -DWITH_PAM=OFF \
      -DWITH_GCC_VISIBILITY=OFF \
      -DWITH_SAMBA=ON \
      -DWITH_SASL=ON \
      -DWITH_SHADOW=ON \
      -DWITH_TDEHWLIB=ON \
      -DWITH_USBIDS="/usr/share/hwdata/usb.ids" \
      -DWITH_XCOMPOSITE=ON \
      -DWITH_XCURSOR=ON \
      -DWITH_XDAMAGE=ON \
      -DWITH_XDMCP=ON \
      -DWITH_XEXT=ON \
      -DWITH_XFIXES=ON \
      -DWITH_XINERAMA=ON \
      -DWITH_XRANDR=ON \
      -DWITH_XRENDER=ON \
      -DWITH_XTEST=ON \
      -DBUILD_ALL=ON

After compiling the source code and installing the obtained binary files some tasks need taking care of: adding scripts, configuration files and some more stuff needed by the environment to work flawlessly:

   # Add some configuration files / scripts needed by TDE.
   mkdir -p ${PKG}/etc/trinity
   mkdir -p ${PKG}/etc/rc.d
   mv ${PKG}/${PREFIX}/share/config/tdm ${PKG}/etc/trinity/tdm
   ( cd ${PKG}/${PREFIX}/share/config ; ln -sf /etc/trinity/tdm tdm )
   
   # Set sane permissions for the include files.
   if [ -d ${PKG}/${PREFIX}/include ]; then
      find ${PKG}/${PREFIX}/include -type f -exec chmod 0644 {} \;
   fi
   
   # Ensure correct login manager session file is available.
   mkdir -p ${PKG}/usr/share/apps/tdm/sessions 
   cp ${PKG}/${PREFIX}/share/apps/tdm/sessions/tde.desktop ${PKG}/usr/share/apps/tdm/sessions/
   
   cat ${SRCDIR}/rc.4 | sed "s|PREFIX/|${PREFIX}/|g" > ${PKG}/etc/rc.d/rc.4.new
   
   # In the old days these files were copied over existing ones. Folks who
   # customized these files got smacked. Now they are created as *.new files.
   # The doinst.sh install script will either remove the .new extension or leave
   # things be for the user to decide.
   mkdir -p ${PKG}/etc/X11/xinit ${PKG}/etc/profile.d
   cat ${SRCDIR}/xinit/xinitrc.trinity | sed "s|PREFIX|${PREFIX}|g" > ${PKG}/etc/X11/xinit/xinitrc.trinity.new
   cat ${SRCDIR}/profile.d/trinity.sh  | sed "s|PREFIX|${PREFIX}|g" > ${PKG}/etc/profile.d/trinity.sh.new
   cat ${SRCDIR}/profile.d/trinity.csh | sed "s|PREFIX|${PREFIX}|g" > ${PKG}/etc/profile.d/trinity.csh.new
   # Assign some sane permissions to the scripts.
   chmod 755 ${PKG}/etc/X11/xinit/xinitrc.*.new ${PKG}/etc/profile.d/*.*.new
   
   # Copy desktop environment start script.
   if [[ -f ${PKG}/${PREFIX}/bin/starttde ]]; then
      mkdir -p ${PKG}/usr/bin
      cp ${PKG}/${PREFIX}/bin/starttde ${PKG}/usr/bin/starttde.new
   fi
   mkdir -p ${PKG}/usr/bin
   cat ${SRCDIR}/xinit/xwmconfig > ${PKG}/usr/bin/xwmconfig.new
   chmod +x ${PKG}/usr/bin/xwmconfig.new

A compressed archive containing the SlackBuild script and the related configuration files can be downloaded from the following link.

TDELIBS

Package tdelibs includes a set of libraries serving as foundation for the Trinity Desktop Environment. Tdelibs were built upon the TQt3 framework with the intent to ease application writing while maintaining consistency in look and base functionality. Among other functionality tdelibs provides:

  • Classes for inter process communication handling (dcop).
  • Shared access to the TDE address book (tdeabc).
  • Standard widgets for application interfaces design adding to the QT provided ones (tdedeui).
  • Feature rich HTML and Javascript engines (tdehtml and kjs).
  • A program to start the environment (tdeinit).
  • Low level access to input / output network data streams (tdeio).
  • A standard way to reuse parts of an application in another one (tdeparts).
  • Printing process control functions (tdeprint).
  • OpenSSL integration (kssl).
  • High level reusable functions as "Find and Replace" (tdeutils).
  • A MIDI management library (libtdemid).

To configure the source code, please run cmake passing it the -DCMAKE_SKIP_RPATH option and some other useful parameters:

   cmake ${TMP}/tmp-${PRGNAM}/${DIR_SRC} \
      -DCMAKE_C_FLAGS:STRING="${SLKCFLAGS}" \
      -DCMAKE_CXX_FLAGS:STRING="${SLKCFLAGS} $DEBUG_CMAKE_OPT" \
      -DCMAKE_INSTALL_PREFIX=${PREFIX} \
      -DCMAKE_SKIP_RPATH="OFF" \
      -DLIB_SUFFIX=${LIBDIRSUFFIX} \
      -DMAN_INSTALL_DIR=${MANDIR} \
      -DSYSCONF_INSTALL_DIR=${SYSCONFDIR} \
      -DBUILD_ALL=ON

Then run the make command.

A compressed archive containing the SlackBuild script and the related configuration files can be downloaded from the following link.

Conclusions

This paper presented and discussed the procedure to build Base packages for the Trinity Desktop Environment. Options specific to each package were discussed and a copy of all the used SlackBuild scripts were provided in the hope for them to be useful to Slackware Linux users wishing to give a try at building the desktop environment from scratch.


For any feedback, questions, errors and such, please e-mail me at studiosg [at] giustetti [dot] net


External links





Languages: English - Italiano