Building KDE Frameworks 6.8.0 (KF6)

KDE Frameworks is a collection of libraries based on top of Qt6 and QML derived from the previous KDE libraries. They can be used independent of the KDE Display Environment (Plasma 6).

[Note]

Note

Development versions of BLFS may not build or run some packages properly if LFS or dependencies have been updated since the most recent stable versions of the books.

The instructions below build all of the KDE Frameworks packages in one step by using a bash script.

Package Information

KF6 Dependencies

Required

extra-cmake-modules-6.8.0, breeze-icons-6.8.0, docbook-xml-4.5, docbook-xsl-nons-1.79.2, libcanberra-0.30, libgcrypt-1.11.0, libical-3.0.18, libxslt-1.1.42, lmdb-0.9.31, qca-2.3.9, qrencode-4.1.1, plasma-wayland-protocols-1.14.0, PyYAML-6.0.2, shared-mime-info-2.4, URI-5.31, and Wget-1.25.0 (required to download the packages)

Recommended

Optional

BlueZ-5.79 (needed to build Bluez-Qt), Datamatrix (deemed recommended for Prison by upstream)

Runtime dependency for FrameworkIntegration

Noto fonts

Additional recommended dependencies for kapidox

Additional image formats support in KImageFormats

libavif-1.1.1, libjxl-0.11.1, libraw-0.21.3, libheif, OpenEXR

Optional dependencies for Solid

UDisks-2.10.1, UPower-1.90.6 and media-player-info (runtime)

Optional dependency for KWallet

GPGME-1.24.0, built with C++ bindings (which is the default).

Optional dictionary backends for Sonnet

Hspell and Hunspell

Downloading KDE Frameworks

The easiest way to get the KDE Frameworks packages is to use a single wget to fetch them all at once:

url=https://download.kde.org/stable/frameworks/6.8/
wget -r -nH -nd -A '*.xz' -np $url

The options used here are:
  -r            recurse through child directories
  -nH           disable generation of host-prefixed directories
  -nd           do not create a hierarchy of directories
  -A '*.xz'     just get the *.xz files
  -np           don't get parent directories

Setting Package Order

The order of building files is important due to internal dependencies. Create the list of files in the proper order as follows:

