Building KDE Frameworks 6.20.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.20.0, breeze-icons-6.20.0, docbook-xml-4.5, docbook-xsl-nons-1.79.2, libcanberra-0.30, libgcrypt-1.11.2, libical-3.0.20, libsecret-0.21.7, libxslt-1.1.43, lmdb-0.9.33, qca-2.3.10, libqrencode-4.1.1, plasma-wayland-protocols-1.19.0, PyYAML-6.0.3, shared-mime-info-2.4, URI-5.34, and Wget-1.25.0 (required to download the packages)

Recommended

Optional

BlueZ-5.84 (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.3.0, libheif-1.20.2, libjxl-0.11.1, libraw-0.21.4, OpenEXR

Optional dependencies for Solid

UDisks-2.11.0, UPower-1.90.10 and media-player-info (runtime)

Optional dependency for KWallet

gpgmepp-2.0.0

Optional dependencies for kcoreaddons

Shiboken6 and PySide6

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.20/
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.20.0.md5 << "EOF"
89d349c7c1fe15637331219a46d92943  attica-6.20.0.tar.xz
#f8f4244ee36b34cc4259adc117e0adb8  extra-cmake-modules-6.20.0.tar.xz
8efda91362c49971530e52f8a67e50a2  kapidox-6.20.0.tar.xz
b50cddc01e18a88f8e2185546e5f6b25  karchive-6.20.0.tar.xz
0490158158794dba76e6e74085eebe1b  kcodecs-6.20.0.tar.xz
da66af528520ba6b62e6123d85073085  kconfig-6.20.0.tar.xz
8feb2d9481341a8f5e5a23a1c2fae4e1  kcoreaddons-6.20.0.tar.xz
0e596b9bcea43279d67384aedc405145  kdbusaddons-6.20.0.tar.xz
0bb877d2aa09518d97ff92b83dc29f86  kdnssd-6.20.0.tar.xz
adce0513e83c86efad5e2414f5736bef  kguiaddons-6.20.0.tar.xz
17a7a148d4a7afd6098da85b1e2cd349  ki18n-6.20.0.tar.xz
d259e3432db63ddea7f28f365c05e97a  kidletime-6.20.0.tar.xz
29e1084151d5c426380e3f567f0210ad  kimageformats-6.20.0.tar.xz
87d962685f0ad786880aa0c876c05ca5  kitemmodels-6.20.0.tar.xz
f6b3168f77b80b4f3d454e684b84d26e  kitemviews-6.20.0.tar.xz
3d43c594486ea7de7eff8e62f7b1c6f6  kplotting-6.20.0.tar.xz
46258ac9d079db8ce123c1a800de71ab  kwidgetsaddons-6.20.0.tar.xz
5aebd7a86b07017b8a918d18498f7dab  kwindowsystem-6.20.0.tar.xz
b241fd6f1f530060588023b742ce324b  networkmanager-qt-6.20.0.tar.xz
e29d2399ef6643899de65187b20a3fa1  solid-6.20.0.tar.xz
ef922d3ab1d9d35f06662bd13dc9ad6f  sonnet-6.20.0.tar.xz
ceaeaed663307f04876f424cee3b1162  threadweaver-6.20.0.tar.xz
6781a19190b12c7402b2be92355338a9  kauth-6.20.0.tar.xz
8dc98dd1367d821a64c60047197ffea9  kcompletion-6.20.0.tar.xz
938ef9117720166ff74e1ee52fac7674  kcrash-6.20.0.tar.xz
58ef18e61e8697a6a0be001170342419  kdoctools-6.20.0.tar.xz
847b2fe05e8edc3f9c94ff9b42793052  kpty-6.20.0.tar.xz
09d9da4e43270d31c958de1fd7bc3f4b  kunitconversion-6.20.0.tar.xz
16b7d1b74d14822f3c21ffbf3841ceb2  kcolorscheme-6.20.0.tar.xz
2fd18d6f5d2b9efacf2fb9da63675445  kconfigwidgets-6.20.0.tar.xz
515dc229c2342f288588338d40e5b739  kservice-6.20.0.tar.xz
8015cacbddb55e74b05f97de697d9556  kglobalaccel-6.20.0.tar.xz
3dd332c5f69c27f39d8803d1b05c6121  kpackage-6.20.0.tar.xz
43d52b2f783902df3aaa506cd32ff28b  kdesu-6.20.0.tar.xz
774050a40374a24c8ea06a6bbc603956  kiconthemes-6.20.0.tar.xz
ba3abc6c60aea797212748618d03c77b  knotifications-6.20.0.tar.xz
5d91bf06aaf524c3dafe98c091b48d37  kjobwidgets-6.20.0.tar.xz
7a60ecf0db6e85dc83e4d0a944639524  ktextwidgets-6.20.0.tar.xz
c30973c60bf9f8fba5200ce5a320c1f6  kxmlgui-6.20.0.tar.xz
4f7a7b40169b9a2952b7ef8843a5cecb  kbookmarks-6.20.0.tar.xz
769278cfc0490ef14efd7b6ac458bb24  kwallet-6.20.0.tar.xz
9fec31c961d6f003b77dab2ef634f595  kded-6.20.0.tar.xz
b1f484161d7d017a38c78cfbb25658ca  kio-6.20.0.tar.xz
9b3317df0c4aef80dc18c5f06e561de4  kdeclarative-6.20.0.tar.xz
81df1bb3dc9caabbb069a58171553296  kcmutils-6.20.0.tar.xz
c34faa649d9e0508479a8cfc96be012b  kirigami-6.20.0.tar.xz
d2a3c7d76c5f63f408e149fa4aff4c24  syndication-6.20.0.tar.xz
4f76cbabdb0aa7b63f51f1061d80cb1d  knewstuff-6.20.0.tar.xz
4bb9aac382093d5a80dc89d1f38c6a9b  frameworkintegration-6.20.0.tar.xz
cab87112d59edeb212664516160f6482  kparts-6.20.0.tar.xz
d34e1514a13f75f30e309bf4ab0bbc05  syntax-highlighting-6.20.0.tar.xz
7aff1716b445fa2a7652045cf4d814ab  ktexteditor-6.20.0.tar.xz
966592f3d0444836f67ec6c0b52491c6  modemmanager-qt-6.20.0.tar.xz
23e89282ed12d538ca1cf1fe655d29b6  kcontacts-6.20.0.tar.xz
cf2c3f3b83924627e14862d8d36224cf  kpeople-6.20.0.tar.xz
dc1daa0970f7f7d8ebe6ea19ffecedf9  bluez-qt-6.20.0.tar.xz
23afc50ffa3536c7bfcbbae2d01230fa  kfilemetadata-6.20.0.tar.xz
a7d95c808af8e6d2cb2514c1cdc7be31  baloo-6.20.0.tar.xz
#f4f4b113f37ba84da82243fa590f2089  breeze-icons-6.20.0.tar.xz
dae53683cee3f882e39ebf88a75dcd2d  krunner-6.20.0.tar.xz
9cf74a92e38f145352c97261a1a1ba21  prison-6.20.0.tar.xz
e064b676ae48428dc2e7d94138c29378  qqc2-desktop-style-6.20.0.tar.xz
39f7f40a61cdd74efcd81d44c0607d52  kholidays-6.20.0.tar.xz
fbb7b5bc4bc02e7c4482bfe5e03b5e16  purpose-6.20.0.tar.xz
f4485ddc5c32459d9d8c6c6da578afb8  kcalendarcore-6.20.0.tar.xz
24a06d8b57ac5015b3bd85dc67e39e97  kquickcharts-6.20.0.tar.xz
9e04ce07f31ca63c7a09f309bc15e8ae  knotifyconfig-6.20.0.tar.xz
49aed2b4c521543c6fe388ba967c664b  kdav-6.20.0.tar.xz
69245a30daef5230060b8334df273c85  kstatusnotifieritem-6.20.0.tar.xz
3e7355d0d59cb8ca4b5d7dfa656775be  ksvg-6.20.0.tar.xz
eb890e82b97045b79d3a00e05258b1c0  ktexttemplate-6.20.0.tar.xz
de12bde595290ea028890d249c8c3109  kuserfeedback-6.20.0.tar.xz
EOF

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

  • The extra-cmake-modules entry has been commented out because it was built earlier in the Introduction to KDE.

  • This icon package is covered separately at breeze-icons-6.20.0. It is separate to allow users that need these icons but do not need the full set of KF6 packages (e.g. LXQt-Post-Install) to more easily install them. However they are a required dependency for several kf6 packages.

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.17p2 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                \
            -D BUILD_PYTHON_BINDINGS=OFF        \
            -W no-dev ..
      make
      as_root make install
    popd

  as_root rm -rf $packagedir
  as_root /sbin/ldconfig

done < frameworks-6.20.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.20.0
ln -sfvn kf6-6.20.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.

-D BUILD_PYTHON_BINDINGS=OFF: This switch is used to prevent building Python modules that require external optional dependencies.

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