Neon/Locally build packages

From KDE Community Wiki
Revision as of 22:54, 16 December 2020 by Ash (talk | contribs) (Initial instructions on how to locally build packages)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This page describes some basics in taking a package from https://invent.kde.org/neon/ and building it locally. This can be useful for doing local testing before committing changes.

Prerequisites

  • A pre-existing KDE development environment
  • dpkg-dev package will include the standard debian toolchain for building packages.

Setting up local files for building package

  1. Clone the package repository repository, i.e. https://invent.kde.org/neon/kde/libkdegames
  2. Copy the source tree from your kde sources to where the debian/ path resides.
  3. Create a usr/share/locale to simulate CI locale injection, mkdir -p usr/share/locale && touch usr/share/locale/stub
  4. Remove symbols to simulate CI removing the symbol files, rm debian/*.symbols

Building the package

Because a tarball does not exist, you will need to tell the package builder to not clean the environment before build -nc. It's helpful to further clean the environment after for easier git usage for committing content To do this, run:

dpkg-buildpackage -nc -tc

Alternatively, modify debian/source/format with native and the tooling can be used without specifying options like -nc.