cat > frameworks-6.8.0.md5 << "EOF"
2d9fdfe58f8f9072ad16dc3e694cdd20  attica-6.8.0.tar.xz
#3fd5f17c92a23573b85521b906729a9f  extra-cmake-modules-6.8.0.tar.xz
fb45455d5cf7d05fdef11af88cae8455  kapidox-6.8.0.tar.xz
408709df7bd8ea9112c74fac2df73966  karchive-6.8.0.tar.xz
013006a23ae86ea7298c6312317c036b  kcodecs-6.8.0.tar.xz
5e0eac3ec1a2b04c16911b5255a2f48f  kconfig-6.8.0.tar.xz
32197ffb27146dca40e5a7852a56d696  kcoreaddons-6.8.0.tar.xz
daa538ba52be5edde65b836628ce20d3  kdbusaddons-6.8.0.tar.xz
c360668f28f50ea1fe7e97bb7f113d27  kdnssd-6.8.0.tar.xz
cc862286f3ee47174abfb9c565260921  kguiaddons-6.8.0.tar.xz
0de301c5b79ef8e75edaeb59c9f8b408  ki18n-6.8.0.tar.xz
593ae4b601369f10e9f1df7ed77e24b7  kidletime-6.8.0.tar.xz
aea64ceeb89092f0d3608f778e18ea68  kimageformats-6.8.0.tar.xz
8731b07c65c1f75a50d3e4a0c61fa1d8  kitemmodels-6.8.0.tar.xz
33aeab1bc638638f5f660d812632e807  kitemviews-6.8.0.tar.xz
0719bd5a0bba2806fb300b353c2cf8b9  kplotting-6.8.0.tar.xz
b6c33e2a42c5c3bfc30cc5bb5f7b8d82  kwidgetsaddons-6.8.0.tar.xz
0e76d9791e12a314c05e6f4e93585999  kwindowsystem-6.8.0.tar.xz
c811350927525bf652782afa92af26c6  networkmanager-qt-6.8.0.tar.xz
922f22f010b72a911952ba8e31a62b5f  solid-6.8.0.tar.xz
f9e39780d428b9138abd6651254144c6  sonnet-6.8.0.tar.xz
a2622f3e9d041950c975492e7c49f7dc  threadweaver-6.8.0.tar.xz
8d384e12da412634c2d07b2eb0fb6de6  kauth-6.8.0.tar.xz
b4e735facbbe4d511cdd4bd5b0d9f1bd  kcompletion-6.8.0.tar.xz
ad8570c1cfa7c937752e483bd2ddbdba  kcrash-6.8.0.tar.xz
4b95a09e51fc820fa513e00b5cbdcd0e  kdoctools-6.8.0.tar.xz
417acfbbab4cb8e0c4048258bda1ca2a  kpty-6.8.0.tar.xz
fc62144b71be430ab9554d718bdf0729  kunitconversion-6.8.0.tar.xz
a7516398c7d0420e86d821a7f70cad49  kcolorscheme-6.8.0.tar.xz
d8e34aae901be5c5ad0a4b4fdf94f884  kconfigwidgets-6.8.0.tar.xz
cecaa900460c042da69b57b10fbd101e  kservice-6.8.0.tar.xz
846533d53770f264b2900312a2bc1913  kglobalaccel-6.8.0.tar.xz
3d04ffbbcafff3e1ceccdcdbca37bfcd  kpackage-6.8.0.tar.xz
2c19b9f1478efed539b0ed7a7c2b245e  kdesu-6.8.0.tar.xz
c1dd6767b5f0330a0515613e0b1dbaa9  kiconthemes-6.8.0.tar.xz
ae413bc767e9900cf2da2d6e2757148d  knotifications-6.8.0.tar.xz
de08ee1e2869de9734a3e11bbdd26e53  kjobwidgets-6.8.0.tar.xz
d3d95c775b1b7015813deeed48f5e298  ktextwidgets-6.8.0.tar.xz
c9dfd32c4e40bbd14ac21eb38f4e32a9  kxmlgui-6.8.0.tar.xz
87d55e41a99578a0e262c2b4e4f8bda7  kbookmarks-6.8.0.tar.xz
2ad9372d8b3b28ac6853fe54af4cebd6  kwallet-6.8.0.tar.xz
f859c93e77bb879ef8079f36623159ed  kded-6.8.0.tar.xz
44527b580c890ba91c44241237d73442  kio-6.8.0.tar.xz
89c271020e65d122a16d7a10defab0bd  kdeclarative-6.8.0.tar.xz
526acf1b1de2b5ddcdefdc2918c322eb  kcmutils-6.8.0.tar.xz
1ded40b7ee2d09a01369b581d786703b  kirigami-6.8.0.tar.xz
96eac989d36de61379d61b710c943ab9  syndication-6.8.0.tar.xz
cd59b143973690f6733a21fa315c06f1  knewstuff-6.8.0.tar.xz
589f8266772efdeec422ab4bf4735099  frameworkintegration-6.8.0.tar.xz
b52cc36c0ce41080204d18f4f74af00b  kparts-6.8.0.tar.xz
2e955fd3f615b550fccb3c6cace0c8f7  syntax-highlighting-6.8.0.tar.xz
04dfe65d3801ec230d70a822083053a5  ktexteditor-6.8.0.tar.xz
70756aa9e778ec42f3b28f61792e22c2  modemmanager-qt-6.8.0.tar.xz
f03b9127cf6f2a233db5724f94143c14  kcontacts-6.8.0.tar.xz
4df151371e5c3e02a1ade0ab86b56c4b  kpeople-6.8.0.tar.xz
1844aa657ba14d994b6a734eb63b8d95  bluez-qt-6.8.0.tar.xz
9a23092425f64c767e8ecc58a98ee698  kfilemetadata-6.8.0.tar.xz
4d2d84943c1461b94d362a803ed92cec  baloo-6.8.0.tar.xz
#a21fa7ce7acb64889e20c10af3f66cb1  breeze-icons-6.8.0.tar.xz
dc025407d2276164a25523d14142df5b  krunner-6.8.0.tar.xz
4bd49df3243ac08e6f78bdaceeac0365  prison-6.8.0.tar.xz
41c45c5298e49c15471d36dc3158b6db  qqc2-desktop-style-6.8.0.tar.xz
1f78e9612f26b1a3ae45b9a6161c3fee  kholidays-6.8.0.tar.xz
eecce2361cb20578743695c3d3d60367  purpose-6.8.0.tar.xz
91cb8c2474f71b3394f6b2b4db020040  kcalendarcore-6.8.0.tar.xz
00bc7cc22687c371aeb66c099351cf4f  kquickcharts-6.8.0.tar.xz
1c268fd13f26d6311cdb33a95f128a5c  knotifyconfig-6.8.0.tar.xz
89116274898f0eadc6ab50ea50e0e232  kdav-6.8.0.tar.xz
12f26f9a21be590a959af9d5d1b510f8  kstatusnotifieritem-6.8.0.tar.xz
69c63bbbaf2b087106df2e7792128760  ksvg-6.8.0.tar.xz
3f0c348c892b5d922293c77c99114fd2  ktexttemplate-6.8.0.tar.xz
91055b3ec8897bd879df1ad39dec98f1  kuserfeedback-6.8.0.tar.xz
EOF

