Building KDE Frameworks 5 (KF5)

KDE Frameworks 5 is a collection of libraries based on top of Qt5 and QML derived from the monolithic KDE 4 libraries. They can be used independent of the KDE Display Environment (Plasma 5).

本パッケージは LFS-8.0 において正しくビルドでき動作することが確認されています。

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

Package Information

KF5 Dependencies


Boost-1.64.0, extra-cmake-modules-5.34.0, docbook-xml-4.5, docbook-xsl-1.79.1, giflib-5.1.4, libepoxy-1.4.3, libgcrypt-1.8.0, libjpeg-turbo-1.5.2, libpng-1.6.31, libxslt-1.1.29, lmdb-0.9.21, OpenSSL-1.0.2l Libraries, QtWebkit-5.9.0, phonon-4.9.1, shared-mime-info-1.8, URI-1.72, and Wget-1.19.1 (required to download the packages)



BlueZ-5.46 (needed to build Bluez-Qt), ModemManager-1.6.8 (needed to build ModemManager-Qt)

Runtime dependency for FrameworkIntegration

Oxygen fonts and Noto fonts

Runtime dependencies for kapidox

Doxygen-1.8.13, Jinja2 , and PyYAML

Additional image formats support in KImageFormats

JasPer-2.0.12 and OpenEXR

Optional dependencies for KIO

MIT Kerberos V5-1.15.1

Optional dependencies for Solid

UDisks-2.7.2, UPower-0.99.5 and media-player-info (runtime)

Optional dependency for KWallet


Optional dictionary backends for Sonnet

Hspell and Hunspell

Required dependencies for Prison

Datamatrix and QRencode

User Notes:

