   Link: Courier Unicode Library (start)
   Link: Courier Unicode Library (parent)
   Link: Courier Unicode Library (previous)
   Link: Using the library (next)

                             Installation and usage
   Prev                                                                  Next

   ══════════════════════════════════════════════════════════════════════════

Installation and usage

  RPM and DEB packages

   These are not the same packages as the ones from various distributions'
   repositories. These packages carry an higher internal revision level in
   order to prevent them from getting upgraded by the distribution packaging.
   This packaging exists in order to have a convenient way of updating after
   a release without waiting for the distribution's package to get built.

  Note

   If a distribution package is already installed it should be removed
   completely before switching to the upstream version (dnf remove or apt
   purge). Preserve any existing configuration files, beforehand, in order to
   reconfigure the package.

  Note

   These packages use their own, generic, installation layout that may
   deviate slightly from the package installation conventions that's
   preferred by the distributions.

    RPM builds

   It is not necessary to unpack this tarball in order to build this tarball.

   Run “dnf install rpm-build” if it's not installed already, then:

               $ rpmbuild -ta courier-unicode-VERSION.tar.bz2


   If this fails due to any missing dependencies, install them. This builds
   the main “courier-unicode” package with runtime libraries, and the
   “courier-unicode-devel” package with link libraries and header files.

               $ rpmbuild --define 'compat 1' -ta courier-unicode-VERSION.tar.bz2


   Setting the “compat 1” flag during an RPM build produces a
   differently-named “compatibility” runtime package, with its version as
   part of the package's name. The compatibility package gets installed
   together with the newer version of this library that introduces a binary
   ABI change. This supports a transition period during which other software
   that's built to the compatibility package's ABI version continue to load
   the compatibility package's library at runtime, while new software can be
   built against the newer ABI.

      Rocky/RHEL 8 notes

   Courier packages require at least C++17 support, but the default version
   of gcc does not fully support it, and a newer gcc is needed:

               $ sudo dnf install --enablerepo=crb -y gcc-toolset-14
               $ scl enable gcc-toolset-14 "rpmbuild -ta courier-unicode-VERSION.tar.bz2"


    DEB builds

   Run “apt install devscripts debhelper”, if it's not installed already.
   Create an empty directory, and copy/move the tarball into it:

               $ mkdir tmp
               $ mv courier-unicode-VERSION.tar.bz2 tmp
               $ cd tmp


   Unpack the tarball and cd into the unpacked subdirectory:

               $ tar xvf courier-unicode-VERSION.tar.bz2
               $ cd courier-unicode-VERSION


   Run the courier-debuild script, which is a wrapper for debuild, and
   forwards its parameters to it:

               $ ./courier-debuild -us -uc


  Note

   The above steps must be followed strictly. The courier-debuild script
   expects the distributed tarball in its parent directory.

   This eventually produces a deb subdirectory with .deb packages that can be
   installed with "dpkg -i":

     • The “libcourier-unicode-dev” package contains the development
       libraries and header files, for building other packages that use the
       Courier Unicode Library.

     • The “libcourier-unicode<N>” package contains the runtime library.

               $ DEBGCC=10 ./courier-debuild -us -uc


   Setting the DEBGCC environment variable selects a non-default gcc version.
   If unset, courier-debuild determines the default version of gcc. The
   resulting deb package explicitly specifies this version of gcc as a
   dependency if the source package gets rebuilt. When using pbuilder to
   build Courier packages for a different distribution it is often desirable
   to leave the version of gcc unspecified:

               $ DEBGCC=default ./courier-debuild -us -uc


   This builds this package using the default gcc version but without pegging
   the resulting package with an explicit gcc version, so that pbuilder will
   pick up the default version of gcc when building the source package on a
   different distribution.

  Note

   Courier packages have mutual dependencies. After building each one it
   should get installed in the targeted distribution before the next one gets
   built.

   The pde-local script
   (https://github.com/svarshavchik/pbuilder-dist-extras) is a convenient way
   to automate this process.

  Note

   All Courier packages should be built using the same version of gcc, on the
   same distribution.

      Ubuntu 20

   Courier packages require at least C++17 support, but the default version
   of gcc does not fully support it, and a newer gcc is needed:

               $ sudo apt install -y gcc-10 g++-10
               $ DEBGCC=10 ./courier-debuild -us -uc


  Manual

             ./configure    # Takes the default configure script options
             make
             make install DESTDIR=/tmp/courier-unicode-instimage # For example.

   The library uses a stock configure script, make and make install command
   that respects the DESTDIR setting to create an installation image in the
   directory specified by DESTDIR.

  Note

   make install does not take any explicit action to uninstall any older
   version of the library, or remove any files from an older version that do
   not exist any more in the new version. Use the created installation image
   to prepare an installable package in a native package format for your
   operating system distribution. Use your distribution's native package
   manager to properly install and update this library.

  Maintainer Mode (see README in the git repository to set up)

   make rpm or make deb, as appropriate, will:

    1. Increment an internal release number.

    2. Run make dist.

    3. Proceed and build a new release, creating the native packages in the
       rpm or deb subdirectory.

    4. Execute either $HOME/bin/rpmrepos.sh or $HOME/bin/debrepos.sh. This
       can be a script that does nothing, or it's intended to be the
       maintainer's script that pushes out the packages to a repository.

   ══════════════════════════════════════════════════════════════════════════

   Prev                                                                  Next
   Courier Unicode Library               Home               Using the library