In the above list, notice that some files have been commented out with a hash (#) character.

Installation of KDE Frameworks

[Note]

Note

When installing multiple packages in a script, the installation needs to be done as the root user. There are three general options that can be used to do this:

  1. Run the entire script as the root user (not recommended).

  2. Use the sudo command from the Sudo-1.9.16p2 package.

  3. Use su -c "command arguments" (quotes required) which will ask for the root password for every iteration of the loop.

One way to handle this situation is to create a short bash function that automatically selects the appropriate method. Once the command is set in the environment, it does not need to be set again.

as_root()
{
  if   [ $EUID = 0 ];        then $*
  elif [ -x /usr/bin/sudo ]; then sudo $*
  else                            su -c \\"$*\\"
  fi
}

export -f as_root
[Caution]

Caution

If installing in /opt and there is an existing /opt/kf6 either as a regular directory or a symbolic link, it should be reinitialized (as root):

mv -v /opt/kf6 /opt/kf6.old                         &&
install -v -dm755           $KF6_PREFIX/{etc,share} &&
ln -sfv /etc/dbus-1         $KF6_PREFIX/etc         &&
ln -sfv /usr/share/dbus-1   $KF6_PREFIX/share       &&
ln -sfv /usr/share/polkit-1 $KF6_PREFIX/share

First, start a subshell that will exit on error:

bash -e

Install all of the packages by running the following commands:

while read -r line; do

    # Get the file name, ignoring comments and blank lines
    if $(echo $line | grep -E -q '^ *$|^#' ); then continue; fi
    file=$(echo $line | cut -d" " -f2)

    pkg=$(echo $file|sed 's|^.*/||')          # Remove directory
    packagedir=$(echo $pkg|sed 's|\.tar.*||') # Package directory

    name=$(echo $pkg|sed 's|-6.*$||') # Isolate package name

    tar -xf $file
    pushd $packagedir

      # kapidox is a python module
      case $name in
        kapidox)
          pip3 wheel -w dist --no-build-isolation --no-deps --no-cache-dir $PWD
          as_root pip3 install --no-index --find-links=dist --no-cache-dir --no-user kapidox
          popd
          rm -rf $packagedir
          continue
          ;;
      esac

      mkdir build
      cd    build

      cmake -D CMAKE_INSTALL_PREFIX=$KF6_PREFIX \
            -D CMAKE_INSTALL_LIBEXECDIR=libexec \
            -D CMAKE_PREFIX_PATH=$QT6DIR        \
            -D CMAKE_SKIP_INSTALL_RPATH=ON      \
            -D CMAKE_BUILD_TYPE=Release         \
            -D BUILD_TESTING=OFF                \
            -W no-dev ..
      make
      as_root make install
    popd

  as_root rm -rf $packagedir
  as_root /sbin/ldconfig

done < frameworks-6.8.0.md5

exit
[Note]

Note

Any modules that have been omitted can be installed later by using the same mkdir build; cd build; cmake; make; make install procedure as above.

Useless systemd units have been installed in $KF6_PREFIX/lib. Remove them now (as root):

rm -rf $KF6_PREFIX/lib/systemd

Sometimes the installation paths are hardcoded into installed files. If the installed directory is not /usr, rename the directory and create a symlink:

mv -v /opt/kf6 /opt/kf6-6.8.0
ln -sfvn kf6-6.8.0 /opt/kf6

Command Explanations

-D CMAKE_PREFIX_PATH=$QT6DIR: This switch is used to allow cmake to find the proper Qt libraries.

-D CMAKE_BUILD_TYPE=Release: This switch is used to apply higher level of the compiler optimizations.

-D BUILD_TESTING=OFF: This switch is used to prevent building test programs and libraries that are of no use to an end user.

Contents

