Packaging Cahute

Cahute is constituted of a static library, a set of utilities, and a set of udev rules. Due to the last element having to be installed for both, only the following package organisations are available:

  • Having one package for both the static library and utilities.

  • Having one package for the static library, either a package for all utilities or a package for each utility, and a package for installing the udev rules, of which all previous package depend.

For more about the rationale behind this document, consult the Archlinux CMake packaging guidelines.

Preparing the dependencies

Cahute depends on the following, build-only dependencies:

It also depends on the following build and runtime dependencies:

Producing the distribution directory

You first need to retrieve the source directory, named “cahute-0.4”, using one of the following methods:

  • You can download the latest source package at https://ftp.cahuteproject.org/releases:

    curl -o cahute-0.4.tar.gz https://ftp.cahuteproject.org/releases/cahute-0.4.tar.gz
    tar xvaf cahute-0.4.tar.gz
  • You can clone the repository and checkout the tag corresponding to the release:

    git clone https://gitlab.com/cahuteproject/cahute.git cahute-0.4
    (cd cahute-0.4 && git checkout -f 0.4)

Now that you have the source directory, you can build it using the following commands:

cmake -B build -S cahute-0.4 -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release
cmake --build build

Once this is done, you can produce the distribution directory dist/ using the following command:

DESTDIR=./dist cmake --install build --strip

Your distribution directory is ready; from there, the instructions are specific to your distribution.

Warning

If your packaging system provides stripping out of the box, it is recommended to disable it, as it may strip the symbols out of the static library, rendering it unusable.

For example, in the PKGBUILD file for Archlinux and derivatives, the strip option must be explicitely disabled, i.e. the PKGBUILD should have the following line:

options=(!strip)

Note

Cahute provides udev rules by default, which make the following assumptions:

If any of these assumptions is incorrect in the case of your distribution, it is recommended to:

  • Disable the udev rules installation, by adding the following to the initial command:

    cmake -B build -S cahute-0.4 ... -DENABLE_UDEV=OFF
  • Take the appropriate measures to simplify user access to the devices.

Otherwise, if all of the assumptions are correct, it is recommended to:

  • Reload the udev rules in post-installation, by running the following command:

    udevadm control --reload
    
  • Prompt to the user to add their username to the uucp group, e.g. using the usermod -a -G uucp <username> command.

Getting informed when a new version is released

Maintaining a package is a long-term process, and you need to stay informed when Cahute is updated so that you can update your package. Fortunately, there is a way to do just this!

As described in Release process, when a new release is created, a new entry is created on the Releases page of the Gitlab repository. You can subscribe to such events by creating a Gitlab.com account, and following the steps in Get notified when a release is created.

Note

You can check your notification settings at any time in Notifications.