Downloading KDE Frameworks

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

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-5.34.0.md5 << "EOF"
64f668aeb0ae98d7a956a3d77ff6b7f5 attica-5.34.0.tar.xz
#fdbf1beac421ef98c41a3a1a3703fbb4 extra-cmake-modules-5.34.0.tar.xz
1ed1b8b3928d4cae92e7783be780e2a9 kapidox-5.34.0.tar.xz
0c7b013cd3f176f25038c002bc706979 karchive-5.34.0.tar.xz
35a5fa5606b22eda5a885dc479e48e53 kcodecs-5.34.0.tar.xz
51788f84902358d7840c1d4ed111a80d kconfig-5.34.0.tar.xz
5b8ee514c5ecbe6febe28af2686566ad kcoreaddons-5.34.0.tar.xz
5dc198d8d1f6896451b1eaf15a28308f kdbusaddons-5.34.0.tar.xz
34556a2f5c33bb101c665243a6618f84 kdnssd-5.34.0.tar.xz
05a622fc98d4f748d5f50d15a579b34d kguiaddons-5.34.0.tar.xz
314ae60902e4870ae4df51decf4cedf3 ki18n-5.34.0.tar.xz
3702887f8dd903ee62d51d26da2fbd21 kidletime-5.34.0.tar.xz
5de2f07b336858195eaa138d2811e8b2 kimageformats-5.34.0.tar.xz
d5133f83bc354eab9e42fcf588cddbd2 kitemmodels-5.34.0.tar.xz
0e7b69f9803d63ff5900bea0f101d363 kitemviews-5.34.0.tar.xz
697f307e0266a54382a5057babda53d6 kplotting-5.34.0.tar.xz
c38d08ca16a49f43a6be2fd416652277 kwidgetsaddons-5.34.0.tar.xz
aca305a63b8ae3244d92c394d9d3840e kwindowsystem-5.34.0.tar.xz
66ed35d3a44b3ae7c04bc740cd553f01 networkmanager-qt-5.34.0.tar.xz
43050a891de0be5d79ac488e56012398 solid-5.34.0.tar.xz
320d964229aa783ac1a30670e6a930fe sonnet-5.34.0.tar.xz
034848d665785ae552a8d9c8acd59725 threadweaver-5.34.0.tar.xz
80e2d4a4d1657d70ddceb5f354074eb7 kauth-5.34.0.tar.xz
34b9b0cc3d61210683a872976d27b9c9 kcompletion-5.34.0.tar.xz
28a6ddd2560e283694ca6e0b97a432fc kcrash-5.34.0.tar.xz
52df5dd9721be1d372b7a2ce3bd29efc kdoctools-5.34.0.tar.xz
d921308e25f7a79a88f9bb8fffed8453 kpty-5.34.0.tar.xz
47cc7f51a7cfa0ef3c193ccbcc045f96 kunitconversion-5.34.0.tar.xz
7647c86266b61075542b4112e5f21a72 kconfigwidgets-5.34.0.tar.xz
ab7745b32c5cac8e928c9dc0ad0dde41 kservice-5.34.0.tar.xz
14ddf20e92da05618d48262b2cfbe6ef kglobalaccel-5.34.0.tar.xz
06e87a370ff4f231644fcae65a15203e kpackage-5.34.0.tar.xz
ff57dbae99d31603c36f9b59a2f88780 kdesu-5.34.0.tar.xz
eb2381de7b6905e7968859258c7d4731 kemoticons-5.34.0.tar.xz
6fc0cd71f1c331aae78b0c03114958dd kiconthemes-5.34.0.tar.xz
1c65bee5dfc02d7671228dd90c59e19b kjobwidgets-5.34.0.tar.xz
75eb11cdce6b623301dc670c3ee31525 knotifications-5.34.0.tar.xz
7cf308f1e3738ebed99c2ad08245ed6e ktextwidgets-5.34.0.tar.xz
b05b69a31251aa76c35581475c939cc0 kxmlgui-5.34.0.tar.xz
1f745c77a2a7285962801a1260f22720 kbookmarks-5.34.0.tar.xz
8385f1b57b7014be23511383c233da5d kwallet-5.34.0.tar.xz
49c9c0a0f94cfb301ef92578d888eedd kio-5.34.0.tar.xz
5b787db5a2ad709fca9ad23319aa3073 kdeclarative-5.34.0.tar.xz
c1afcc332098a7c0f104629d1f67e4ad kcmutils-5.34.0.tar.xz
560d1d39a62a016b92554e75c8cf25bf knewstuff-5.34.0.tar.xz
197162d3e09c27e286ba5ff0cf14a49b frameworkintegration-5.34.0.tar.xz
02b40f5ac18ebed7afd35e71bd621345 kinit-5.34.0.tar.xz
a89c130ec60f90d26b44c5c41d8c1e37 knotifyconfig-5.34.0.tar.xz
84cf7f77790cd8f2de85726fb16a3b73 kparts-5.34.0.tar.xz
67cc9be7978878d578295a885b9d6737 kactivities-5.34.0.tar.xz
e2ac1c22569e8f09e7716c92119a6f96 kded-5.34.0.tar.xz
9eb10b68624a858c0c217364e03a935e kdewebkit-5.34.0.tar.xz
ab44df7bdffa30c211568bf677456b8e syntax-highlighting-5.34.0.tar.xz
da4b300b11c309f72484235313a27351 ktexteditor-5.34.0.tar.xz
760797a5697383a23dc28c043776f6b7 kdesignerplugin-5.34.0.tar.xz
3e70566a1e059a7885270074e46b35f0 kwayland-5.34.0.tar.xz
848bae2f46d63821c4fbf846bdd83b0e plasma-framework-5.34.0.tar.xz
#7a1f0c8875efbbaedfaffe4d6f011524 modemmanager-qt-5.34.0.tar.xz
b03e735f9113b177a9a840c8910c8e02 kpeople-5.34.0.tar.xz
354e45b75119676fb673bce110f040cd kxmlrpcclient-5.34.0.tar.xz
479152445f04a630a23003c736f54914 bluez-qt-5.34.0.tar.xz
a7341eb3e20f180066470ba38533447c kfilemetadata-5.34.0.tar.xz
2545137d47bf0545f0b99d73520e65e5 baloo-5.34.0.tar.xz
#9d13ea7dcd31efb400e2f5a64db48179 breeze-icons-5.34.0.tar.xz
#0353fbb43ad0892e6f16cca840523493 oxygen-icons5-5.34.0.tar.xz
8209b9213c04802a99c6e70dbec61054 kactivities-stats-5.34.0.tar.xz
7c6f7f251f56b74619cf7cb2cfea857d krunner-5.34.0.tar.xz
#c9bd6c1897c8632b7241293ea1bbb4ab prison-5.34.0.tar.xz
fae3d8d37d54013e413c9df92df8848f kjs-5.34.0.tar.xz
ae382b0889fd76f0c28ebed4de08f816 kdelibs4support-5.34.0.tar.xz
9c698d6d09b31a537ac6cdf31aa90de7 khtml-5.34.0.tar.xz
b7da8abba8b5e9c9e359d40e73ba3c6f kjsembed-5.34.0.tar.xz
3d3ff38e82c4ade51ac7045b4bed1196 kmediaplayer-5.34.0.tar.xz
c211cb58f6c4a6082cb431fa536229dd kross-5.34.0.tar.xz

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. The icon packages are covered separately at breeze-icons-5.34.0 and oxygen-icons5-5.34.0. The modemmanager-qt package may be built if its optional dependency has been installed. The prison package (bar code reader) may be built if the required external libraries are installed.

