Building KDE Frameworks 6.13.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.13.0, breeze-icons-6.13.0, docbook-xml-4.5, docbook-xsl-nons-1.79.2, libcanberra-0.30, libgcrypt-1.11.1, libical-3.0.20, libxslt-1.1.43, lmdb-0.9.31, qca-2.3.10, libqrencode-4.1.1, plasma-wayland-protocols-1.17.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) and 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.2.1, libjxl-0.11.1, libraw-0.21.4, libheif, OpenEXR

Optional dependencies for Solid

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

Optional dependency for KWallet

GPGME-1.24.2, 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.13/
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.13.0.md5 << "EOF"
c12ac706d1f5b1cde0b65c7f8d74288f  attica-6.13.0.tar.xz
#fffa4105250ef446219808e275c754a5  extra-cmake-modules-6.13.0.tar.xz
9adefdfc46c805f55f2c2736d118f5a5  kapidox-6.13.0.tar.xz
8c54e968cd52480bb5c7dc5dd262bba6  karchive-6.13.0.tar.xz
f8fe4baf7745a75028a4d063aadb768c  kcodecs-6.13.0.tar.xz
eeb0d97e29b84f9f58977e90d24f23ee  kconfig-6.13.0.tar.xz
42ea67c66d76712a359df6b6a4d271c1  kcoreaddons-6.13.0.tar.xz
dd53aa26b08bb275f17503959815bde2  kdbusaddons-6.13.0.tar.xz
0276c48fe10629c5f97efc46444a2201  kdnssd-6.13.0.tar.xz
0b00b7489887eee35c0f105d65a8b4ed  kguiaddons-6.13.0.tar.xz
bcc51ec7d2dfaa68465947e54babf61e  ki18n-6.13.0.tar.xz
89b25fac6b75ced80c9fbb8189412e0d  kidletime-6.13.0.tar.xz
ba7a2ca96b4df6025619bd58f452b4e6  kimageformats-6.13.0.tar.xz
c6d84368fa1476c1be44ea8f8e80bb4a  kitemmodels-6.13.0.tar.xz
70089619a94a0e81264c8d487e7251e0  kitemviews-6.13.0.tar.xz
be1f5afd4ac09d2361ed0162d872e970  kplotting-6.13.0.tar.xz
8b7586ba8a39718b261b8626d0dbf8ef  kwidgetsaddons-6.13.0.tar.xz
9ff25f2b5a06c4531efb01ae5c5d7deb  kwindowsystem-6.13.0.tar.xz
7fe8caa8f457ed9ff2e3441681ee39a8  networkmanager-qt-6.13.0.tar.xz
3e03e17c5d4ed73fda022e5d022a5634  solid-6.13.0.tar.xz
086d95b6c3ca5662da495a20e70d1046  sonnet-6.13.0.tar.xz
8b661df05c7f2c81cda0560dd4a45e34  threadweaver-6.13.0.tar.xz
2a58610e2d92e94c26d4e5bcd099d653  kauth-6.13.0.tar.xz
41c89f6e166a810fdcbe2ea9a0235822  kcompletion-6.13.0.tar.xz
1d4c0b59d2706a4cc953ebb3097f2493  kcrash-6.13.0.tar.xz
34fd06a35b7ae7e4ae8a95848b057d2e  kdoctools-6.13.0.tar.xz
5639de35d027d25d5c2537049fa8e1ef  kpty-6.13.0.tar.xz
dc9f9408462a03b232c6492a5c08ddea  kunitconversion-6.13.0.tar.xz
c02d1db1cc46785a786603d3e262a5aa  kcolorscheme-6.13.0.tar.xz
60ee97fd70d698e8e5318a4f82eb3bb4  kconfigwidgets-6.13.0.tar.xz
7b1616897f802d98b7432edf604285bb  kservice-6.13.0.tar.xz
487332e4e629411e4ebfd6c4ee65c93b  kglobalaccel-6.13.0.tar.xz
b7a158ee246a694296193f2fdad0a75c  kpackage-6.13.0.tar.xz
2ba3e12c09523a06fd9c7c41f61276bc  kdesu-6.13.0.tar.xz
6982b13fb92ae3792eb16aefd5980088  kiconthemes-6.13.0.tar.xz
3a06c30f46d48292bbe65bcbde3ea175  knotifications-6.13.0.tar.xz
d1d0caa9fe35d2c34d15d448dc1022ee  kjobwidgets-6.13.0.tar.xz
1e8f264d42649f8a3288742ed2a757a1  ktextwidgets-6.13.0.tar.xz
e722e89631cbaa69a206551a8a66dbd3  kxmlgui-6.13.0.tar.xz
0e9fcbf3f244f3e66d150cf78acfd452  kbookmarks-6.13.0.tar.xz
6d40ad91d72406c3e8b1d55655cc35f0  kwallet-6.13.0.tar.xz
472202ec46a6c0b4a838b6143d6a0d60  kded-6.13.0.tar.xz
632f38fc7601e22dc231793d902c6292  kio-6.13.0.tar.xz
0b76489ddb1c86ba0a9d5abdee0022a4  kdeclarative-6.13.0.tar.xz
45e133f0a42359578160331ac0e2a26c  kcmutils-6.13.0.tar.xz
9659239b81fd0266fbec52eddeaa6029  kirigami-6.13.0.tar.xz
d1bcb046907203a9ad484a269c4aee81  syndication-6.13.0.tar.xz
af414da3f21e43288d8ca394477c0c73  knewstuff-6.13.0.tar.xz
f7f9cd13902679ef605eb76293bcf6b9  frameworkintegration-6.13.0.tar.xz
c45e7383a99b52e2e1ae2307b51acd06  kparts-6.13.0.tar.xz
ba7c5298c3f81f21d30f591b3d4f4859  syntax-highlighting-6.13.0.tar.xz
bcc08aa21ba552bbefe2a8c97d4027e3  ktexteditor-6.13.0.tar.xz
fd872dfb6c662475972b2cab44cad03d  modemmanager-qt-6.13.0.tar.xz
b723cd0d7991dcab82b59ef2b6cc65d8  kcontacts-6.13.0.tar.xz
2b2c2fd028cbc4256ecae04362d1f304  kpeople-6.13.0.tar.xz
756838cb9d946e06ac8fb6cb9fde57dc  bluez-qt-6.13.0.tar.xz
45779ed91f44700ff9d80082bb1c3843  kfilemetadata-6.13.0.tar.xz
c23b73568aeee9aa5f9afec7def9e15d  baloo-6.13.0.tar.xz
#48fc3036c91eed1fd8d89efb83d9494c  breeze-icons-6.13.0.tar.xz
36ff81ebcdb1988eb272bf27f0dfc035  krunner-6.13.0.tar.xz
ca5266e18d3d15c089031a896401421e  prison-6.13.0.tar.xz
6ea9727a9a2968f03da3e5e3d549eed3  qqc2-desktop-style-6.13.0.tar.xz
4233fd805137aa1a8c8faf2c8b5d71a0  kholidays-6.13.0.tar.xz
02b90cd4bbed0a86e3eb1c66ea0cb0ec  purpose-6.13.0.tar.xz
0b19cdb1039bd146c45a6d5cc7099e60  kcalendarcore-6.13.0.tar.xz
9727025fec963329082c5d29bfd85b23  kquickcharts-6.13.0.tar.xz
6e2ba94485d3773e4b21645d131646e3  knotifyconfig-6.13.0.tar.xz
5729859a76b5feecc9a115bd6dad91b3  kdav-6.13.0.tar.xz
c8475b31a270bd47a8f10e4d383af7d6  kstatusnotifieritem-6.13.0.tar.xz
dd3f65c9d10991d7fded37c9d51fb956  ksvg-6.13.0.tar.xz
61d5d199dacd67a4689137634ae171d8  ktexttemplate-6.13.0.tar.xz
3a9e9345e06be417fb087d3fc1274181  kuserfeedback-6.13.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       &&
install -v -dm755           $KF6_PREFIX/lib         &&
ln -sfv /usr/lib/systemd    $KF6_PREFIX/lib

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-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.13.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.

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.13.0
ln -sfvn kf6-6.13.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.13.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