Difference between revisions of "KDE package guidelines"

From ArchWiki
Jump to: navigation, search
m (Install prefix)
(minor grammar improvements)
Line 5: Line 5:
  
 
== Build dir ==
 
== Build dir ==
A good way of building [[Wikipedia:CMake|CMake]] packages is to make a build dir outside the root of the project and run cmake from that dir. So, the build function in the [[PKGBUILD]] should start with the following lines:
+
A good way of building [[Wikipedia:CMake|CMake]] packages is to make a build directory outside the root of the project and run cmake from that dir. So, the build function in the [[PKGBUILD]] should start with the following lines:
 
  mkdir build
 
  mkdir build
 
  cd build
 
  cd build
Line 11: Line 11:
  
 
== Install prefix ==
 
== Install prefix ==
Every packages must set the {{Ic|CMAKE_INSTALL_PREFIX}} variable, but also we have to respect custom build version of KDE so please use:
+
Every packages must set the {{Ic|CMAKE_INSTALL_PREFIX}} variable, but also we have to respect custom built versions of KDE, so please use:
 
  -DCMAKE_INSTALL_PREFIX=`kde4-config --prefix`
 
  -DCMAKE_INSTALL_PREFIX=`kde4-config --prefix`
 
When a package is moved to [extra] or [community] that line must be changed to:
 
When a package is moved to [extra] or [community] that line must be changed to:
Line 17: Line 17:
  
 
== Build type ==
 
== Build type ==
Please specify the build type, this makes really simple rebuild a package with debug symbols by just using a sed rule.
+
Please specify the build type; this makes it really simple to rebuild a package with debug symbols by just using a sed rule.
 
  -DCMAKE_BUILD_TYPE=Release
 
  -DCMAKE_BUILD_TYPE=Release
  
Line 23: Line 23:
  
 
=== Plasmoids ===
 
=== Plasmoids ===
Plasmoids packages should be named {{Ic|kdeplasma-applets-''plasmoidname''}} so that they are recognizable as [[KDE]] related packages; this also distinguishes them from the officials one.
+
Plasmoids packages should be named {{Ic|kdeplasma-applets-''plasmoidname''}} so that they are recognizable as [[KDE]]-related packages; this also distinguishes them from the official packages.
  
 
=== Runners ===
 
=== Runners ===
Runners packages should be named {{Ic|kdeplasma-runners-''runnername''}} so that they are recognizable as [[KDE]] related packages; this also distinguishes them from the officials one.
+
Runners packages should be named {{Ic|kdeplasma-runners-''runnername''}} so that they are recognizable as [[KDE]]-related packages; this also distinguishes them from the official packages.
  
 
== .install files ==
 
== .install files ==
 
For many [[KDE]] packages, all {{Ic|.install}} files look almost exactly the same.
 
For many [[KDE]] packages, all {{Ic|.install}} files look almost exactly the same.
Some packages install icons in the hicolor icon theme; use the {{Ic|xdg-icon-resource}} util provided by the {{Pkg|xdg-utils}} package which is a dependence of the {{Pkg|qt}} package. So use this line:
+
Some packages install icons in the hicolor icon theme; use the {{Ic|xdg-icon-resource}} utility provided by the {{Pkg|xdg-utils}} package, which is a dependency of the {{Pkg|qt}} package. So use this line:
 
  xdg-icon-resource forceupdate --theme hicolor &> /dev/null
 
  xdg-icon-resource forceupdate --theme hicolor &> /dev/null
  
Many packages install Freedesktop.org compatible {{Ic|.desktop}} files and register MimeType entries in them. Running {{Ic|update-desktop-database}} in {{Ic|post_install}} is recommended as that tool is provided by the {{Pkg|desktop-file-utils}} package which is a dependence of the {{Pkg|qt}} package. So use this line:
+
Many packages install Freedesktop.org compatible {{Ic|.desktop}} files and register MimeType entries in them. Running {{Ic|update-desktop-database}} in {{Ic|post_install}} is recommended as that tool is provided by the {{Pkg|desktop-file-utils}} package which is a dependency of the {{Pkg|qt}} package. So use this line:
 
  update-desktop-database -q
 
  update-desktop-database -q

Revision as of 18:45, 15 July 2012

Template:Package Guidelines

The KDE packages on Arch Linux follow a certain schema.

Build dir

A good way of building CMake packages is to make a build directory outside the root of the project and run cmake from that dir. So, the build function in the PKGBUILD should start with the following lines:

mkdir 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`

When a package is moved to [extra] or [community] that line must be changed to:

-DCMAKE_INSTALL_PREFIX=/usr

Build type

Please specify the build type; this makes it really simple to rebuild a package with debug symbols by just using a sed rule.

-DCMAKE_BUILD_TYPE=Release

Package naming

Plasmoids

Plasmoids packages should be named kdeplasma-applets-plasmoidname so that they are recognizable as KDE-related packages; this also distinguishes them from the official packages.

Runners

Runners packages should be named kdeplasma-runners-runnername so that they are recognizable as KDE-related packages; this also distinguishes them from the official packages.

.install files

For many KDE packages, all .install files look almost exactly the same. Some packages install icons in the hicolor icon theme; use the xdg-icon-resource utility provided by the xdg-utils package, which is a dependency of the qt package. So use this line:

xdg-icon-resource forceupdate --theme hicolor &> /dev/null

Many packages install Freedesktop.org compatible .desktop files and register MimeType entries in them. Running update-desktop-database in post_install is recommended as that tool is provided by the desktop-file-utils package which is a dependency of the qt package. So use this line:

update-desktop-database -q