Installed Programs: balooctl, baloo_file, baloo_file_extractor, baloosearch, balooshow, checkXML6, depdiagram-generate, depdiagram-generate-all, depdiagram-prepare, desktoptojson, gentrigrams, kactivities-cli, kapidox_generate, kate-syntax-highlighter, kbuildsycoca6, kcookiejar6, kdebugdialog6, kded6, kdeinit6, kdeinit6_shutdown, kdeinit6_wrapper, kf6-config, kf6kross, kgendesignerplugin, kglobalaccel6, kiconfinder6, kjs6, kjscmd6, kjsconsole, knewstuff-dialog, kpackagelauncherqml, kpackagetool6, kquitapp6, kreadconfig6, kshell6, ktelnetservice6, ktrash6, kwalletd6, kwallet-query, kwrapper6, kwriteconfig6, meinproc6, parsetrigrams, plasmapkg2, preparetips6, protocoltojson, and solid-hardware6
Installed Libraries: libkdeinit6_klauncher.so, libKF6Activities.so, libKF6ActivitiesStats.so, libKF6Archive.so, libKF6Attica.so, libKF6AuthCore.so, libKF6Auth.so, libKF6Baloo.so, libKF6BluezQt.so, libKF6Bookmarks.so, libKF6CalendarCore.so, libKF6CalendarEvents.so, libKF6Codecs.so, libKF6Completion.so, libKF6ConfigCore.so, libKF6ConfigGui.so, libKF6ConfigWidgets.so, libKF6Contacts.so, libKF6CoreAddons.so, libKF6Crash.so, libKF6DAV.so, libKF6DBusAddons.so, libKF6Declarative.so, libKF6DNSSD.so, libKF6DocTools.so, libKF6Emoticons.so, libKF6FileMetaData.so, libKF6GlobalAccel.so, libKF6GuiAddons.so, libKF6Holidays.so, libKF6I18n.so, libKF6IconThemes.so, libKF6IdleTime.so, libKF6ItemModels.so, libKF6ItemViews.so, libKF6JobWidgets.so, libKF6JSApi.so, libKF6JsEmbed.so, libKF6JS.so, libKF6KCMUtils.so, libKF6KDELibs4Support.so, libKF6KHtml.so, libKF6KIOCore.so, libKF6KIOFileWidgets.so, libKF6KIOGui.so, libKF6KIONTLM.so, libKF6KIOWidgets.so, libKF6Kirigami2.so, libKF6KrossCore.so, libKF6KrossUi.so, libKF6MediaPlayer.so, libKF6NetworkManagerQt.so, libKF6NewStuffCore.so, libKF6NewStuff.so, libKF6Notifications.so, libKF6NotifyConfig.so, libKF6Package.so, libKF6Parts.so, libKF6PeopleBackend.so, libKF6People.so, libKF6PeopleWidgets.so, libKF6PlasmaQuick.so, libKF6Plasma.so, libKF6Plotting.so, libKF6Prison.so, libKF6Pty.so, libKF6Purpose.so, libKF6PurposeWidgets.so, libKF6QuickAddons.so, libKF6Runner.so, libKF6Service.so, libKF6Solid.so, libKF6SonnetCore.so, libKF6SonnetUi.so, libKF6Style.so, libKF6Su.so, libKF6SyntaxHighlighting.so, libKF6TextEditor.so, libKF6TextWidgets.so, libKF6ThreadWeaver.so, libKF6UnitConversion.so, libKF6Wallet.so, libKF6WaylandClient.so, libKF6WaylandServer.so, libKF6WidgetsAddons.so, libKF6WindowSystem.so, libKF6XmlGui.so, libKF6XmlRpcClient.so, and libkwalletbackend6.so
Installed Directories: /opt/kf6 (symlink to /opt/kf6-6.8.0) if installing in /opt

Short Descriptions

checkXML6

is a tool to check for syntax errors in KDE DocBook XML files

depdiagram-generate

is a tool to generate a dependency diagram

depdiagram-generate-all

is a tool to generate a dependency diagram for all frameworks at once

depdiagram-prepare

is a tool to prepare dot files

desktoptojson

is a tool to convert a .desktop file to a .json file

kbuildsycoca6

rebuilds the KService desktop file system configuration cache

kcookiejar6

is a command line interface to the HTTP cookie store used by KDE, a D-BUS service to store/retrieve/clean cookies

kded6

consolidates several small services in one process

kdeinit6

is a process launcher somewhat similar to the famous init used for booting UNIX

kf6-config

is a command line program used to retrieve information about KDE installation or user paths

kf6kross

executes kross scripts written in KDE Javascript, Python, Ruby, Java and Falcon

kgendesignerplugin

generates widget plugins for Qt(TM) Designer

kglobalaccel6

is a daemon use to register the key bindings and for getting notified when the action triggered

kjs6

is KDE ECMAScript/JavaScript engine

kjscmd6

is a tool for launching KJSEmbed scripts from the command line

kjsconsole

is a console for kjs6

kpackagelauncherqml

is a commandline tool for launching kpackage QML application

kpackagetool6

is a command line kpackage tool

kreadconfig6

is a command line tool to retrieve values from KDE configuration files

kshell6

start applications via kdeinit

ktelnetservice6

is a telnet service

ktrash6

is a helper program to handle the KDE trash can

kwalletd6

is the wallet manager daemon

kwriteconfig6

is a command line tool to write values in KDE configuration files

meinproc6

converts DocBook files to HTML

plasmapkg2

is a tool to install, list, remove Plasma packages

preparetips6

is a script to extract the text from a tips file

solid-hardware6

is a command line tool to investigate available devices