Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,13 @@ jammy, noble, resolute and trixie on amd64, armhf and arm64.
* [`control`](./debian/control) — one source stanza and 18 binary packages (`omc`,
`libomc`, `omedit`, `omshell`, `omnotebook`, `omsimulator`, `omlibrary`, …). Some
build dependencies carry alternatives (`libhdf5-serial-dev | libhdf5-dev`) because a
single control file has to satisfy every distribution in the matrix. Note that `apt`
installs the *first* alternative it can, so an alternative is not a way to say
"either of these will do" — it only helps where the first one is unavailable.
single control file has to satisfy every distribution in the matrix. An alternative
only helps where the first one is unavailable: `apt` skips the whole group when any
member is already installed or being installed, and its newer solver need not pick
the first one at all. A dependency that some distributions cannot satisfy is gated
on a build profile instead: `qt6-httpserver-dev <!pkg.openmodelica.nomcp>` (jammy has
no QtHttpServer, so apt-build passes `-Ppkg.openmodelica.nomcp` there, and
`debian/rules` fails when the profile is off and CMake did not find QtHttpServer).
* [`rules`](./debian/rules) — a hand-written rules file, *not* the `dh` sequencer. It
configures and builds the tree itself — with CMake, into `obj-<triplet>/` — and then
calls each `dh_*` helper explicitly from the `install` and `binary-arch` targets.
Expand Down Expand Up @@ -107,9 +111,11 @@ done
dpkg-source -x "openmodelica_$V-1.dsc"
rm -rf "openmodelica-$V/debian" && cp -a /buildscripts/debian "openmodelica-$V/debian"
sed -i -e "s/@REV@/$V/" -e "s/@TIME@/$(date -R)/" "openmodelica-$V/debian/changelog"
cd "openmodelica-$V" && dpkg-buildpackage -rfakeroot -b -j"$(nproc)"
cd "openmodelica-$V" && dpkg-buildpackage -rfakeroot -b -j"$(nproc)" -Ppkg.openmodelica.nomcp
```

Drop `-Ppkg.openmodelica.nomcp` for any distribution newer than jammy.

The first run takes hours. Afterwards `build-stamp` is cached, so re-running only
`fakeroot debian/rules binary-arch` after another `debian/` tweak takes minutes.

Expand Down
4 changes: 2 additions & 2 deletions debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ Build-Depends: debhelper-compat (= 13),
qt6-shadertools-dev | libqt6shadertools6-dev,
# Qt links libGL.so by absolute path; only jammy's qt6-base-dev omits it
libgl-dev,
# QtHttpServer needs Qt 6.4; OMEdit builds without the MCP server on jammy
qt6-httpserver-dev | qt6-base-dev,
# QtHttpServer needs Qt 6.4: jammy builds with -Ppkg.openmodelica.nomcp
qt6-httpserver-dev <!pkg.openmodelica.nomcp>,
flex,
bison,
liblpsolve55-dev (>= 5.5.0.10),
Expand Down
4 changes: 4 additions & 0 deletions debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@ build-stamp:
-DOM_RUST_RESULT_READERS=ON \
-DOM_RUST_RESULT_WRITERS=ON \
-DOM_ENABLE_RUST_SIM_RUNTIME=ON
ifeq (,$(filter pkg.openmodelica.nomcp,$(DEB_BUILD_PROFILES)))
grep -q '^Qt6HttpServer_DIR:PATH=/' $(BUILD)/CMakeCache.txt || \
{ echo 'QtHttpServer not found; build with -Ppkg.openmodelica.nomcp to drop the MCP server' >&2; exit 1; }
endif
cmake --build $(BUILD) $(BUILDFLAGS)
touch build-stamp

Expand Down
Loading