KDE package guidelines: Difference between revisions
m (Add zh-hans translation) |
(→KF package naming: Add kf 6 servicemenus example) |
||
(6 intermediate revisions by the same user not shown) | |||
Line 46: | Line 46: | ||
{{Expansion|Is this the same for Qt6?}} | {{Expansion|Is this the same for Qt6?}} | ||
== | == KF package naming == | ||
{{Note|1=There are still packages that are using [https://wiki.archlinux.org/index.php?title=KDE_package_guidelines&oldid=356370 old KDE4 naming]: [https://aur.archlinux.org/packages?K=kdeplasma-applets&SeB=n kdeplasma-applets-*], [https://aur.archlinux.org/packages?K=kde-servicemenus&SeB=n kde-servicemenus-*]. They should be renamed or deleted.<br> | |||
Some packages even do not follow kde4 naming scheme. Some examples: [https://aur.archlinux.org/packages?K=theme+kde kde theme], [https://aur.archlinux.org/packages?K=plasma-runners plasma-runners].<br> | |||
To rename a package, select "Submit Request" on the package page, and in request type select "Merge". | |||
}} | |||
=== Plasma widgets === | === Plasma widgets === | ||
Plasma widgets (formerly Plasmoids) packages should be named {{ic|plasma5-applets-''widgetname''}} so that they are recognizable as Plasma 5-related packages; this also distinguishes them from the official packages. | Plasma widgets (formerly Plasmoids) packages should be named {{ic|plasma5-applets-''widgetname''}} so that they are recognizable as Plasma 5-related packages; this also distinguishes them from the official packages. See [https://aur.archlinux.org/packages?K=plasma5-applets examples]. | ||
=== Runners === | === Runners === | ||
Plasma runners packages should be named {{ic|plasma5-runners-''runnername''}} so that they are recognizable as Plasma 5-related packages; this also distinguishes them from the official packages. | Plasma runners packages should be named {{ic|plasma5-runners-''runnername''}} or {{ic|plasma6-runners-''runnername''}} so that they are recognizable as Plasma 5-related packages; this also distinguishes them from the official packages. See examples [https://aur.archlinux.org/packages?K=plasma5-runners here] and [https://aur.archlinux.org/packages?K=plasma6-runners here]. | ||
=== Service menus === | === Service menus === | ||
Service menus packages should be named {{ic|kf5-servicemenus-''servicename''}} so that they are recognizable as KF5- | Service menus packages should be named {{ic|kf5-servicemenus-''servicename''}} or {{ic|kf6-servicemenus-''servicename''}} so that they are recognizable as KF5 or KF6 related packages. See examples [https://aur.archlinux.org/packages?K=kf5-servicemenus here] and [https://aur.archlinux.org/packages?K=kf6-servicemenus here]. | ||
=== Themes === | === Themes === | ||
Plasma themes packages should be named {{ic|plasma5-themes-''themename''}} so that they are recognizable as Plasma 5-related packages. | Plasma themes packages should be named {{ic|plasma5-themes-''themename''}} so that they are recognizable as Plasma 5-related packages. See [https://aur.archlinux.org/packages?K=plasma5-themes examples]. | ||
== Icons and .desktop files installation == | == Icons and .desktop files installation == | ||
Some [[KDE]] software provide icons in the hicolor icon theme and {{ic|.desktop}} files, which must be installed via [[pacman hooks]]. Refrain from using installation command for these type of files in a {{ic|.install}}, as it would result in unnecessary double execution of them. | Some [[KDE]] software provide icons in the hicolor icon theme and {{ic|.desktop}} files, which must be installed via [[pacman hooks]]. Refrain from using installation command for these type of files in a {{ic|.install}}, as it would result in unnecessary double execution of them. |
Latest revision as of 19:30, 17 January 2024
32-bit – CLR – CMake – Cross – DKMS – Eclipse – Electron – Font – Free Pascal – GNOME – Go – Haskell – Java – KDE – Kernel – Lisp – Meson – MinGW – Node.js – Nonfree – OCaml – Perl – PHP – Python – R – Ruby – Rust – Shell – VCS – Web – Wine
The KDE packages on Arch Linux follow a certain schema.
Build directory
A good way of building CMake packages is to make a build directory outside the root of the project and run cmake from that directory. The PKGBUILD should look this way:
prepare() { mkdir -p build } build() { cd build cmake ../${pkgname}-${pkgver} }
Install prefix
Every packages must set the CMAKE_INSTALL_PREFIX
variable, but also we have to respect custom built versions of KDE, so please use:
-DCMAKE_INSTALL_PREFIX=$(kde4-config --prefix)
or for KDE 5:
-DCMAKE_INSTALL_PREFIX=$(kf5-config --prefix)
When a package is moved to extra that line must be changed to:
-DCMAKE_INSTALL_PREFIX=/usr
Build type
Generally you should not specify the build type; this makes CMake honor environmental variables like such as CFLAGS
, CPPFLAGS
, etc. [1]
Force Qt version
KF package naming
Some packages even do not follow kde4 naming scheme. Some examples: kde theme, plasma-runners.
Plasma widgets
Plasma widgets (formerly Plasmoids) packages should be named plasma5-applets-widgetname
so that they are recognizable as Plasma 5-related packages; this also distinguishes them from the official packages. See examples.
Runners
Plasma runners packages should be named plasma5-runners-runnername
or plasma6-runners-runnername
so that they are recognizable as Plasma 5-related packages; this also distinguishes them from the official packages. See examples here and here.
Service menus packages should be named kf5-servicemenus-servicename
or kf6-servicemenus-servicename
so that they are recognizable as KF5 or KF6 related packages. See examples here and here.
Themes
Plasma themes packages should be named plasma5-themes-themename
so that they are recognizable as Plasma 5-related packages. See examples.
Icons and .desktop files installation
Some KDE software provide icons in the hicolor icon theme and .desktop
files, which must be installed via pacman hooks. Refrain from using installation command for these type of files in a .install
, as it would result in unnecessary double execution of them.