Installation of KDE Frameworks



複数のパッケージを一つのスクリプトを使って一気にインストールする場合には、ルートユーザーとして実行することが必要となります。 その場合には、以下に示す3つの方法のいずれかを採用することになります。

  1. スクリプトの実行自体をルートユーザーにより行う。(ただし推奨はしません。)

  2. Sudo-1.8.20p2 パッケージの sudo コマンドを利用する。

  3. su -c "コマンド 引数" の形 (クォーテーションが必要) を利用する。 この場合はコマンドの実行の都度、ルートパスワードの入力が必要になります。

この状況を取り扱う一つの手法として、以下のような bash スクリプトにより適切な方法を自動的に選択する方法が考えられます。 一度コマンドをセットしておけば、再びセットする必要はありません。

  if   [ $EUID = 0 ];        then $*
  elif [ -x /usr/bin/sudo ]; then sudo $*
  else                            su -c \\"$*\\"

export -f as_root


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

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

First, start a subshell that will exit on error:

bash -e

Install all of the packages by running the following commands:

export CXXFLAGS='-isystem /usr/include/openssl-1.0'

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

    tar -xf $file
    pushd $packagedir

      mkdir build
      cd    build

            -DCMAKE_PREFIX_PATH=$QT5DIR        \
            -DCMAKE_BUILD_TYPE=Release         \
            -DBUILD_TESTING=OFF                \
            -Wno-dev ..
      as_root make install


  as_root rm -rf $packagedir
  as_root /sbin/ldconfig

done < frameworks-5.34.0.md5



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/kf5 /opt/kf5-5.34.0
ln -sfvn kf5-5.34.0 /opt/kf5

Command Explanations

-DCMAKE_PREFIX_PATH=$QT5DIR: This switch is used to allow cmake to find the proper Qt libraries.

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

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


Installed Programs: There are 48 programs installed in /opt/kf5/bin.
Installed Libraries: There are too many kf5 libraries (191) to list separately.
Installed Directories: /opt/kf5 (symlink to /opt/kf5-5.34.0)

Short Descriptions


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


is a tool to generate a dependency diagram.


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


is a tool to prepare dot files.


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


is the KDE Plasma Workspace Activity Manager.


rebuilds the KService desktop file system configuration cache.


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


consolidates several small services in one process.


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


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


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


is a tool to generate API documentation in the KDE style.


generates widget plugins for Qt(TM) Designer.


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


is KDE ECMAScript/JavaScript engine.


is a tool for launching KJSEmbed scripts from the command line.


is a console for kjs5.


is a mail service.


is a commandline tool for launching kpackage QML application


is a command line kpackage tool.


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


start applications via kdeinit.


is a telnet service.


is a helper program to handle the KDE trash can.


is the wallet manager daemon.


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


converts DocBook files to HTML.


is a tool to install, list, remove Plasma packages


is a script to extract the text from a tips file.


is a command line tool to investigate available devices.

最終更新日: 2017-06-19 04:35:49 +0900