From Fedora Project Wiki

Revision as of 00:59, 6 August 2009 by Mathstuf (talk | contribs) (Create proposal)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This page is a draft only
It is still under construction and content may change. Do not rely on the information on this page.

Changelog

  • 2009-08-05, 0.01: first shot Mathstuf 00:59, 6 August 2009 (UTC)

Existing Guideline

No formal guidelines exist. "Best practices" at SIGs/KDE#Best_Practices

New Guideline

Proposal

  • Use snippet for configuring and building
%build
mkdir -p %{_target_platform}
pushd %{_target_platform}
%{cmake_kde4} ..
popd

make %{?_smp_mflags} -C %{_target_platform} VERBOSE=1

%install
rm -rf %{buildroot}
mkdir %{buildroot}
make install DESTDIR=%{buildroot} -C %{_target_platform}
    • Rationale: Puts generated files in subdirectory to avoid mixing up source files
    • Rationale: Enables verbose output to build.log
  • Use KDE4 RPM directory macros (current list: SIGs/KDE#Best_Practices, proposed list: SIGs/KDE/Packaging/Cleanup#Macros)
    • Rationale: The macros contain better descriptions of the directories they represent than the directories themselves
  • Use macro to validate .desktop files (rudimentary hack at SIGs/KDE/Packaging/Cleanup, suggestions/improvements welcome)
    • Rationale: KDE uses CMake to install .desktop files and patching to manually install .desktop files is a huge burden Running desktop-file-validate serves the same purpose.
  • Avoid usage of "for KDE", "KDE application for...", or other similar wording since KDE applications also work in other desktop environments
    • Rationale: Don't mislead users that the applications only work in KDE

Motivations

Formalize packaging for KDE4 packages. Currently, KDE4-dependent packages are inconsistent and use mixes of %{_kde4_*} and standard macros.

Existing practice

There are existing packages that need updating to use the snippet for building and installing. The proposed cleanup on the KDE SIG's end would update existing packages to this guideline.

Possibilities

Discussion

See Talk:PackagingDrafts/KDE4 for discussion.