Skip to content

Build the deb and rpm packages with CMake - #68

Merged
sjoelund merged 1 commit into
masterfrom
cmake-packaging
Sep 20, 2026
Merged

sjoelund merged 1 commit into
masterfrom
cmake-packaging

Conversation

@sjoelund

Copy link
Copy Markdown
Member

The Autoconf build is on its way out, so debian/rules and the RPM spec now configure, build and install with CMake. The binary packages and their names are unchanged; what moved between them is forced by the CMake install layout.

debian/rules also loses the cross-compile bootstrap -- Jenkins builds armhf and arm64 natively on arm docker nodes, and CMake has no equivalent of --with-omc -- and passes DEB_HOST_MULTIARCH to dh_shlibdeps, which is what CMake names the libdir after.

Two things the packaging has to do for CMake. It writes OMVERSION.txt from REVISION, because the source tarball carries no git and the packages would otherwise be built as version 0.1.1 and never upgrade. And it runs libraries/install-index.mos itself, because the omlibrary target downloads with <prefix>/bin/omc, which during a DESTDIR build is not the omc just staged.

OM_RUST_RESULT_READERS, OM_RUST_RESULT_WRITERS and OM_ENABLE_RUST_SIM_RUNTIME are on. The build-deps images install a stable Rust toolchain with rustup, so there is nothing to add to Build-Depends or BuildRequires.

Contents that moved:

Package Change
omc-common + gc headers, + share/omc/sources
libomcsimulation + libomc_result, - opcua, - ryu
omedit + the bundled language server
libomplot + Depends: libomcsimulation
libomc-dev dropped, no files left to ship
libomplot-dev dropped, no files left to ship

The gc headers are the one that would have broken every model build: generated code includes <gc.h>, and CMake installs it in include/omc rather than include/omc/c. libomc_result and libSimulationRuntimeRust are new, and OMPlotLib links the former, hence the libomplot dependency. OPC-UA and ryu are not installed by the CMake build at all; opc/ is commented out of SimulationRuntime.

Dead targets removed while here: i386, of which libomccpp held the last reference, and the EL6/EL7 blocks in the spec, including cmake3 and devtoolset-11. The RPM targets are el8, el9, el10, fc43 and fc44.

Assisted-by: Claude Opus 5 (1M context)

The Autoconf build is on its way out, so `debian/rules` and the RPM
spec now configure, build and install with CMake. The binary packages
and their names are unchanged; what moved between them is forced by
the CMake install layout.

`debian/rules` also loses the cross-compile bootstrap -- Jenkins builds
armhf and arm64 natively on arm docker nodes, and CMake has no
equivalent of `--with-omc` -- and passes `DEB_HOST_MULTIARCH` to
`dh_shlibdeps`, which is what CMake names the libdir after.

Two things the packaging has to do for CMake. It writes
`OMVERSION.txt` from `REVISION`, because the source tarball carries no
git and the packages would otherwise be built as version 0.1.1 and
never upgrade. And it runs `libraries/install-index.mos` itself,
because the `omlibrary` target downloads with `<prefix>/bin/omc`,
which during a `DESTDIR` build is not the `omc` just staged.

`OM_RUST_RESULT_READERS`, `OM_RUST_RESULT_WRITERS` and
`OM_ENABLE_RUST_SIM_RUNTIME` are on. The build-deps images install a
stable Rust toolchain with rustup, so there is nothing to add to
`Build-Depends` or `BuildRequires`.

Contents that moved:

| Package            | Change                              |
| ------------------ | ----------------------------------- |
| `omc-common`       | + gc headers, + `share/omc/sources` |
| `libomcsimulation` | + `libomc_result`, - opcua, - ryu   |
| `omedit`           | + the bundled language server       |
| `libomplot`        | + `Depends: libomcsimulation`       |
| `libomc-dev`       | dropped, no files left to ship      |
| `libomplot-dev`    | dropped, no files left to ship      |

The gc headers are the one that would have broken every model build:
generated code includes `<gc.h>`, and CMake installs it in
`include/omc` rather than `include/omc/c`. `libomc_result` and
`libSimulationRuntimeRust` are new, and OMPlotLib links the former,
hence the `libomplot` dependency. OPC-UA and ryu are not installed by
the CMake build at all; `opc/` is commented out of SimulationRuntime.

Dead targets removed while here: i386, of which `libomccpp` held the
last reference, and the EL6/EL7 blocks in the spec, including cmake3
and devtoolset-11. The RPM targets are el8, el9, el10, fc43 and fc44.

Assisted-by: Claude Opus 5 (1M context)
@sjoelund
sjoelund merged commit 88f37f0 into master Sep 20, 2026
10 checks passed
@sjoelund
sjoelund deleted the cmake-packaging branch September 20, 2026 13:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant