From d8a241cb925adefae27732b5aca1a8748ec6d9f7 Mon Sep 17 00:00:00 2001 From: AnHeuermann <38031952+AnHeuermann@users.noreply.github.com> Date: Thu, 17 Sep 2026 17:01:17 +0200 Subject: [PATCH] Build the packages with CPack instead of source packages The Linux packages are now built with CMake and CPack straight from a git checkout of OpenModelica. No more source packages: no .dsc, no debian/rules, no RPM spec. What goes into which package is defined once, in OpenModelica's cmake/packaging/, where the same definition also serves the Windows installer. This repository keeps only what decides how OpenModelica is *built* for a package. cpack/build-packages.sh configures, builds and installs OpenModelica, downloads the Modelica library cache with the staged omc, and runs `cpack -G DEB` or `-G RPM`. The build policy is the one the debhelper rules and the spec carried: clang when installed, Qt 6 where its WebEngine is installed and Qt 5 elsewhere, no C++ runtime on armhf, OMOptim and encryption off, and the testsuite off so omc-diff stays out of the omc package. It checks up front that the checkout has a version to package, so a shallow clone fails in seconds instead of after the build. cpack/test-packages.sh installs packages into a clean system from a local apt or dnf repository, so the dependencies between them are resolved the way a user's package manager resolves them, and then compiles and simulates a model. Installing the files by name is how an omc that could not find the simulation runtime went unnoticed before. CI follows: packaging.yml shellchecks the scripts, since the metadata it used to check is gone, and build-deb.yml becomes build-packages.yml, which builds in the ubuntu-24.04 build-deps image and runs the install test in a clean ubuntu:24.04. Removed: debian/, rpm/, .ci/, and the standalone OMPlot, OMOptim and OpenModelica-doc source packages no pipeline built. The README lists what OpenModelica's CPack definition still has to take over from them (old package names, /usr prefix, desktop and mime files, copyright, stripping, the RPM layout) and what was obsolete. Verified end to end on Ubuntu 26.04: build-packages.sh built all 14 packages (version 1.28.0~dev-767-g7e8f9a2110), and test-packages.sh, installing only openmodelica-omc into a clean ubuntu:26.04, pulled in openmodelica-simrt and simulated a model. Running it caught a bug review had not: under pipefail, find exiting 1 on an unreadable directory made a Qt 6 system look like Qt 5. Do not merge before apt-build stops copying debian/ and fetching the RPM spec from this repository's master. Co-Authored-By: Claude Opus 5 --- .ci/check-debian-packaging.sh | 175 ------------- .ci/check-rpm-spec.sh | 78 ------ .github/workflows/build-deb.yml | 118 --------- .github/workflows/build-packages.yml | 103 ++++++++ .github/workflows/packaging.yml | 60 ++--- OMOptim/debian/changelog | 4 - OMOptim/debian/control | 22 -- OMOptim/debian/copyright | 286 ---------------------- OMOptim/debian/desktops/omoptim.desktop | 13 - OMOptim/debian/dirs | 1 - OMOptim/debian/omoptim.install | 3 - OMOptim/debian/rules | 80 ------ OMOptim/debian/source/format | 1 - OMPlot/debian/changelog | 4 - OMPlot/debian/control | 37 --- OMPlot/debian/copyright | 285 ---------------------- OMPlot/debian/libomplot-dev.install | 1 - OMPlot/debian/libomplot.install | 2 - OMPlot/debian/omplot.install | 1 - OMPlot/debian/omplot.manpages | 1 - OMPlot/debian/rules | 80 ------ OMPlot/debian/source/format | 1 - OpenModelica-doc/debian/changelog | 4 - OpenModelica-doc/debian/control | 15 -- OpenModelica-doc/debian/copyright | 277 --------------------- OpenModelica-doc/debian/omc-doc.install | 1 - OpenModelica-doc/debian/rules | 51 ---- OpenModelica-doc/debian/source/format | 1 - OpenModelica-doc/debian/source/options | 1 - OpenModelica/debian | 1 - README.md | 281 ++++++++++----------- cpack/build-packages.sh | 227 +++++++++++++++++ cpack/test-packages.sh | 106 ++++++++ debian/OMEdit.sh | 3 - debian/changelog | 4 - debian/control | 281 --------------------- debian/copyright | 298 ----------------------- debian/desktops/omedit.desktop | 14 -- debian/desktops/omnotebook.desktop | 14 -- debian/desktops/omoptim.desktop | 13 - debian/desktops/omshell-terminal.desktop | 13 - debian/desktops/omshell.desktop | 13 - debian/dirs | 4 - debian/drcontrol.install | 1 - debian/drmodelica.install | 1 - debian/icons/OMNotebook_icon.xpm | 40 --- debian/icons/OMShell-terminal_icon.xpm | 51 ---- debian/icons/OMShell_icon.xpm | 51 ---- debian/libomc-dev.install | 4 - debian/libomc.install | 11 - debian/libomccpp.install | 2 - debian/libomcsimulation.install | 47 ---- debian/libomplot-dev.install | 1 - debian/libomplot.install | 2 - debian/libomsensplugin.install | 2 - debian/libomsimulator.install | 5 - debian/omc-common.install | 5 - debian/omc.README.Debian | 7 - debian/omc.docs | 2 - debian/omc.install | 4 - debian/omc.prerm | 3 - debian/omedit.install | 4 - debian/omedit.menu | 9 - debian/omlibrary.install | 1 - debian/omnotebook.install | 5 - debian/omnotebook.menu | 9 - debian/omnotebook.sharedmimeinfo | 14 -- debian/omplot.install | 1 - debian/omshell-terminal.install | 3 - debian/omshell-terminal.menu | 9 - debian/omshell.install | 5 - debian/omshell.menu | 9 - debian/omsimulator.install | 2 - debian/rules | 177 -------------- debian/source/format | 1 - debian/source/options | 1 - debian/testmodels/flat_dcmotor.mos | 3 - rpm/Makefile | 6 - rpm/PATCHES/qjson-qt5.patch | 12 - rpm/PATCHES/qwt-link-1.9.patch | 12 - rpm/PATCHES/qwt-link.patch | 12 - rpm/SPECS/openmodelica.spec.tpl | 261 -------------------- 82 files changed, 577 insertions(+), 3196 deletions(-) delete mode 100755 .ci/check-debian-packaging.sh delete mode 100755 .ci/check-rpm-spec.sh delete mode 100644 .github/workflows/build-deb.yml create mode 100644 .github/workflows/build-packages.yml delete mode 100644 OMOptim/debian/changelog delete mode 100644 OMOptim/debian/control delete mode 100644 OMOptim/debian/copyright delete mode 100644 OMOptim/debian/desktops/omoptim.desktop delete mode 100644 OMOptim/debian/dirs delete mode 100644 OMOptim/debian/omoptim.install delete mode 100755 OMOptim/debian/rules delete mode 100644 OMOptim/debian/source/format delete mode 100644 OMPlot/debian/changelog delete mode 100644 OMPlot/debian/control delete mode 100644 OMPlot/debian/copyright delete mode 100644 OMPlot/debian/libomplot-dev.install delete mode 100644 OMPlot/debian/libomplot.install delete mode 100644 OMPlot/debian/omplot.install delete mode 100644 OMPlot/debian/omplot.manpages delete mode 100755 OMPlot/debian/rules delete mode 100644 OMPlot/debian/source/format delete mode 100644 OpenModelica-doc/debian/changelog delete mode 100644 OpenModelica-doc/debian/control delete mode 100644 OpenModelica-doc/debian/copyright delete mode 100644 OpenModelica-doc/debian/omc-doc.install delete mode 100755 OpenModelica-doc/debian/rules delete mode 100644 OpenModelica-doc/debian/source/format delete mode 100644 OpenModelica-doc/debian/source/options delete mode 120000 OpenModelica/debian create mode 100755 cpack/build-packages.sh create mode 100755 cpack/test-packages.sh delete mode 100644 debian/OMEdit.sh delete mode 100644 debian/changelog delete mode 100644 debian/control delete mode 100644 debian/copyright delete mode 100644 debian/desktops/omedit.desktop delete mode 100644 debian/desktops/omnotebook.desktop delete mode 100644 debian/desktops/omoptim.desktop delete mode 100644 debian/desktops/omshell-terminal.desktop delete mode 100644 debian/desktops/omshell.desktop delete mode 100644 debian/dirs delete mode 100644 debian/drcontrol.install delete mode 100644 debian/drmodelica.install delete mode 100644 debian/icons/OMNotebook_icon.xpm delete mode 100644 debian/icons/OMShell-terminal_icon.xpm delete mode 100644 debian/icons/OMShell_icon.xpm delete mode 100644 debian/libomc-dev.install delete mode 100644 debian/libomc.install delete mode 100644 debian/libomccpp.install delete mode 100644 debian/libomcsimulation.install delete mode 100644 debian/libomplot-dev.install delete mode 100644 debian/libomplot.install delete mode 100644 debian/libomsensplugin.install delete mode 100644 debian/libomsimulator.install delete mode 100644 debian/omc-common.install delete mode 100644 debian/omc.README.Debian delete mode 100644 debian/omc.docs delete mode 100644 debian/omc.install delete mode 100755 debian/omc.prerm delete mode 100644 debian/omedit.install delete mode 100644 debian/omedit.menu delete mode 100644 debian/omlibrary.install delete mode 100644 debian/omnotebook.install delete mode 100644 debian/omnotebook.menu delete mode 100644 debian/omnotebook.sharedmimeinfo delete mode 100644 debian/omplot.install delete mode 100644 debian/omshell-terminal.install delete mode 100644 debian/omshell-terminal.menu delete mode 100644 debian/omshell.install delete mode 100644 debian/omshell.menu delete mode 100644 debian/omsimulator.install delete mode 100755 debian/rules delete mode 100644 debian/source/format delete mode 100644 debian/source/options delete mode 100644 debian/testmodels/flat_dcmotor.mos delete mode 100644 rpm/Makefile delete mode 100644 rpm/PATCHES/qjson-qt5.patch delete mode 100644 rpm/PATCHES/qwt-link-1.9.patch delete mode 100644 rpm/PATCHES/qwt-link.patch delete mode 100644 rpm/SPECS/openmodelica.spec.tpl diff --git a/.ci/check-debian-packaging.sh b/.ci/check-debian-packaging.sh deleted file mode 100755 index 4d27539..0000000 --- a/.ci/check-debian-packaging.sh +++ /dev/null @@ -1,175 +0,0 @@ -#!/bin/sh -# Static validation of the debian/ packaging metadata in this repository. -# -# A real package build compiles all of OpenModelica and takes hours, so the -# nightly Jenkins job is the only place the packaging is exercised end to end. -# This script checks what can be checked in seconds: that the control files -# parse, that debhelper accepts the declared compatibility level on this -# distribution, that debian/rules only calls helpers that still exist and only -# passes options that still exist at that compat level, and that every -# debian/. file belongs to a binary package we build. -# -# It does NOT catch a .install glob that stopped matching because upstream moved -# a file; only a real build does that. -# -# Run it from the top of the repository, inside a distribution we ship for: -# -# docker run --rm -v "$PWD:/src" -w /src ubuntu:24.04 sh -c \ -# 'apt-get update -qq && apt-get install -qy --no-install-recommends \ -# debhelper dpkg-dev && .ci/check-debian-packaging.sh' - -set -eu - -# Keep in sync with the compat level declared in the control files. -EXPECTED_COMPAT=13 - -TREES="debian OMPlot/debian OMOptim/debian OpenModelica-doc/debian" - -# debhelper config files named debian/.. A typo in the -# package part makes debhelper ignore the file without a word, and the package -# then ships empty, so the package name has to exist in debian/control. -PKG_SUFFIXES="install docs dirs links examples manpages menu menu-method info - init service tmpfiles sharedmimeinfo lintian-overrides preinst postinst prerm - postrm triggers README.Debian NEWS" - -# Command/option combinations debhelper has removed. The compat level each was -# dropped in is listed in debhelper-compat-upgrade-checklist(7); add a line here -# when a helper we call loses an option we pass. -# Fields: helper:option:compat level that removed it:what to use instead -removed_usage() { - cat <<'REMOVED' -dh_install:--list-missing:12:dh_missing --list-missing -dh_install:--fail-missing:12:dh_missing --fail-missing -dh_clean:-k:12:dh_prep -dh_installinit:--no-restart-on-upgrade:12:--no-stop-on-upgrade -REMOVED -} - -status=0 -fail() { echo " FAIL: $*" >&2; status=1; } -ok() { echo " ok: $*"; } - -command -v dh_assistant >/dev/null 2>&1 || { - echo "dh_assistant not found; this script needs debhelper >= 13.5" >&2 - exit 2 -} - -scratch=$(mktemp -d) -trap 'rm -rf "$scratch"' EXIT - -echo "debhelper $(dpkg-query -f '${Version}' -W debhelper) on $(. /etc/os-release; echo "$PRETTY_NAME")" - -for tree in $TREES; do - echo "== $tree" - work="$scratch/$(echo "$tree" | tr / _)" - mkdir -p "$work" - cp -a "$tree" "$work/debian" - - # debian/changelog is a template. The source-package job fills it in the same - # way (see update-source-repo.py and make-packages.py in the apt-build repo). - sed -i -e 's/@REV@/1.0.0~dev-0-g0000000/' -e 's/@DISTS@/unstable/' \ - -e "s/@TIME@/$(date -R)/" "$work/debian/changelog" - - if [ -e "$work/debian/compat" ]; then - fail "debian/compat still exists; the compat level belongs in Build-Depends: debhelper-compat" - else - ok "no stale debian/compat" - fi - - if ! ( - cd "$work" || exit 1 - - if ! changelog=$(dpkg-parsechangelog 2>&1); then - printf '%s\n' "$changelog" >&2 - echo " FAIL: debian/changelog does not parse" >&2 - exit 1 - fi - echo " ok: changelog parses ($(printf '%s\n' "$changelog" | sed -n 's/^Source: //p')" \ - "$(printf '%s\n' "$changelog" | sed -n 's/^Version: //p'))" - - if ! perl -MDpkg::Control::Info -e ' - my $c = Dpkg::Control::Info->new("debian/control"); - print $_->{Package}, "\n" for $c->get_packages(); - ' > packages.txt 2> control.err; then - cat control.err >&2 - echo " FAIL: debian/control does not parse" >&2 - exit 1 - fi - if ! [ -s packages.txt ]; then - echo " FAIL: debian/control declares no binary packages" >&2 - exit 1 - fi - echo " ok: control parses ($(wc -l < packages.txt | tr -d ' ') binary packages)" - - # The check that catches a mis-declared compat level: debhelper accepts only - # "debhelper-compat (= N)", and errors out if this distribution's debhelper - # does not support N. - if ! compat=$(dh_assistant active-compat-level 2>&1); then - printf '%s\n' "$compat" >&2 - echo " FAIL: debhelper rejects the declared compatibility level" >&2 - exit 1 - fi - compat=$(printf '%s\n' "$compat" | sed -n 's/.*"active-compat-level":\([0-9]*\).*/\1/p') - if [ "$compat" != "$EXPECTED_COMPAT" ]; then - echo " FAIL: active compat level is '$compat', expected $EXPECTED_COMPAT" >&2 - exit 1 - fi - echo " ok: compat level $compat" - ); then - status=1 - continue - fi - - packages="$work/packages.txt" - - # Every helper debian/rules calls has to still ship in this debhelper. - sed -e 's/#.*//' "$tree/rules" > "$work/rules.uncommented" - missing="" - for helper in $(grep -o 'dh_[a-z0-9_]*' "$work/rules.uncommented" | sort -u); do - command -v "$helper" >/dev/null 2>&1 || missing="$missing $helper" - done - if [ -n "$missing" ]; then - fail "debian/rules calls helpers that no longer exist:$missing" - else - ok "every dh_* helper called by debian/rules exists" - fi - - # ... and must not pass options removed at or below our compat level. - removed="" - removed_usage > "$work/removed-usage" - while IFS=: read -r cmd opt gone use; do - [ -n "$cmd" ] || continue - [ "$EXPECTED_COMPAT" -ge "$gone" ] || continue - if grep -q -- "$cmd[^&|;]*[[:space:]]$opt\\b" "$work/rules.uncommented"; then - removed="$removed - $cmd $opt (gone in compat $gone; use: $use)" - fi - done < "$work/removed-usage" - if [ -n "$removed" ]; then - fail "debian/rules uses debhelper options removed at compat $EXPECTED_COMPAT:$removed" - else - ok "no debhelper options removed at compat $EXPECTED_COMPAT" - fi - - orphans="" - for f in "$tree"/*; do - [ -f "$f" ] || continue - base=${f##*/} - for suffix in $PKG_SUFFIXES; do - case "$base" in - *".$suffix") - pkg=${base%".$suffix"} - grep -qx "$pkg" "$packages" || orphans="$orphans $base" - ;; - esac - done - done - if [ -n "$orphans" ]; then - fail "config files naming a package that is not in debian/control:$orphans" - else - ok "every debian/. file matches a binary package" - fi -done - -[ $status -eq 0 ] && echo "all checks passed" -exit $status diff --git a/.ci/check-rpm-spec.sh b/.ci/check-rpm-spec.sh deleted file mode 100755 index 3af633f..0000000 --- a/.ci/check-rpm-spec.sh +++ /dev/null @@ -1,78 +0,0 @@ -#!/bin/sh -# Static validation of rpm/SPECS/openmodelica.spec.tpl. -# -# The template is not a valid spec file on its own: the RPM job in the apt-build -# repository substitutes a set of upper-case placeholders into it before calling -# rpmbuild (see the rpmInfo map in apt-build's Jenkinsfile). This script does -# the same substitution with representative values and then asks rpm itself to -# parse the result, which catches the syntax mistakes that have broken nightly -# RPM builds before: a missing %, an empty %define, a stray comment. -# -# It does not build anything, so it says nothing about BuildRequires being -# installable or the %files list matching what the build produces. -# -# Run it from the top of the repository, inside a distribution we ship for: -# -# docker run --rm -v "$PWD:/src" -w /src fedora:43 sh -c \ -# 'dnf install -y rpm-build >/dev/null && .ci/check-rpm-spec.sh' - -set -eu - -TEMPLATE=rpm/SPECS/openmodelica.spec.tpl - -# Representative values, in the order the Jenkins job applies them. They only -# have to be shaped like the real thing; the point is to parse the spec. -NAME=openmodelica-nightly -DEBVERSION=1.28.0~dev-489-gda9d1ce -RPMVERSION=1.28.0~dev~489~gda9d1ce -CONFIGUREFLAGS= -DOCUMENTATIONVERSION=latest -PATCHCMDS= -PATCHES= -PRIORITY=1018000 -PRIVATELIBS='lib.*Modelica.*|lib[oO][mM][^n].*[.]so.*|libklu[.]so.*|libsundials.*' -RELEASENUM=1 -BRANCH=nightly -DATE=$(LC_ALL=C date "+%a %b %d %Y") - -command -v rpmspec >/dev/null 2>&1 || { - echo "rpmspec not found; install rpm-build" >&2 - exit 2 -} - -scratch=$(mktemp -d) -trap 'rm -rf "$scratch"' EXIT -spec="$scratch/openmodelica.spec" - -# '%' is safe as the sed delimiter: none of the values above contain one. -sed -e "s%NAME%$NAME%g" \ - -e "s%DEBVERSION%$DEBVERSION%g" \ - -e "s%RPMVERSION%$RPMVERSION%g" \ - -e "s%CONFIGUREFLAGS%$CONFIGUREFLAGS%g" \ - -e "s%DOCUMENTATIONVERSION%$DOCUMENTATIONVERSION%g" \ - -e "s%PATCHCMDS%$PATCHCMDS%g" \ - -e "s%PATCHES%$PATCHES%g" \ - -e "s%PRIORITY%$PRIORITY%g" \ - -e "s%PRIVATELIBS%$PRIVATELIBS%g" \ - -e "s%RELEASENUM%$RELEASENUM%g" \ - -e "s%BRANCH%$BRANCH%g" \ - -e "s%DATE%$DATE%g" \ - "$TEMPLATE" > "$spec" - -echo "rpm $(rpm --version | awk '{print $3}') on $(. /etc/os-release; echo "$PRETTY_NAME")" - -if ! out=$(rpmspec -P "$spec" 2>&1 >/dev/null); then - printf '%s\n' "$out" >&2 - echo " FAIL: $TEMPLATE does not parse" >&2 - exit 1 -fi -[ -z "$out" ] || printf '%s\n' "$out" -echo " ok: template parses" - -nevr=$(rpmspec -q --srpm --qf '%{name} %{version}-%{release}\n' "$spec" 2>/dev/null) -echo " ok: source package would be $nevr" - -subpkgs=$(rpmspec -q --qf '%{name}\n' "$spec" 2>/dev/null | sort -u | tr '\n' ' ') -echo " ok: binary packages: $subpkgs" - -echo "all checks passed" diff --git a/.github/workflows/build-deb.yml b/.github/workflows/build-deb.yml deleted file mode 100644 index a82756c..0000000 --- a/.github/workflows/build-deb.yml +++ /dev/null @@ -1,118 +0,0 @@ -# Full build of OpenModelica plus the Debian packages, the way the nightly -# Jenkins job does it: configure/make (autoconf) from a git checkout, then -# dpkg-buildpackage using the debian/ directory of this repository. -# -# This is the only job that can catch a .install glob that stopped matching -# because upstream moved or dropped a file -- the failure that breaks the -# nightly build. It compiles all of OpenModelica, so it takes hours. The fast -# metadata-only checks live in packaging.yml. -# -# Uses the Autoconf + Makefile build; to be switched to the CMake build later. -name: full deb build - -on: - workflow_dispatch: - inputs: - openmodelica-ref: - description: OpenModelica git ref to build - default: master - # Opt-in per pull request: add the "CI/Full Debian Packaging" label. This - # costs hours of runner time, so it never starts on its own -- and it does - # not run on a schedule either, because the nightly Jenkins build already - # catches an upstream move that broke an .install glob. - pull_request: - types: [labeled, synchronize, reopened] - -permissions: - contents: read - -jobs: - build: - # On a pull request, run only while the label is on it. The `labeled` case - # is spelled out separately so that adding some *other* label to a pull - # request that already carries this one does not start the build again. - if: >- - github.event_name != 'pull_request' || - (github.event.action == 'labeled' && - github.event.label.name == 'CI/Full Debian Packaging') || - (github.event.action != 'labeled' && - contains(github.event.pull_request.labels.*.name, 'CI/Full Debian Packaging')) - # Only ubuntu-latest: Jenkins covers the rest of the distribution matrix. - runs-on: ubuntu-latest - timeout-minutes: 360 - - steps: - - name: Check out the build scripts - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - path: buildscripts - - - name: Check out OpenModelica - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - repository: OpenModelica/OpenModelica - ref: ${{ inputs.openmodelica-ref || 'master' }} - submodules: recursive - # The package version comes from git describe, so the tags and the - # history behind them have to be there. - fetch-depth: 0 - path: openmodelica - - - name: Free up disk space - run: | - # A full OpenModelica build does not fit next to the preinstalled - # toolchains on a hosted runner. - sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc \ - /usr/local/share/boost "$AGENT_TOOLSDIRECTORY" || true - df -h / - - - name: Assemble the source tree - working-directory: openmodelica - run: | - # Version string exactly as update-source-repo.py builds it: - # v1.28.0-dev-489-gda9d1ce -> 1.28.0~dev-489-gda9d1ce - version=$(git describe --abbrev=7 --tags --match='v*.*.*' 2>/dev/null | - sed -e 's/^v//' -e 's/-/~/') || true - if [ -z "$version" ]; then - version="0.0.0~ci-$(git rev-parse --short HEAD)" - echo "git describe found no tag; using $version" - fi - echo "Building openmodelica $version" - - rm -rf debian - cp -a ../buildscripts/debian debian - sed -i -e "s/@REV@/$version/" -e "s/@TIME@/$(date -R)/" debian/changelog - head -1 debian/changelog - - - name: Install build dependencies - run: | - sudo apt-get update -qq - sudo DEBIAN_FRONTEND=noninteractive apt-get install -qy \ - --no-install-recommends build-essential devscripts equivs fakeroot - sudo mk-build-deps --install --remove \ - --tool 'apt-get -y --no-install-recommends' \ - openmodelica/debian/control - - - name: Build the packages - working-directory: openmodelica - run: dpkg-buildpackage -rfakeroot -b -us -uc -j"$(nproc)" - - - name: Show what was built - if: always() - run: | - ls -la ./*.deb || true - for deb in ./*.deb; do - [ -e "$deb" ] || continue - echo "=== $deb" - dpkg-deb -I "$deb" | sed -n 's/^ //p' | grep -E '^(Package|Version|Architecture|Depends):' || true - dpkg-deb -c "$deb" | wc -l | xargs echo " files:" - done - - - name: Upload packages - if: always() - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: debs - path: '*.deb' - if-no-files-found: warn - retention-days: 7 diff --git a/.github/workflows/build-packages.yml b/.github/workflows/build-packages.yml new file mode 100644 index 0000000..b0d39e9 --- /dev/null +++ b/.github/workflows/build-packages.yml @@ -0,0 +1,103 @@ +# Full build of OpenModelica into Debian packages, with cpack/build-packages.sh, +# followed by installing them into a clean container and simulating a model with +# cpack/test-packages.sh. +# +# This is the only job that proves the packages actually work: that the build +# dependencies are enough, that CPack's Depends: pull in everything omc needs at +# run time, and that the dependencies *between* the OpenModelica packages are +# declared. It compiles all of OpenModelica, so it takes hours. The fast checks +# live in packaging.yml. +name: full package build + +on: + workflow_dispatch: + inputs: + openmodelica-ref: + description: OpenModelica git ref to build + default: master + # Opt-in per pull request: add the "CI/Full Debian Packaging" label. This + # costs hours of runner time, so it never starts on its own. + pull_request: + types: [labeled, synchronize, reopened] + +permissions: + contents: read + +env: + # Build in the image the nightly builds use, and test in a bare image of the + # same distribution: a package only installs on the distribution it was built for. + BUILD_IMAGE: ghcr.io/openmodelica/build-deps:ubuntu-24.04 + TEST_IMAGE: ubuntu:24.04 + +jobs: + build: + # On a pull request, run only while the label is on it. The `labeled` case + # is spelled out separately so that adding some *other* label to a pull + # request that already carries this one does not start the build again. + if: >- + github.event_name != 'pull_request' || + (github.event.action == 'labeled' && + github.event.label.name == 'CI/Full Debian Packaging') || + (github.event.action != 'labeled' && + contains(github.event.pull_request.labels.*.name, 'CI/Full Debian Packaging')) + # One distribution only; Jenkins covers the rest of the matrix. + runs-on: ubuntu-latest + timeout-minutes: 360 + + steps: + - name: Check out the build scripts + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + path: buildscripts + + - name: Check out OpenModelica + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + repository: OpenModelica/OpenModelica + ref: ${{ inputs.openmodelica-ref || 'master' }} + submodules: recursive + # The package version comes from git describe, so the tags and the + # history behind them have to be there. + fetch-depth: 0 + path: openmodelica + + - name: Free up disk space + run: | + # A full OpenModelica build does not fit next to the preinstalled + # toolchains on a hosted runner. + sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc \ + /usr/local/share/boost "$AGENT_TOOLSDIRECTORY" || true + df -h / + + - name: Build the packages + run: | + # The checkout belongs to the runner user and the container runs as + # root, so git would refuse to describe it without safe.directory. + docker run --rm -v "$GITHUB_WORKSPACE:/work" -w /work "$BUILD_IMAGE" bash -c ' + git config --global --add safe.directory "*" + buildscripts/cpack/build-packages.sh -G DEB -B /work/build -o /work/packages openmodelica + ' + + - name: Show what was built + if: always() + run: | + for deb in packages/*.deb; do + [ -e "$deb" ] || { echo "no packages"; break; } + echo "=== $(basename "$deb")" + dpkg-deb -f "$deb" Package Version Architecture Depends | sed 's/^/ /' + dpkg-deb -c "$deb" | wc -l | xargs echo " files:" + done + + - name: Install into a clean container and simulate + run: | + docker run --rm -v "$GITHUB_WORKSPACE:/work:ro" "$TEST_IMAGE" \ + /work/buildscripts/cpack/test-packages.sh /work/packages + + - name: Upload packages + if: always() + uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 + with: + name: debs + path: packages/*.deb + if-no-files-found: warn + retention-days: 7 diff --git a/.github/workflows/packaging.yml b/.github/workflows/packaging.yml index 88c2422..3d0486e 100644 --- a/.github/workflows/packaging.yml +++ b/.github/workflows/packaging.yml @@ -1,13 +1,12 @@ -# Fast sanity checks on the packaging metadata in this repository. +# Fast checks on the packaging scripts in this repository. # -# The nightly Jenkins job in the apt-build repository is the only place a -# package is actually built, and it takes hours, so nothing here builds -# anything. These jobs only check that the metadata is well formed and that -# every distribution we ship for still accepts it -- which is what breaks when -# a helper, a compat level or a spec macro is retired under us. +# Nothing here builds OpenModelica; that takes hours and lives in +# build-packages.yml. What is left to check in seconds is the scripts themselves: +# they drive a multi-hour build, so a mistake in them should fail here rather than +# at the end of one. # -# The image lists mirror current-linux-os-releases.json in the apt-build repo; -# update them when a distribution is added or goes EOL. +# What goes into which package is defined in the OpenModelica repository +# (cmake/packaging/), and checked by its own CI. name: packaging on: @@ -16,44 +15,15 @@ on: pull_request: workflow_dispatch: -jobs: - debian: - name: debian (${{ matrix.image }}) - runs-on: ubuntu-latest - container: ${{ matrix.image }} - strategy: - fail-fast: false - matrix: - image: - - ubuntu:jammy - - ubuntu:noble - - ubuntu:resolute - - debian:trixie - steps: - - name: Install debhelper - run: | - apt-get update -qq - DEBIAN_FRONTEND=noninteractive apt-get install -qy --no-install-recommends \ - debhelper dpkg-dev - - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - - run: .ci/check-debian-packaging.sh +permissions: + contents: read - rpm: - name: rpm (${{ matrix.image }}) +jobs: + shellcheck: runs-on: ubuntu-latest - container: ${{ matrix.image }} - strategy: - fail-fast: false - matrix: - image: - - almalinux:8 - - almalinux:9 - - almalinux:10 - - fedora:43 - - fedora:44 steps: - - name: Install rpm-build - run: | - (command -v dnf >/dev/null && dnf install -y rpm-build) || yum install -y rpm-build - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - - run: .ci/check-rpm-spec.sh + - name: Install shellcheck + run: command -v shellcheck || (sudo apt-get update -qq && sudo apt-get install -qy shellcheck) + - name: shellcheck + run: shellcheck cpack/*.sh diff --git a/OMOptim/debian/changelog b/OMOptim/debian/changelog deleted file mode 100644 index e64ea13..0000000 --- a/OMOptim/debian/changelog +++ /dev/null @@ -1,4 +0,0 @@ -omoptim (@REV@-1) @DISTS@; urgency=low - - * Automatic git build - -- OpenModelica Build System @TIME@ diff --git a/OMOptim/debian/control b/OMOptim/debian/control deleted file mode 100644 index 7764919..0000000 --- a/OMOptim/debian/control +++ /dev/null @@ -1,22 +0,0 @@ -Source: omoptim -Section: math -Priority: optional -Maintainer: OpenModelica Build System -Build-Depends: debhelper-compat (= 13), - libqt4-dev (>= 4.4.3), - omniidl:native (>= 4.0.0) | omniidl4:native | omniidl (>= 4.0.0) | omniidl4, - libomniorb4-dev, - autoconf, - omc-common, - libomplot-dev, - cmake -Standards-Version: 3.9.6 - -Package: omoptim -Section: math -Architecture: any -Depends: omc, - gnuplot, - ${shlibs:Depends}, - ${misc:Depends} -Description: A Modelica optimization tool for OpenModelica diff --git a/OMOptim/debian/copyright b/OMOptim/debian/copyright deleted file mode 100644 index 2dbe718..0000000 --- a/OMOptim/debian/copyright +++ /dev/null @@ -1,286 +0,0 @@ -Upstream Author: Open Source Modelica Consortium - http://www.openmodelica.org - -Copyright: OpenModelica as a whole is licensed under the OSMC Public -License [OSMC-PL]: - ---- Start of Definition of OSMC Public License --- - -/* - * This file is part of OpenModelica. - * - * Copyright (c) 1998-CurrentYear, Open Source Modelica Consortium (OSMC), - * c/o Linköpings universitet, Department of Computer and Information Science, - * SE-58183 Linköping, Sweden. - * - * All rights reserved. - * - * THIS PROGRAM IS PROVIDED UNDER THE TERMS OF GPL VERSION 3 LICENSE OR - * THIS OSMC PUBLIC LICENSE (OSMC-PL) VERSION 1.2. - * ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS PROGRAM CONSTITUTES - * RECIPIENT'S ACCEPTANCE OF THE OSMC PUBLIC LICENSE OR THE GPL VERSION 3, - * ACCORDING TO RECIPIENTS CHOICE. - * - * The OpenModelica software and the Open Source Modelica - * Consortium (OSMC) Public License (OSMC-PL) are obtained - * from OSMC, either from the above address, - * from the URLs: http://www.ida.liu.se/projects/OpenModelica or - * http://www.openmodelica.org, and in the OpenModelica distribution. - * GNU version 3 is obtained from: http://www.gnu.org/copyleft/gpl.html. - * - * This program is distributed WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE, EXCEPT AS EXPRESSLY SET FORTH - * IN THE BY RECIPIENT SELECTED SUBSIDIARY LICENSE CONDITIONS OF OSMC-PL. - * - * See the full OSMC Public License conditions for more details. - * - */ - ---- End of OSMC Public License Header --- - -The OSMC-PL is a public license for OpenModelica with three modes/alternatives -(GPL, OSMC-Internal-EPL, OSMC-External-EPL) for use and redistribution, -in source and/or binary/object-code form: - -* GPL. Any party (member or non-member of OSMC) may use and redistribute - OpenModelica under GPL version 3. - -* Level 1 members of OSMC may also use and redistribute OpenModelica under - OSMC-Internal-EPL conditions. - -* Level 2 members of OSMC may also use and redistribute OpenModelica under - OSMC-Internal-EPL or OSMC-External-EPL conditions. - -Definitions of OSMC Public license modes: - -* GPL = GPL version 3. - -* OSMC-Internal-EPL = These OSMC Public license conditions together with - Internally restricted EPL, i.e., EPL version 1.0 with the Additional - Condition that use and redistribution by an OSMC member is only allowed - within the OSMC member's own organization (i.e., its own legal entity), - or for an OSMC member paying a membership fee corresponding to the size - of the organization including all its affiliates, use and redistribution - is allowed within/between its affiliates. - -* OSMC-External-EPL = These OSMC Public license conditions together with - Externally restricted EPL, i.e., EPL version 1.0 with the Additional - Condition that use and redistribution by an OSMC member, or by a Licensed - Third Party Distributor having a redistribution agreement with that member, - to parties external to the OSMC member’s own organization (i.e., its own - legal entity) is only allowed in binary/object-code form, except the case of - redistribution to other OSMC members to which source is also allowed to be - distributed. - -[This has the consequence that an external party who wishes to use -OpenModelica in source form together with its own proprietary software in all -cases must be a member of OSMC]. - -In all cases of usage and redistribution by recipients, the following -conditions also apply: - -a) Redistributions of source code must retain the above copyright notice, - all definitions, and conditions. It is sufficient if the OSMC-PL Header is - present in each source file, if the full OSMC-PL is available in a prominent - and easily located place in the redistribution. - -b) Redistributions in binary/object-code form must reproduce the above - copyright notice, all definitions, and conditions. It is sufficient if the - OSMC-PL Header and the location in the redistribution of the full OSMC-PL - are present in the documentation and/or other materials provided with the - redistribution, if the full OSMC-PL is available in a prominent and easily - located place in the redistribution. - -c) A recipient must clearly indicate its chosen usage mode of OSMC-PL, - in accompanying documentation and in a text file OSMC-USAGE-MODE.txt, - provided with the distribution. - -d) Contributor(s) making a Contribution to OpenModelica thereby also makes a - Transfer of Contribution Copyright. In return, upon the effective date of - the transfer, OSMC grants the Contributor(s) a Contribution License of the - Contribution. OSMC has the right to accept or refuse Contributions. - -Definitions: - -"Subsidiary license conditions" means: - -The additional license conditions depending on the by the recipient chosen -mode of OSMC-PL, defined by GPL version 3.0 for GPL, and by EPL for -OSMC-Internal-EPL and OSMC-External-EPL. - -"OSMC-PL" means: - -Open Source Modelica Consortium Public License version 1.2, i.e., the license -defined here (the text between -"--- Start of Definition of OSMC Public License ---" and -"--- End of Definition of OSMC Public License ---", or later versions thereof. - -"OSMC-PL Header" means: - -Open Source Modelica Consortium Public License Header version 1.2, i.e., the -text between "--- Start of Definition of OSMC Public License ---" and -"--- End of OSMC Public License Header ---, or later versions thereof. - -"Contribution" means: - -a) in the case of the initial Contributor, the initial code and documentation - distributed under OSMC-PL, and - -b) in the case of each subsequent Contributor: - i) changes to OpenModelica, and - ii) additions to OpenModelica; - -where such changes and/or additions to OpenModelica originate from and are -distributed by that particular Contributor. A Contribution 'originates' from -a Contributor if it was added to OpenModelica by such Contributor itself or -anyone acting on such Contributor's behalf. - -For Contributors licensing OpenModelica under OSMC-Internal-EPL or -OSMC-External-EPL conditions, the following conditions also hold: - -Contributions do not include additions to the distributed Program which: (i) -are separate modules of software distributed in conjunction with OpenModelica -under their own license agreement, (ii) are separate modules which are not -derivative works of OpenModelica, and (iii) are separate modules of software -distributed in conjunction with OpenModelica under their own license agreement -where these separate modules are merged with (weaved together with) modules of -OpenModelica to form new modules that are distributed as object code or source -code under their own license agreement, as allowed under the Additional -Condition of internal distribution according to OSMC-Internal-EPL and/or -Additional Condition for external distribution according to OSMC-External-EPL. - -"Transfer of Contribution Copyright" means that the Contributors of a -Contribution transfer the ownership and the copyright of the Contribution to -Open Source Modelica Consortium, the OpenModelica Copyright owner, for -inclusion in OpenModelica. The transfer takes place upon the effective date -when the Contribution is made available on the OSMC web site under OSMC-PL, by -such Contributors themselves or anyone acting on such Contributors' behalf. -The transfer is free of charge. If the Contributors or OSMC so wish, -an optional Copyright transfer agreement can be signed between OSMC and the -Contributors, as specified in an Appendix of the OSMC Bylaws. - -"Contribution License" means a license from OSMC to the Contributors of the -Contribution, effective on the date of the Transfer of Contribution Copyright, -where OSMC grants the Contributors a non-exclusive, world-wide, transferable, -free of charge, perpetual license, including sublicensing rights, to use, -have used, modify, have modified, reproduce and or have reproduced the -contributed material, for business and other purposes, including but not -limited to evaluation, development, testing, integration and merging with -other software and distribution. The warranty and liability disclaimers of -OSMC-PL apply to this license. - -"Contributor" means any person or entity that distributes (part of) -OpenModelica. - -"The Program" means the Contributions distributed in accordance with OSMC-PL. - -"OpenModelica" means the Contributions distributed in accordance with OSMC-PL. - -"Recipient" means anyone who receives OpenModelica under OSMC-PL, -including all Contributors. - -"Licensed Third Party Distributor" means a reseller/distributor having signed -a redistribution/resale agreement in accordance with OSMC-PL and OSMC Bylaws, -with an OSMC Level 2 organizational member which is not an Affiliate of the -reseller/distributor, for distributing a product containing part(s) of -OpenModelica. The Licensed Third Party Distributor shall only be allowed -further redistribution to other resellers if the Level 2 member is granting -such a right to it in the redistribution/resale agreement between the -Level 2 member and the Licensed Third Party Distributor. - -"Affiliate" shall mean any legal entity, directly or indirectly, through one -or more intermediaries, controlling or controlled by or under common control -with any other legal entity, as the case may be. For purposes of this -definition, the term "control" (including the terms "controlling," -"controlled by" and "under common control with") means the possession, -direct or indirect, of the power to direct or cause the direction of the -management and policies of a legal entity, whether through the ownership of -voting securities, by contract or otherwise. - -NO WARRANTY - -EXCEPT AS EXPRESSLY SET FORTH IN THE BY RECIPIENT SELECTED SUBSIDIARY -LICENSE CONDITIONS OF OSMC-PL, OPENMODELICA IS PROVIDED ON AN "AS IS" -BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR -IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF -TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR -PURPOSE. Each Recipient is solely responsible for determining the -appropriateness of using and distributing OPENMODELICA and assumes all risks -associated with its exercise of rights under OSMC-PL , including but not -limited to the risks and costs of program errors, compliance with applicable -laws, damage to or loss of data, programs or equipment, and unavailability -or interruption of operations. - -DISCLAIMER OF LIABILITY - -EXCEPT AS EXPRESSLY SET FORTH IN THE BY RECIPIENT SELECTED SUBSIDIARY -LICENSE CONDITIONS OF OSMC-PL, NEITHER RECIPIENT NOR ANY CONTRIBUTORS -SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION -LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF OPENMODELICA OR THE -EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - -A Contributor licensing OpenModelica under OSMC-Internal-EPL or -OSMC-External-EPL may choose to distribute (parts of) OpenModelica in object -code form under its own license agreement, provided that: - -a) it complies with the terms and conditions of OSMC-PL; or for the case of -redistribution of OpenModelica together with proprietary code it is a dual -license where the OpenModelica parts are distributed under OSMC-PL compatible -conditions and the proprietary code is distributed under proprietary license -conditions; and - -b) its license agreement: - i) effectively disclaims on behalf of all Contributors all warranties and -conditions, express and implied, including warranties or conditions of title -and non-infringement, and implied warranties or conditions of merchantability -and fitness for a particular purpose; - ii) effectively excludes on behalf of all Contributors all liability for -damages, including direct, indirect, special, incidental and consequential -damages, such as lost profits; - iii) states that any provisions which differ from OSMC-PL are offered by that -Contributor alone and not by any other party; and - iv) states from where the source code for OpenModelica is available, and -informs licensees how to obtain it in a reasonable manner on or through a -medium customarily used for software exchange. - -When OPENMODELICA is made available in source code form: - - a) it must be made available under OSMC-PL; and - - b) a copy of OSMC-PL must be included with each copy of OPENMODELICA. - - c) a copy of the subsidiary license associated with the selected mode of -OSMC-PL must be included with each copy of OPENMODELICA. - -Contributors may not remove or alter any copyright notices contained within -OPENMODELICA. - -If there is a conflict between OSMC-PL and the subsidiary license conditions, -OSMC-PL has priority. - -This Agreement is governed by the laws of Sweden. The place of jurisdiction -for all disagreements related to this Agreement, is Linköping, Sweden. - -The EPL 1.0 license definition has been obtained from: -http://www.eclipse.org/legal/epl-v10.html. It is also reproduced in Appendix B -of the OSMC Bylaws, and in the OpenModelica distribution. - -The GPL Version 3 license definition has been obtained from -http://www.gnu.org/copyleft/gpl.html. It is also reproduced in Appendix C -of the OSMC Bylaws, and in the OpenModelica distribution. - ---- End of Definition of OSMC Public License --- - -Additional software statically linked by OMOptim: - -[LGPL 2.1] libqwt (LGPL 2.1 with exceptions allowing subclassing and static linking) -[LGPL 2.1 & CeCill 2.0] paradiseo (http://paradiseo.gforge.inria.fr) - -[LGPL 2.1] Full text might be in the file '/usr/share/common-licenses/LGPL-2.1', -or online http://opensource.org/licenses/LGPL-2.1. -[CeCill 2.0] http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt diff --git a/OMOptim/debian/desktops/omoptim.desktop b/OMOptim/debian/desktops/omoptim.desktop deleted file mode 100644 index 1130808..0000000 --- a/OMOptim/debian/desktops/omoptim.desktop +++ /dev/null @@ -1,13 +0,0 @@ -[Desktop Entry] -Version=1.0 -Encoding=UTF-8 -Name=OMOptim -GenericName=Tool for optimization of physical models and simulations -Comment=A Modelica optimization tool -TryExec=OMOptim -Exec=OMOptim %f -Icon=/usr/share/pixmaps/omoptim.ico -Terminal=false -Type=Application -StartupNotify=true -Categories=Development;Education;Science;Math; diff --git a/OMOptim/debian/dirs b/OMOptim/debian/dirs deleted file mode 100644 index e772481..0000000 --- a/OMOptim/debian/dirs +++ /dev/null @@ -1 +0,0 @@ -usr/bin diff --git a/OMOptim/debian/omoptim.install b/OMOptim/debian/omoptim.install deleted file mode 100644 index 87f9739..0000000 --- a/OMOptim/debian/omoptim.install +++ /dev/null @@ -1,3 +0,0 @@ -debian/desktops/omoptim.desktop usr/share/applications -OMOptim/GUI/Resources/omoptim.ico usr/share/pixmaps -debian/tmp/usr/bin/OMOptim diff --git a/OMOptim/debian/rules b/OMOptim/debian/rules deleted file mode 100755 index 7fde6c0..0000000 --- a/OMOptim/debian/rules +++ /dev/null @@ -1,80 +0,0 @@ -#!/usr/bin/make -f -# -*- makefile -*- -# OMOptim debian/rules that uses debhelper. - -# Uncomment this to turn on verbose mode. -#export DH_VERBOSE=1 - -# These are used for cross-compiling and for saving the configure script -# from having to guess our platform (since we know it already) -DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) -DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) - -ARCH ?= $(shell uname -m | sed s/i[0-9]86/x86/) - -# Some variables to install binaries under debian/tmp -DEST = $(CURDIR)/debian/tmp -SRCD = $(CURDIR) - -MAKEFLAGS += -j$(shell grep -c ^processor /proc/cpuinfo) - -configure: configure.ac - autoconf - -config.status: configure - dh_testdir - echo $(DEB_BUILD_OPTIONS) - # Add here commands to configure the package. - ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr $(CONF_OPTS) - -build: config.status - dh_testdir - $(MAKE) $(MAKEFLAGS) - -build-stamp: build - touch $@ - -build-arch: build-stamp -build-indep: build-stamp - -clean: - dh_testdir - dh_testroot - rm -f build-stamp - # Add here commands to clean up after the build process. - test ! -f Makefile || $(MAKE) distclean - dh_clean - -install: build - dh_testdir - dh_testroot - dh_prep - dh_installdirs - # Add here commands to install the package into debian/tmp. - $(MAKE) $(MAKEFLAGS) install $(EXTRA_INSTALL) DESTDIR=$(DEST) - dh_install - -# Build architecture-dependent files here. -binary-arch: build install - dh_testdir - dh_testroot - dh_installchangelogs - dh_installdocs - dh_installexamples - dh_install - dh_installmenu - dh_installmime - dh_installman - dh_link - dh_strip - # dh_compress -X.pdf -X.onb -X.c -X.h -X.mo -X.mos -Xomc_helptext.txt -X.py - dh_fixperms - dh_installdeb - # dh_makeshlibs -V - dh_shlibdeps -l/usr/lib/omc -Lomc -- --ignore-missing-info - dh_gencontrol - dh_md5sums - dh_builddeb - -binary: binary-indep binary-arch -.PHONY: build clean binary-indep binary-arch binary install diff --git a/OMOptim/debian/source/format b/OMOptim/debian/source/format deleted file mode 100644 index 163aaf8..0000000 --- a/OMOptim/debian/source/format +++ /dev/null @@ -1 +0,0 @@ -3.0 (quilt) diff --git a/OMPlot/debian/changelog b/OMPlot/debian/changelog deleted file mode 100644 index ee0364a..0000000 --- a/OMPlot/debian/changelog +++ /dev/null @@ -1,4 +0,0 @@ -omplot (@REV@-1) @DISTS@; urgency=low - - * Automatic git build - -- OpenModelica Build System @TIME@ diff --git a/OMPlot/debian/control b/OMPlot/debian/control deleted file mode 100644 index 4773904..0000000 --- a/OMPlot/debian/control +++ /dev/null @@ -1,37 +0,0 @@ -Source: omplot -Section: math -Priority: optional -Maintainer: OpenModelica Build System -Build-Depends: debhelper-compat (= 13), - libqt4-dev (>= 4.4.3), - autoconf, - omc-common -Standards-Version: 3.9.6 - -Package: omplot -Section: math -Architecture: any -Depends: libomplot, - ${shlibs:Depends}, - ${misc:Depends} -Description: Plot tool for OpenModelica - This tool is essential for using the plot() command in omc. - -Package: libomplot -Section: math -Multi-Arch: same -Architecture: any -Depends: ${shlibs:Depends}, - ${misc:Depends} -Description: Plot tool for OpenModelica, lib dependencies - This tool is essential for using the plot() command in omc. - -Package: libomplot-dev -Section: math -Multi-Arch: foreign -Architecture: all -Depends: libomplot, - ${shlibs:Depends}, - ${misc:Depends} -Description: Plot tool for OpenModelica, development headers - This tool is essential for using the plot() command in omc. diff --git a/OMPlot/debian/copyright b/OMPlot/debian/copyright deleted file mode 100644 index 6dc0f06..0000000 --- a/OMPlot/debian/copyright +++ /dev/null @@ -1,285 +0,0 @@ -Upstream Author: Open Source Modelica Consortium - http://www.openmodelica.org - -Copyright: OpenModelica as a whole is licensed under the OSMC Public -License [OSMC-PL]: - ---- Start of Definition of OSMC Public License --- - -/* - * This file is part of OpenModelica. - * - * Copyright (c) 1998-CurrentYear, Open Source Modelica Consortium (OSMC), - * c/o Linköpings universitet, Department of Computer and Information Science, - * SE-58183 Linköping, Sweden. - * - * All rights reserved. - * - * THIS PROGRAM IS PROVIDED UNDER THE TERMS OF GPL VERSION 3 LICENSE OR - * THIS OSMC PUBLIC LICENSE (OSMC-PL) VERSION 1.2. - * ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS PROGRAM CONSTITUTES - * RECIPIENT'S ACCEPTANCE OF THE OSMC PUBLIC LICENSE OR THE GPL VERSION 3, - * ACCORDING TO RECIPIENTS CHOICE. - * - * The OpenModelica software and the Open Source Modelica - * Consortium (OSMC) Public License (OSMC-PL) are obtained - * from OSMC, either from the above address, - * from the URLs: http://www.ida.liu.se/projects/OpenModelica or - * http://www.openmodelica.org, and in the OpenModelica distribution. - * GNU version 3 is obtained from: http://www.gnu.org/copyleft/gpl.html. - * - * This program is distributed WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE, EXCEPT AS EXPRESSLY SET FORTH - * IN THE BY RECIPIENT SELECTED SUBSIDIARY LICENSE CONDITIONS OF OSMC-PL. - * - * See the full OSMC Public License conditions for more details. - * - */ - ---- End of OSMC Public License Header --- - -The OSMC-PL is a public license for OpenModelica with three modes/alternatives -(GPL, OSMC-Internal-EPL, OSMC-External-EPL) for use and redistribution, -in source and/or binary/object-code form: - -* GPL. Any party (member or non-member of OSMC) may use and redistribute - OpenModelica under GPL version 3. - -* Level 1 members of OSMC may also use and redistribute OpenModelica under - OSMC-Internal-EPL conditions. - -* Level 2 members of OSMC may also use and redistribute OpenModelica under - OSMC-Internal-EPL or OSMC-External-EPL conditions. - -Definitions of OSMC Public license modes: - -* GPL = GPL version 3. - -* OSMC-Internal-EPL = These OSMC Public license conditions together with - Internally restricted EPL, i.e., EPL version 1.0 with the Additional - Condition that use and redistribution by an OSMC member is only allowed - within the OSMC member's own organization (i.e., its own legal entity), - or for an OSMC member paying a membership fee corresponding to the size - of the organization including all its affiliates, use and redistribution - is allowed within/between its affiliates. - -* OSMC-External-EPL = These OSMC Public license conditions together with - Externally restricted EPL, i.e., EPL version 1.0 with the Additional - Condition that use and redistribution by an OSMC member, or by a Licensed - Third Party Distributor having a redistribution agreement with that member, - to parties external to the OSMC member’s own organization (i.e., its own - legal entity) is only allowed in binary/object-code form, except the case of - redistribution to other OSMC members to which source is also allowed to be - distributed. - -[This has the consequence that an external party who wishes to use -OpenModelica in source form together with its own proprietary software in all -cases must be a member of OSMC]. - -In all cases of usage and redistribution by recipients, the following -conditions also apply: - -a) Redistributions of source code must retain the above copyright notice, - all definitions, and conditions. It is sufficient if the OSMC-PL Header is - present in each source file, if the full OSMC-PL is available in a prominent - and easily located place in the redistribution. - -b) Redistributions in binary/object-code form must reproduce the above - copyright notice, all definitions, and conditions. It is sufficient if the - OSMC-PL Header and the location in the redistribution of the full OSMC-PL - are present in the documentation and/or other materials provided with the - redistribution, if the full OSMC-PL is available in a prominent and easily - located place in the redistribution. - -c) A recipient must clearly indicate its chosen usage mode of OSMC-PL, - in accompanying documentation and in a text file OSMC-USAGE-MODE.txt, - provided with the distribution. - -d) Contributor(s) making a Contribution to OpenModelica thereby also makes a - Transfer of Contribution Copyright. In return, upon the effective date of - the transfer, OSMC grants the Contributor(s) a Contribution License of the - Contribution. OSMC has the right to accept or refuse Contributions. - -Definitions: - -"Subsidiary license conditions" means: - -The additional license conditions depending on the by the recipient chosen -mode of OSMC-PL, defined by GPL version 3.0 for GPL, and by EPL for -OSMC-Internal-EPL and OSMC-External-EPL. - -"OSMC-PL" means: - -Open Source Modelica Consortium Public License version 1.2, i.e., the license -defined here (the text between -"--- Start of Definition of OSMC Public License ---" and -"--- End of Definition of OSMC Public License ---", or later versions thereof. - -"OSMC-PL Header" means: - -Open Source Modelica Consortium Public License Header version 1.2, i.e., the -text between "--- Start of Definition of OSMC Public License ---" and -"--- End of OSMC Public License Header ---, or later versions thereof. - -"Contribution" means: - -a) in the case of the initial Contributor, the initial code and documentation - distributed under OSMC-PL, and - -b) in the case of each subsequent Contributor: - i) changes to OpenModelica, and - ii) additions to OpenModelica; - -where such changes and/or additions to OpenModelica originate from and are -distributed by that particular Contributor. A Contribution 'originates' from -a Contributor if it was added to OpenModelica by such Contributor itself or -anyone acting on such Contributor's behalf. - -For Contributors licensing OpenModelica under OSMC-Internal-EPL or -OSMC-External-EPL conditions, the following conditions also hold: - -Contributions do not include additions to the distributed Program which: (i) -are separate modules of software distributed in conjunction with OpenModelica -under their own license agreement, (ii) are separate modules which are not -derivative works of OpenModelica, and (iii) are separate modules of software -distributed in conjunction with OpenModelica under their own license agreement -where these separate modules are merged with (weaved together with) modules of -OpenModelica to form new modules that are distributed as object code or source -code under their own license agreement, as allowed under the Additional -Condition of internal distribution according to OSMC-Internal-EPL and/or -Additional Condition for external distribution according to OSMC-External-EPL. - -"Transfer of Contribution Copyright" means that the Contributors of a -Contribution transfer the ownership and the copyright of the Contribution to -Open Source Modelica Consortium, the OpenModelica Copyright owner, for -inclusion in OpenModelica. The transfer takes place upon the effective date -when the Contribution is made available on the OSMC web site under OSMC-PL, by -such Contributors themselves or anyone acting on such Contributors' behalf. -The transfer is free of charge. If the Contributors or OSMC so wish, -an optional Copyright transfer agreement can be signed between OSMC and the -Contributors, as specified in an Appendix of the OSMC Bylaws. - -"Contribution License" means a license from OSMC to the Contributors of the -Contribution, effective on the date of the Transfer of Contribution Copyright, -where OSMC grants the Contributors a non-exclusive, world-wide, transferable, -free of charge, perpetual license, including sublicensing rights, to use, -have used, modify, have modified, reproduce and or have reproduced the -contributed material, for business and other purposes, including but not -limited to evaluation, development, testing, integration and merging with -other software and distribution. The warranty and liability disclaimers of -OSMC-PL apply to this license. - -"Contributor" means any person or entity that distributes (part of) -OpenModelica. - -"The Program" means the Contributions distributed in accordance with OSMC-PL. - -"OpenModelica" means the Contributions distributed in accordance with OSMC-PL. - -"Recipient" means anyone who receives OpenModelica under OSMC-PL, -including all Contributors. - -"Licensed Third Party Distributor" means a reseller/distributor having signed -a redistribution/resale agreement in accordance with OSMC-PL and OSMC Bylaws, -with an OSMC Level 2 organizational member which is not an Affiliate of the -reseller/distributor, for distributing a product containing part(s) of -OpenModelica. The Licensed Third Party Distributor shall only be allowed -further redistribution to other resellers if the Level 2 member is granting -such a right to it in the redistribution/resale agreement between the -Level 2 member and the Licensed Third Party Distributor. - -"Affiliate" shall mean any legal entity, directly or indirectly, through one -or more intermediaries, controlling or controlled by or under common control -with any other legal entity, as the case may be. For purposes of this -definition, the term "control" (including the terms "controlling," -"controlled by" and "under common control with") means the possession, -direct or indirect, of the power to direct or cause the direction of the -management and policies of a legal entity, whether through the ownership of -voting securities, by contract or otherwise. - -NO WARRANTY - -EXCEPT AS EXPRESSLY SET FORTH IN THE BY RECIPIENT SELECTED SUBSIDIARY -LICENSE CONDITIONS OF OSMC-PL, OPENMODELICA IS PROVIDED ON AN "AS IS" -BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR -IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF -TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR -PURPOSE. Each Recipient is solely responsible for determining the -appropriateness of using and distributing OPENMODELICA and assumes all risks -associated with its exercise of rights under OSMC-PL , including but not -limited to the risks and costs of program errors, compliance with applicable -laws, damage to or loss of data, programs or equipment, and unavailability -or interruption of operations. - -DISCLAIMER OF LIABILITY - -EXCEPT AS EXPRESSLY SET FORTH IN THE BY RECIPIENT SELECTED SUBSIDIARY -LICENSE CONDITIONS OF OSMC-PL, NEITHER RECIPIENT NOR ANY CONTRIBUTORS -SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION -LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF OPENMODELICA OR THE -EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - -A Contributor licensing OpenModelica under OSMC-Internal-EPL or -OSMC-External-EPL may choose to distribute (parts of) OpenModelica in object -code form under its own license agreement, provided that: - -a) it complies with the terms and conditions of OSMC-PL; or for the case of -redistribution of OpenModelica together with proprietary code it is a dual -license where the OpenModelica parts are distributed under OSMC-PL compatible -conditions and the proprietary code is distributed under proprietary license -conditions; and - -b) its license agreement: - i) effectively disclaims on behalf of all Contributors all warranties and -conditions, express and implied, including warranties or conditions of title -and non-infringement, and implied warranties or conditions of merchantability -and fitness for a particular purpose; - ii) effectively excludes on behalf of all Contributors all liability for -damages, including direct, indirect, special, incidental and consequential -damages, such as lost profits; - iii) states that any provisions which differ from OSMC-PL are offered by that -Contributor alone and not by any other party; and - iv) states from where the source code for OpenModelica is available, and -informs licensees how to obtain it in a reasonable manner on or through a -medium customarily used for software exchange. - -When OPENMODELICA is made available in source code form: - - a) it must be made available under OSMC-PL; and - - b) a copy of OSMC-PL must be included with each copy of OPENMODELICA. - - c) a copy of the subsidiary license associated with the selected mode of -OSMC-PL must be included with each copy of OPENMODELICA. - -Contributors may not remove or alter any copyright notices contained within -OPENMODELICA. - -If there is a conflict between OSMC-PL and the subsidiary license conditions, -OSMC-PL has priority. - -This Agreement is governed by the laws of Sweden. The place of jurisdiction -for all disagreements related to this Agreement, is Linköping, Sweden. - -The EPL 1.0 license definition has been obtained from: -http://www.eclipse.org/legal/epl-v10.html. It is also reproduced in Appendix B -of the OSMC Bylaws, and in the OpenModelica distribution. - -The GPL Version 3 license definition has been obtained from -http://www.gnu.org/copyleft/gpl.html. It is also reproduced in Appendix C -of the OSMC Bylaws, and in the OpenModelica distribution. - ---- End of Definition of OSMC Public License --- - -Additional software linked by OMOptim: - -[LGPL 2.1] libqwt (LGPL 2.1 with exceptions allowing subclassing and static linking) -[LGPL 2.1] libcsv - -[LGPL 2.1] Full text might be in the file '/usr/share/common-licenses/LGPL-2.1', -or online http://opensource.org/licenses/LGPL-2.1. diff --git a/OMPlot/debian/libomplot-dev.install b/OMPlot/debian/libomplot-dev.install deleted file mode 100644 index 4a446f2..0000000 --- a/OMPlot/debian/libomplot-dev.install +++ /dev/null @@ -1 +0,0 @@ -debian/tmp/usr/include/omplot diff --git a/OMPlot/debian/libomplot.install b/OMPlot/debian/libomplot.install deleted file mode 100644 index 9459811..0000000 --- a/OMPlot/debian/libomplot.install +++ /dev/null @@ -1,2 +0,0 @@ -debian/tmp/usr/lib/*/omc/libomqwt* -debian/tmp/usr/lib/*/omc/libOMPlot* diff --git a/OMPlot/debian/omplot.install b/OMPlot/debian/omplot.install deleted file mode 100644 index 7debf1f..0000000 --- a/OMPlot/debian/omplot.install +++ /dev/null @@ -1 +0,0 @@ -debian/tmp/usr/bin/OMPlot diff --git a/OMPlot/debian/omplot.manpages b/OMPlot/debian/omplot.manpages deleted file mode 100644 index ca6f8c3..0000000 --- a/OMPlot/debian/omplot.manpages +++ /dev/null @@ -1 +0,0 @@ -doc/manpages/OMPlot.1 diff --git a/OMPlot/debian/rules b/OMPlot/debian/rules deleted file mode 100755 index 7fde6c0..0000000 --- a/OMPlot/debian/rules +++ /dev/null @@ -1,80 +0,0 @@ -#!/usr/bin/make -f -# -*- makefile -*- -# OMOptim debian/rules that uses debhelper. - -# Uncomment this to turn on verbose mode. -#export DH_VERBOSE=1 - -# These are used for cross-compiling and for saving the configure script -# from having to guess our platform (since we know it already) -DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) -DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) - -ARCH ?= $(shell uname -m | sed s/i[0-9]86/x86/) - -# Some variables to install binaries under debian/tmp -DEST = $(CURDIR)/debian/tmp -SRCD = $(CURDIR) - -MAKEFLAGS += -j$(shell grep -c ^processor /proc/cpuinfo) - -configure: configure.ac - autoconf - -config.status: configure - dh_testdir - echo $(DEB_BUILD_OPTIONS) - # Add here commands to configure the package. - ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr $(CONF_OPTS) - -build: config.status - dh_testdir - $(MAKE) $(MAKEFLAGS) - -build-stamp: build - touch $@ - -build-arch: build-stamp -build-indep: build-stamp - -clean: - dh_testdir - dh_testroot - rm -f build-stamp - # Add here commands to clean up after the build process. - test ! -f Makefile || $(MAKE) distclean - dh_clean - -install: build - dh_testdir - dh_testroot - dh_prep - dh_installdirs - # Add here commands to install the package into debian/tmp. - $(MAKE) $(MAKEFLAGS) install $(EXTRA_INSTALL) DESTDIR=$(DEST) - dh_install - -# Build architecture-dependent files here. -binary-arch: build install - dh_testdir - dh_testroot - dh_installchangelogs - dh_installdocs - dh_installexamples - dh_install - dh_installmenu - dh_installmime - dh_installman - dh_link - dh_strip - # dh_compress -X.pdf -X.onb -X.c -X.h -X.mo -X.mos -Xomc_helptext.txt -X.py - dh_fixperms - dh_installdeb - # dh_makeshlibs -V - dh_shlibdeps -l/usr/lib/omc -Lomc -- --ignore-missing-info - dh_gencontrol - dh_md5sums - dh_builddeb - -binary: binary-indep binary-arch -.PHONY: build clean binary-indep binary-arch binary install diff --git a/OMPlot/debian/source/format b/OMPlot/debian/source/format deleted file mode 100644 index 163aaf8..0000000 --- a/OMPlot/debian/source/format +++ /dev/null @@ -1 +0,0 @@ -3.0 (quilt) diff --git a/OpenModelica-doc/debian/changelog b/OpenModelica-doc/debian/changelog deleted file mode 100644 index 2433a8b..0000000 --- a/OpenModelica-doc/debian/changelog +++ /dev/null @@ -1,4 +0,0 @@ -openmodelica-doc (@REV@-1) @DISTS@; urgency=low - - * Automatic git build - -- OpenModelica Build System @TIME@ diff --git a/OpenModelica-doc/debian/control b/OpenModelica-doc/debian/control deleted file mode 100644 index a3a01af..0000000 --- a/OpenModelica-doc/debian/control +++ /dev/null @@ -1,15 +0,0 @@ -Source: openmodelica-doc -Section: math -Priority: optional -Maintainer: OpenModelica Build System -Build-Depends: debhelper-compat (= 13) -Standards-Version: 3.9.6 - -Package: omc-doc -Section: math -Multi-Arch: foreign -Architecture: all -Conflicts: omc-doc -Depends: ${misc:Depends} -Description: Documentation for OpenModelica - Documentation for all parts of OpenModelica. diff --git a/OpenModelica-doc/debian/copyright b/OpenModelica-doc/debian/copyright deleted file mode 100644 index 7e383c2..0000000 --- a/OpenModelica-doc/debian/copyright +++ /dev/null @@ -1,277 +0,0 @@ -Upstream Author: Open Source Modelica Consortium - http://www.openmodelica.org - -Copyright: OpenModelica as a whole is licensed under the OSMC Public -License [OSMC-PL]: - ---- Start of Definition of OSMC Public License --- - -/* - * This file is part of OpenModelica. - * - * Copyright (c) 1998-CurrentYear, Open Source Modelica Consortium (OSMC), - * c/o Linköpings universitet, Department of Computer and Information Science, - * SE-58183 Linköping, Sweden. - * - * All rights reserved. - * - * THIS PROGRAM IS PROVIDED UNDER THE TERMS OF GPL VERSION 3 LICENSE OR - * THIS OSMC PUBLIC LICENSE (OSMC-PL) VERSION 1.2. - * ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS PROGRAM CONSTITUTES - * RECIPIENT'S ACCEPTANCE OF THE OSMC PUBLIC LICENSE OR THE GPL VERSION 3, - * ACCORDING TO RECIPIENTS CHOICE. - * - * The OpenModelica software and the Open Source Modelica - * Consortium (OSMC) Public License (OSMC-PL) are obtained - * from OSMC, either from the above address, - * from the URLs: http://www.ida.liu.se/projects/OpenModelica or - * http://www.openmodelica.org, and in the OpenModelica distribution. - * GNU version 3 is obtained from: http://www.gnu.org/copyleft/gpl.html. - * - * This program is distributed WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE, EXCEPT AS EXPRESSLY SET FORTH - * IN THE BY RECIPIENT SELECTED SUBSIDIARY LICENSE CONDITIONS OF OSMC-PL. - * - * See the full OSMC Public License conditions for more details. - * - */ - ---- End of OSMC Public License Header --- - -The OSMC-PL is a public license for OpenModelica with three modes/alternatives -(GPL, OSMC-Internal-EPL, OSMC-External-EPL) for use and redistribution, -in source and/or binary/object-code form: - -* GPL. Any party (member or non-member of OSMC) may use and redistribute - OpenModelica under GPL version 3. - -* Level 1 members of OSMC may also use and redistribute OpenModelica under - OSMC-Internal-EPL conditions. - -* Level 2 members of OSMC may also use and redistribute OpenModelica under - OSMC-Internal-EPL or OSMC-External-EPL conditions. - -Definitions of OSMC Public license modes: - -* GPL = GPL version 3. - -* OSMC-Internal-EPL = These OSMC Public license conditions together with - Internally restricted EPL, i.e., EPL version 1.0 with the Additional - Condition that use and redistribution by an OSMC member is only allowed - within the OSMC member's own organization (i.e., its own legal entity), - or for an OSMC member paying a membership fee corresponding to the size - of the organization including all its affiliates, use and redistribution - is allowed within/between its affiliates. - -* OSMC-External-EPL = These OSMC Public license conditions together with - Externally restricted EPL, i.e., EPL version 1.0 with the Additional - Condition that use and redistribution by an OSMC member, or by a Licensed - Third Party Distributor having a redistribution agreement with that member, - to parties external to the OSMC member’s own organization (i.e., its own - legal entity) is only allowed in binary/object-code form, except the case of - redistribution to other OSMC members to which source is also allowed to be - distributed. - -[This has the consequence that an external party who wishes to use -OpenModelica in source form together with its own proprietary software in all -cases must be a member of OSMC]. - -In all cases of usage and redistribution by recipients, the following -conditions also apply: - -a) Redistributions of source code must retain the above copyright notice, - all definitions, and conditions. It is sufficient if the OSMC-PL Header is - present in each source file, if the full OSMC-PL is available in a prominent - and easily located place in the redistribution. - -b) Redistributions in binary/object-code form must reproduce the above - copyright notice, all definitions, and conditions. It is sufficient if the - OSMC-PL Header and the location in the redistribution of the full OSMC-PL - are present in the documentation and/or other materials provided with the - redistribution, if the full OSMC-PL is available in a prominent and easily - located place in the redistribution. - -c) A recipient must clearly indicate its chosen usage mode of OSMC-PL, - in accompanying documentation and in a text file OSMC-USAGE-MODE.txt, - provided with the distribution. - -d) Contributor(s) making a Contribution to OpenModelica thereby also makes a - Transfer of Contribution Copyright. In return, upon the effective date of - the transfer, OSMC grants the Contributor(s) a Contribution License of the - Contribution. OSMC has the right to accept or refuse Contributions. - -Definitions: - -"Subsidiary license conditions" means: - -The additional license conditions depending on the by the recipient chosen -mode of OSMC-PL, defined by GPL version 3.0 for GPL, and by EPL for -OSMC-Internal-EPL and OSMC-External-EPL. - -"OSMC-PL" means: - -Open Source Modelica Consortium Public License version 1.2, i.e., the license -defined here (the text between -"--- Start of Definition of OSMC Public License ---" and -"--- End of Definition of OSMC Public License ---", or later versions thereof. - -"OSMC-PL Header" means: - -Open Source Modelica Consortium Public License Header version 1.2, i.e., the -text between "--- Start of Definition of OSMC Public License ---" and -"--- End of OSMC Public License Header ---, or later versions thereof. - -"Contribution" means: - -a) in the case of the initial Contributor, the initial code and documentation - distributed under OSMC-PL, and - -b) in the case of each subsequent Contributor: - i) changes to OpenModelica, and - ii) additions to OpenModelica; - -where such changes and/or additions to OpenModelica originate from and are -distributed by that particular Contributor. A Contribution 'originates' from -a Contributor if it was added to OpenModelica by such Contributor itself or -anyone acting on such Contributor's behalf. - -For Contributors licensing OpenModelica under OSMC-Internal-EPL or -OSMC-External-EPL conditions, the following conditions also hold: - -Contributions do not include additions to the distributed Program which: (i) -are separate modules of software distributed in conjunction with OpenModelica -under their own license agreement, (ii) are separate modules which are not -derivative works of OpenModelica, and (iii) are separate modules of software -distributed in conjunction with OpenModelica under their own license agreement -where these separate modules are merged with (weaved together with) modules of -OpenModelica to form new modules that are distributed as object code or source -code under their own license agreement, as allowed under the Additional -Condition of internal distribution according to OSMC-Internal-EPL and/or -Additional Condition for external distribution according to OSMC-External-EPL. - -"Transfer of Contribution Copyright" means that the Contributors of a -Contribution transfer the ownership and the copyright of the Contribution to -Open Source Modelica Consortium, the OpenModelica Copyright owner, for -inclusion in OpenModelica. The transfer takes place upon the effective date -when the Contribution is made available on the OSMC web site under OSMC-PL, by -such Contributors themselves or anyone acting on such Contributors' behalf. -The transfer is free of charge. If the Contributors or OSMC so wish, -an optional Copyright transfer agreement can be signed between OSMC and the -Contributors, as specified in an Appendix of the OSMC Bylaws. - -"Contribution License" means a license from OSMC to the Contributors of the -Contribution, effective on the date of the Transfer of Contribution Copyright, -where OSMC grants the Contributors a non-exclusive, world-wide, transferable, -free of charge, perpetual license, including sublicensing rights, to use, -have used, modify, have modified, reproduce and or have reproduced the -contributed material, for business and other purposes, including but not -limited to evaluation, development, testing, integration and merging with -other software and distribution. The warranty and liability disclaimers of -OSMC-PL apply to this license. - -"Contributor" means any person or entity that distributes (part of) -OpenModelica. - -"The Program" means the Contributions distributed in accordance with OSMC-PL. - -"OpenModelica" means the Contributions distributed in accordance with OSMC-PL. - -"Recipient" means anyone who receives OpenModelica under OSMC-PL, -including all Contributors. - -"Licensed Third Party Distributor" means a reseller/distributor having signed -a redistribution/resale agreement in accordance with OSMC-PL and OSMC Bylaws, -with an OSMC Level 2 organizational member which is not an Affiliate of the -reseller/distributor, for distributing a product containing part(s) of -OpenModelica. The Licensed Third Party Distributor shall only be allowed -further redistribution to other resellers if the Level 2 member is granting -such a right to it in the redistribution/resale agreement between the -Level 2 member and the Licensed Third Party Distributor. - -"Affiliate" shall mean any legal entity, directly or indirectly, through one -or more intermediaries, controlling or controlled by or under common control -with any other legal entity, as the case may be. For purposes of this -definition, the term "control" (including the terms "controlling," -"controlled by" and "under common control with") means the possession, -direct or indirect, of the power to direct or cause the direction of the -management and policies of a legal entity, whether through the ownership of -voting securities, by contract or otherwise. - -NO WARRANTY - -EXCEPT AS EXPRESSLY SET FORTH IN THE BY RECIPIENT SELECTED SUBSIDIARY -LICENSE CONDITIONS OF OSMC-PL, OPENMODELICA IS PROVIDED ON AN "AS IS" -BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR -IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF -TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR -PURPOSE. Each Recipient is solely responsible for determining the -appropriateness of using and distributing OPENMODELICA and assumes all risks -associated with its exercise of rights under OSMC-PL , including but not -limited to the risks and costs of program errors, compliance with applicable -laws, damage to or loss of data, programs or equipment, and unavailability -or interruption of operations. - -DISCLAIMER OF LIABILITY - -EXCEPT AS EXPRESSLY SET FORTH IN THE BY RECIPIENT SELECTED SUBSIDIARY -LICENSE CONDITIONS OF OSMC-PL, NEITHER RECIPIENT NOR ANY CONTRIBUTORS -SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION -LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF OPENMODELICA OR THE -EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - -A Contributor licensing OpenModelica under OSMC-Internal-EPL or -OSMC-External-EPL may choose to distribute (parts of) OpenModelica in object -code form under its own license agreement, provided that: - -a) it complies with the terms and conditions of OSMC-PL; or for the case of -redistribution of OpenModelica together with proprietary code it is a dual -license where the OpenModelica parts are distributed under OSMC-PL compatible -conditions and the proprietary code is distributed under proprietary license -conditions; and - -b) its license agreement: - i) effectively disclaims on behalf of all Contributors all warranties and -conditions, express and implied, including warranties or conditions of title -and non-infringement, and implied warranties or conditions of merchantability -and fitness for a particular purpose; - ii) effectively excludes on behalf of all Contributors all liability for -damages, including direct, indirect, special, incidental and consequential -damages, such as lost profits; - iii) states that any provisions which differ from OSMC-PL are offered by that -Contributor alone and not by any other party; and - iv) states from where the source code for OpenModelica is available, and -informs licensees how to obtain it in a reasonable manner on or through a -medium customarily used for software exchange. - -When OPENMODELICA is made available in source code form: - - a) it must be made available under OSMC-PL; and - - b) a copy of OSMC-PL must be included with each copy of OPENMODELICA. - - c) a copy of the subsidiary license associated with the selected mode of -OSMC-PL must be included with each copy of OPENMODELICA. - -Contributors may not remove or alter any copyright notices contained within -OPENMODELICA. - -If there is a conflict between OSMC-PL and the subsidiary license conditions, -OSMC-PL has priority. - -This Agreement is governed by the laws of Sweden. The place of jurisdiction -for all disagreements related to this Agreement, is Linköping, Sweden. - -The EPL 1.0 license definition has been obtained from: -http://www.eclipse.org/legal/epl-v10.html. It is also reproduced in Appendix B -of the OSMC Bylaws, and in the OpenModelica distribution. - -The GPL Version 3 license definition has been obtained from -http://www.gnu.org/copyleft/gpl.html. It is also reproduced in Appendix C -of the OSMC Bylaws, and in the OpenModelica distribution. - ---- End of Definition of OSMC Public License --- diff --git a/OpenModelica-doc/debian/omc-doc.install b/OpenModelica-doc/debian/omc-doc.install deleted file mode 100644 index 33d4c88..0000000 --- a/OpenModelica-doc/debian/omc-doc.install +++ /dev/null @@ -1 +0,0 @@ -debian/tmp/usr/share/doc/omc/* diff --git a/OpenModelica-doc/debian/rules b/OpenModelica-doc/debian/rules deleted file mode 100755 index 7f782d8..0000000 --- a/OpenModelica-doc/debian/rules +++ /dev/null @@ -1,51 +0,0 @@ -#!/usr/bin/make -f -# -*- makefile -*- - -# Some variables to install binaries under debian/tmp -DEST = $(CURDIR)/debian/tmp -SRCD = $(CURDIR) - -build: - dh_testdir - -build-stamp: build - touch $@ - -build-arch: build-stamp -build-indep: build-stamp - -clean: - dh_testdir - dh_testroot - rm -f build-stamp - # Add here commands to clean up after the build process. - test ! -f Makefile || $(MAKE) distclean - dh_clean - -INSTALL_FILES = $(filter-out debian, $(wildcard *)) - -install: build - dh_testdir - dh_testroot - dh_prep - dh_installdirs - # Add here commands to install the package into debian/tmp. - mkdir -p "$(DEST)/usr/share/doc/omc" - cp -a $(INSTALL_FILES) "$(DEST)/usr/share/doc/omc" - dh_install - -# Build architecture-dependent files here. -binary-arch: build install - dh_testdir - dh_testroot - dh_installdocs - dh_installexamples - dh_install - dh_fixperms - dh_installdeb - dh_gencontrol - dh_md5sums - dh_builddeb - -binary: binary-indep binary-arch -.PHONY: build clean binary-indep binary-arch binary install diff --git a/OpenModelica-doc/debian/source/format b/OpenModelica-doc/debian/source/format deleted file mode 100644 index 163aaf8..0000000 --- a/OpenModelica-doc/debian/source/format +++ /dev/null @@ -1 +0,0 @@ -3.0 (quilt) diff --git a/OpenModelica-doc/debian/source/options b/OpenModelica-doc/debian/source/options deleted file mode 100644 index b7bc1f2..0000000 --- a/OpenModelica-doc/debian/source/options +++ /dev/null @@ -1 +0,0 @@ -compression = "xz" diff --git a/OpenModelica/debian b/OpenModelica/debian deleted file mode 120000 index 3863e74..0000000 --- a/OpenModelica/debian +++ /dev/null @@ -1 +0,0 @@ -../debian \ No newline at end of file diff --git a/README.md b/README.md index 7ca5ec6..3e66e75 100644 --- a/README.md +++ b/README.md @@ -1,184 +1,157 @@ # OpenModelicaBuildScripts -A collection of scripts that can build OpenModelica packages on miscellaneous platforms. +Scripts that build the OpenModelica Linux packages. -Nothing here builds OpenModelica on its own. This repository holds the -*packaging metadata*; the jobs that use it live in the private -[apt-build](https://gitlab.liu.se/OpenModelica/apt-build) repository and run on the -OpenModelica Jenkins. +The packages are built with CMake and CPack, straight from a git checkout of +[OpenModelica](https://github.com/OpenModelica/OpenModelica). There are no source +packages any more: no `.dsc`, no `debian/rules`, no RPM spec. The jobs that run these +scripts live in the private [apt-build](https://gitlab.liu.se/OpenModelica/apt-build) +repository and run on the OpenModelica Jenkins. Windows build scripts are at [OpenModelicaSetup](https://github.com/OpenModelica/OpenModelicaSetup/). ## Layout -| Path | What it is | -| ------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | -| [`debian/`](./debian) | Debian/Ubuntu packaging for the `openmodelica` source package — the one the nightly builds use | -| [`OMPlot/debian/`](./OMPlot/debian) | Older standalone source package, not built by the current pipeline | -| [`OMOptim/debian/`](./OMOptim/debian) | Older standalone source package, not built by the current pipeline | -| [`OpenModelica-doc/debian/`](./OpenModelica-doc/debian) | Older standalone source package, not built by the current pipeline | -| [`rpm/`](./rpm) | Spec template and patches for the Fedora/EL packages | -| [`macports/`](./macports) | Portfile templates for macOS | -| [`docker/`](./docker) | Dockerfiles for older images; build images come from [build-deps] | -| [`.ci/`](./.ci) | The checks GitHub Actions runs on every pull request | - -`OpenModelica/debian` is a symlink to the top-level [`debian/`](./debian), so every -source project has its packaging under `/debian`. - -## Debian packaging - -### How `debian/` becomes a package - -`debian/` is never built where it sits. The nightly pipeline does roughly this: - -1. **Source package** — `update-source-repo.py` (apt-build) archives the OpenModelica - git tree, drops the testsuite and documentation directories, and copies this repository's - `debian/` in as `openmodelica_/debian`. It substitutes `@REV@` and `@TIME@` in - [`debian/changelog`](./debian/changelog) and runs `debuild -S`. The resulting - `.dsc` / `.orig.tar.xz` / `.debian.tar.xz` are published to - . - The branch taken from this repository is `master` unless `projects.json` pins a - `release-buildscriptbranch` / `stable-buildscriptbranch`. -2. **Binary packages** — the main Jenkins job downloads that `.dsc` into - `docker.openmodelica.org/build-deps:.nightly.` and runs - `dpkg-buildpackage -rfakeroot -b`. That compiles all of OpenModelica, so a full - build takes hours. - -The distributions and architectures built are listed in -`current-linux-os-releases.json` in apt-build. At the time of writing that is -jammy, noble, resolute and trixie on amd64, armhf and arm64. - -### What is in `debian/` - -* [`control`](./debian/control) — one source stanza and 20 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. -* [`rules`](./debian/rules) — a hand-written rules file, *not* the `dh` sequencer. It - configures and builds the tree itself and then calls each `dh_*` helper explicitly - from the `install` and `binary-arch` targets. There are no override targets; edit the - recipes directly. -* `.install` — the file lists. Everything is installed into `debian/tmp` by - `make install DESTDIR=…` first, and these files distribute it into the binary - packages. Paths are globs, e.g. - `debian/tmp/usr/lib/*/omc/libOMSimulator.so`. -* Desktop integration: [`desktops/`](./debian/desktops), [`icons/`](./debian/icons), - `*.menu`, `omnotebook.sharedmimeinfo`. -* The debhelper compatibility level is declared as `debhelper-compat (= 13)` in - `Build-Depends`. - -### What usually breaks it - -* **An `.install` glob stops matching.** When upstream moves or stops building a file, - `dh_install` fails with `Cannot find (any matches for) …` / `missing files, aborting` - and the whole nightly build dies. This is the most common breakage — see the history - of [`libomsimulator.install`](./debian/libomsimulator.install). -* **A helper or option is retired.** Every distribution upgrade brings a newer - debhelper; raising the compat level can remove an option `rules` passes. See - `debhelper-compat-upgrade-checklist(7)`. -* **A typo in a config file name.** `debian/.install` where `` is not - in `control` is ignored silently, and the package ships empty. - -The first one can only be caught by a real build; [`.ci/`](./.ci) catches the other two. - -### Testing a packaging change - -The metadata checks run in seconds: +| Path | What it is | +| ------------------------------------------- | -------------------------------------------------------------------- | +| [`cpack/`](./cpack) | Build the `.deb`/`.rpm` packages, and test them in a clean container | +| [`macports/`](./macports) | Portfile templates for macOS | +| [`docker/`](./docker) | Dockerfiles for older images; build images come from [build-deps] | +| [`.github/workflows/`](./.github/workflows) | CI, see [below](#ci) | + +[build-deps]: https://github.com/OpenModelica/build-deps + +## How the packages are defined + +**What goes into which package is defined in the OpenModelica repository**, in +[`cmake/packaging/`](https://github.com/OpenModelica/OpenModelica/tree/master/cmake/packaging): + +* `components.cmake` — the CPack components, one package each (`omc`, `simrt`, + `omedit`, `omlibrary`, …), and the dependencies between them. +* `OpenModelicaCPackOptions.in.cmake` — the settings per package format: version, + Debian `Depends:` (worked out by `dpkg-shlibdeps`, plus the toolchain omc runs to + compile a model), RPM settings, NSIS. + +It lives there, and not here, so that one definition serves every format CPack +produces, including the Windows installer. See section 8 of +[`README.cmake.md`](https://github.com/OpenModelica/OpenModelica/blob/master/README.cmake.md) +for what is packed. + +This repository decides only how OpenModelica is *built* for a package: which +features are on, which compiler and which Qt it uses. + +## Building packages + +[`cpack/build-packages.sh`](./cpack/build-packages.sh) configures, builds and installs +OpenModelica, downloads the Modelica library cache, and runs `cpack`: ```bash -docker run --rm -v "$PWD:/src" -w /src ubuntu:noble sh -c \ - 'apt-get update -qq && apt-get install -qy --no-install-recommends debhelper dpkg-dev \ - && .ci/check-debian-packaging.sh' +cpack/build-packages.sh -G DEB -o packages /path/to/OpenModelica ``` -For a real build, reuse the last published source package and swap in your `debian/`: +It needs + +* **a git checkout with its tags.** The package version is derived from + `git describe`; a shallow clone or one without tags has no version, and the script + stops before building rather than after. In a container, a checkout owned by + another user also needs `git config --global --add safe.directory '*'`. +* **the build dependencies of the distribution it runs on.** Use the matching + `ghcr.io/openmodelica/build-deps:-` image, e.g. `ubuntu-24.04`. + A package only installs on the distribution it was built for. +* **network access**, for the library cache. `--no-omlibrary` skips it and leaves the + `omlibrary` package out. + +The build choices it makes, all of which can be overridden by passing CMake flags +after `--`: + +| Choice | Default | +| --------------------------- | ---------------------------------------------------- | +| Compiler | clang if installed (set `CC`/`CXX` to change) | +| Qt | 6 where Qt 6 WebEngine is installed, otherwise 5 | +| C++ simulation runtime | on, except on armhf | +| Testsuite | off (it would put `omc-diff` into the `omc` package) | +| GUI clients, OMSimulator | on | +| OMOptim, encryption, ccache | off | + +For example, a quicker local build that reuses ccache and packs only the compiler and +runtime: ```bash -V=1.28.0~dev-489-gda9d1ce # a version from build.openmodelica.org/apt/pool/contrib/ -docker run --rm -it -v "$PWD:/buildscripts" \ - docker.openmodelica.org/build-deps:jammy.nightly.amd64 bash -cd /tmp -for e in -1.dsc -1.debian.tar.xz .orig.tar.xz; do - wget -q "https://build.openmodelica.org/apt/pool/contrib/openmodelica_$V$e" -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)" +cpack/build-packages.sh -G DEB --no-omlibrary \ + --cpack-arg -DCPACK_COMPONENTS_ALL="omc;simrt" \ + /path/to/OpenModelica -- -DOM_USE_CCACHE=ON ``` -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. +See `cpack/build-packages.sh --help` for all options. -Or trigger the [`full deb build`](./.github/workflows/build-deb.yml) workflow, which does -the same thing on a runner. +## Testing packages -## RPM packaging +[`cpack/test-packages.sh`](./cpack/test-packages.sh) installs packages into a clean +system and compiles and simulates a model: -[`rpm/SPECS/openmodelica.spec.tpl`](./rpm/SPECS/openmodelica.spec.tpl) is a template, -not a valid spec file. The Jenkins job replaces upper-case placeholders (`NAME`, -`RPMVERSION`, `DEBVERSION`, `RELEASENUM`, `PATCHES`, `PRIVATELIBS`, `DATE`, …) with -values from `projects.json` before calling `rpmbuild`, and copies -[`rpm/PATCHES/`](./rpm/PATCHES) into `SOURCES`. Because the substitution is a plain -string replace, any occurrence of those words anywhere in the file is replaced. +```bash +docker run --rm -v "$PWD:/work:ro" ubuntu:24.04 \ + /work/cpack/test-packages.sh /work/packages +``` -Targets at the time of writing: el8, el9, el10, fc43 and fc44. +It serves the packages from a local apt (or dnf) repository and installs only +`openmodelica-omc` from it, so the dependencies *between* the OpenModelica packages are +resolved the way a user's package manager resolves them. Installing the files by name, +or with `dpkg -i`, hides a missing inter-package dependency — that is how an `omc` that +could not find the simulation runtime's headers once went unnoticed. Name other +packages as extra arguments. ## CI -Two workflows, split by how long they take. - ### Fast checks — [`packaging.yml`](./.github/workflows/packaging.yml) -Runs two jobs on every pull request and on pushes to `master`. Neither builds anything; -they check that the packaging metadata is well formed and that every distribution we -ship for still accepts it, which is what silently rots between releases. - -| Job | Script | Runs on | -| -------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------- | -| `debian` | [`.ci/check-debian-packaging.sh`](./.ci/check-debian-packaging.sh) | `ubuntu:jammy`, `ubuntu:noble`, `ubuntu:resolute`, `debian:trixie` | -| `rpm` | [`.ci/check-rpm-spec.sh`](./.ci/check-rpm-spec.sh) | `almalinux:8`, `almalinux:9`, `almalinux:10`, `fedora:43`, `fedora:44` | - -`check-debian-packaging.sh` checks, for each of the four `debian/` trees, that -`control` and the templated `changelog` parse, that no stale `debian/compat` is left -behind, that debhelper on that distribution accepts the declared compatibility level, -that every `dh_*` command `rules` calls still exists and is passed no option removed at -that compat level, and that every `debian/.` file names a real binary -package. - -`check-rpm-spec.sh` performs the same placeholder substitution the Jenkins job does and -has `rpmspec` parse the result, which catches spec syntax mistakes — a missing `%`, an -empty `%define`, a stray comment. - -Both scripts are plain `/bin/sh` and take no arguments; run them from the top of the -repository as shown in their header comments. The image lists mirror -`current-linux-os-releases.json` in apt-build — update them when a distribution is -added or goes EOL, and update `EXPECTED_COMPAT` in `check-debian-packaging.sh` whenever -the compat level in the control files changes. - -### Full build — [`build-deb.yml`](./.github/workflows/build-deb.yml) - -Builds OpenModelica from a git checkout with the Autoconf + Makefile build and then runs -`dpkg-buildpackage` against this repository's `debian/`, the same sequence Jenkins uses, -and uploads the resulting `.deb` files as an artifact. It is the only job that catches a -`.install` glob that stopped matching, and the only one that proves the `Build-Depends` -are still installable. - -It compiles everything, so it takes hours, and it never starts on its own. Run it on -demand via `workflow_dispatch` (with an input to pick the OpenModelica ref), or put the -**`CI/Full Debian Packaging`** label on a pull request — the job then runs for that pull -request, and again on every push to it, until the label comes off. There is no schedule: -the nightly Jenkins build already catches an upstream move that broke an `.install` -glob. Only on `ubuntu-latest` — Jenkins covers the rest of the matrix. - -It uses the Autoconf + Makefile build; switching it to the CMake build is a later change. +`shellcheck` on the scripts in `cpack/`, on every pull request and push to `master`. + +### Full build — [`build-packages.yml`](./.github/workflows/build-packages.yml) + +Builds the Debian packages from an OpenModelica checkout in the `ubuntu-24.04` +build-deps image with `build-packages.sh`, then runs `test-packages.sh` on them in a +clean `ubuntu:24.04` container, and uploads the `.deb` files as an artifact. It is the +only job that proves the packages install and work. + +It compiles everything, so it takes hours, and it never starts on its own. Run it via +`workflow_dispatch` (with an input to pick the OpenModelica ref), or put the +**`CI/Full Debian Packaging`** label on a pull request — it then runs for that pull +request, and again on every push to it, until the label comes off. > [!IMPORTANT] -> What no CI here tells you: whether the packages build on the other distributions -> in the matrix, or on armhf and arm64. That is still Jenkins' job. +> One distribution, one architecture. Whether the packages build and work on the rest +> of the matrix, or on armhf and arm64, is still Jenkins' job. + +## Migrating from the source packages + +Until commit `1a86e5b` this repository held a `debian/` directory and an RPM spec that +built the packages from a source package with debhelper and rpmbuild. What those did +that the CPack definition in OpenModelica has not taken over yet: + +| Old | Still needed in OpenModelica | +| ----------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | +| 20 binary packages (`omc`, `libomc`, `omc-common`, …) | `Provides:`/`Replaces:` from the old names, so upgrades do not strand anyone, and an `openmodelica` metapackage | +| Installed under `/usr` | `CPACK_PACKAGING_INSTALL_PREFIX` is still `/usr/local` for DEB | +| `debian/desktops/*.desktop` | `install()` rules into `share/applications` | +| `debian/omnotebook.sharedmimeinfo` | an `install()` rule into `share/mime/packages` | +| `debian/copyright` | a `copyright` file in every package's `share/doc/` | +| `debian/testmodels/flat_dcmotor.mos` | an `install()` rule into `share/doc/omc/testmodels` | +| `dh_strip` | `CPACK_STRIP_FILES`, and `CPACK_DEBIAN_DEBUGINFO_PACKAGE` for the `-dbgsym` packages | + +On the RPM side the spec built one `openmodelica-` package installed into +`/opt/openmodelica-`, with `update-alternatives` for `omc-`, so several +branches could be installed side by side. The CPack RPM layout needs that too, or a +decision to drop it. + +Deliberately *not* carried over, because nothing uses them any more: the Debian menu +files and their `.xpm` icons (the menu system is retired), `omc.prerm` (it removed +alternatives for `omc-rml` and `omc-bootstrapped`), `OMEdit.sh` (a Qt 4.7 workaround), +`README.Debian`, and the standalone `OMPlot`, `OMOptim` and `OpenModelica-doc` source +packages that no pipeline built. + +To look at any of them: `git show 1a86e5b:debian/`. ## Docker Images @@ -190,5 +163,3 @@ be built by hand from `Dockerfile.build-deps*` here. The Dockerfiles still in [`docker/`](./docker) are for other, older images. Each has a script next to it that builds and pushes it, e.g. [`nightly.sh`](./docker/nightly.sh) for [`Dockerfile.nightly`](./docker/Dockerfile.nightly). - -[build-deps]: https://github.com/OpenModelica/build-deps diff --git a/cpack/build-packages.sh b/cpack/build-packages.sh new file mode 100755 index 0000000..77f33a2 --- /dev/null +++ b/cpack/build-packages.sh @@ -0,0 +1,227 @@ +#!/usr/bin/env bash +# +# Build the OpenModelica Linux packages with CMake and CPack. +# +# cpack/build-packages.sh [options] [-- ] +# +# Configures, builds and installs OpenModelica, downloads the Modelica library +# cache, and runs `cpack -G DEB` (or RPM) on the result. The .deb/.rpm files end +# up in the output directory. +# +# What goes into which package -- names, contents, dependencies -- is defined in +# the OpenModelica repository, in cmake/packaging/. This script only decides how +# OpenModelica is *built* for a package: which features are on, which compiler +# and Qt it uses. It needs a git checkout with its tags (the package version is +# derived from `git describe`) and the build dependencies of the distribution it +# runs on, e.g. a ghcr.io/openmodelica/build-deps image. +# +# Options: +# -G, --generator DEB|RPM Package format. Default: DEB if dpkg-deb is available, +# otherwise RPM. +# -B, --build-dir DIR Build directory. Default: /build_packages +# -o, --output DIR Where the packages are copied. Default: ./packages +# -j, --jobs N Parallel build jobs. Default: nproc +# --no-omlibrary Do not download the Modelica library cache, and leave +# the (then empty) omlibrary package out. The download +# needs network access. +# --cpack-arg ARG Pass ARG to cpack; may be repeated, e.g. +# --cpack-arg -DCPACK_COMPONENTS_ALL="omc;simrt" +# -h, --help Show this help. +# +# Everything after `--` is appended to the cmake configure line and wins over the +# defaults below, e.g. `-- -DOM_USE_CCACHE=ON -DOM_QT_MAJOR_VERSION=5`. +# +# The compiler is clang when it is installed, as for the Autoconf packages; set CC +# and CXX to use a different one. + +set -euo pipefail + +usage() { + sed -n '3,/^$/{s/^# \{0,1\}//;p}' "$0" +} + +die() { + echo "build-packages.sh: $*" >&2 + exit 1 +} + +step() { + echo + echo "==> $*" +} + +generator="" +build_dir="" +output_dir="$PWD/packages" +jobs="$(nproc)" +omlibrary=1 +source_dir="" +cmake_args=() +cpack_args=() + +while [ $# -gt 0 ]; do + case "$1" in + -G|--generator) generator="${2:?$1 needs a value}"; shift 2 ;; + -B|--build-dir) build_dir="${2:?$1 needs a value}"; shift 2 ;; + -o|--output) output_dir="${2:?$1 needs a value}"; shift 2 ;; + -j|--jobs) jobs="${2:?$1 needs a value}"; shift 2 ;; + --no-omlibrary) omlibrary=0; shift ;; + --cpack-arg) cpack_args+=("${2:?$1 needs a value}"); shift 2 ;; + -h|--help) usage; exit 0 ;; + --) shift; cmake_args=("$@"); break ;; + -*) die "unknown option $1 (see --help)" ;; + *) [ -z "$source_dir" ] || die "more than one source directory given" + source_dir="$1"; shift ;; + esac +done + +[ -n "$source_dir" ] || { usage >&2; exit 2; } +[ -f "$source_dir/CMakeLists.txt" ] || die "$source_dir is not an OpenModelica source tree" +source_dir="$(cd "$source_dir" && pwd)" +build_dir="${build_dir:-$source_dir/build_packages}" +mkdir -p "$output_dir" +output_dir="$(cd "$output_dir" && pwd)" + +## Package format ################################################################################# + +if [ -z "$generator" ]; then + if command -v dpkg-deb >/dev/null; then + generator=DEB + elif command -v rpmbuild >/dev/null; then + generator=RPM + else + die "found neither dpkg-deb nor rpmbuild; pass -G" + fi +fi + +case "$generator" in + DEB) + # dpkg-shlibdeps works out the Depends: (CPACK_DEBIAN_PACKAGE_SHLIBDEPS), and it is + # only called once everything is built. Check now rather than after the build. + if ! command -v dpkg-deb >/dev/null || ! command -v dpkg-shlibdeps >/dev/null; then + die "DEB packages need dpkg-deb and dpkg-shlibdeps (package dpkg-dev)" + fi + ext=deb ;; + RPM) + command -v rpmbuild >/dev/null || die "RPM packages need rpmbuild (package rpm-build)" + ext=rpm ;; + *) + die "unsupported generator '$generator'; use DEB or RPM" ;; +esac + +# A package without a version never upgrades, so OpenModelica's CPack configuration +# refuses to build one -- but only at the very end. Catch the usual cause, a checkout +# without its tags, before spending hours on the build. Same `git describe` as +# OpenModelica's cmake/omc_git_revision.cmake, minus its --always fallback. +if [ ! -f "$source_dir/OMVERSION.txt" ] && + ! git -C "$source_dir" describe --match 'v*.*' >/dev/null 2>&1; then + die "cannot derive a version: $source_dir has no OMVERSION.txt and \`git describe\` finds no v*.* tag. \ +Clone with the tags and without --depth. (In a container, a checkout owned by another \ +user also needs \`git config --global --add safe.directory '*'\`.)" +fi + +## Build policy ################################################################################### + +arch="$(uname -m)" + +# The C++ simulation runtime needs a full Boost; it has never been shipped on armhf. +case "$arch" in + armv7l|armhf) cpp_runtime=OFF ;; + *) cpp_runtime=ON ;; +esac + +# OMEdit needs QtWebEngine. Qt 6 wherever its WebEngine is installed, Qt 5 on the +# distributions that only have the Qt 5 one. +# +# Judged by what find prints, not by its exit status: find exits 1 as soon as any +# directory below /usr or /opt is unreadable, even when it did find the file, and +# under pipefail that silently turned a Qt 6 system into a Qt 5 build. +qt6_webengine="$(find /usr /opt -name Qt6WebEngineWidgetsConfig.cmake -print -quit 2>/dev/null || true)" +if [ -n "$qt6_webengine" ]; then + qt_major=6 +else + qt_major=5 +fi + +if [ -z "${CC:-}" ] && command -v clang >/dev/null && command -v clang++ >/dev/null; then + export CC=clang CXX=clang++ +fi + +cmake_generator=() +if command -v ninja >/dev/null; then + cmake_generator=(-G Ninja) +fi + +# The staging prefix is only where `install` puts things so that omc can run to +# download the library cache. The packages are laid out by CPack itself +# (CPACK_PACKAGING_INSTALL_PREFIX); omc finds its files relative to its own binary, +# so the two do not have to agree. +stage_dir="$build_dir/stage" + +default_args=( + -DCMAKE_BUILD_TYPE=Release + -DCMAKE_INSTALL_PREFIX="$stage_dir" + -DOM_USE_CCACHE=OFF + # The testsuite would build omc-diff into 'all' and install it with omc. + -DOM_ENABLE_TESTSUITE=OFF + -DOM_ENABLE_GUI_CLIENTS=ON + -DOM_QT_MAJOR_VERSION="$qt_major" + -DOM_ENABLE_OMSIMULATOR=ON + -DOM_OMC_ENABLE_CPP_RUNTIME="$cpp_runtime" + -DOM_OMOPTIM_ENABLE=OFF + -DOM_ENABLE_ENCRYPTION=OFF +) + +step "Building $generator packages of $source_dir" +echo " build directory: $build_dir" +echo " architecture: $arch (C++ runtime $cpp_runtime)" +echo " Qt: $qt_major" +echo " compiler: ${CC:-cmake default}" + +## Configure, build, install ###################################################################### + +step "Configure" +cmake -S "$source_dir" -B "$build_dir" "${cmake_generator[@]}" "${default_args[@]}" "${cmake_args[@]}" + +# The same check as above, from the source of truth: what CPack was actually given. +# OpenModelica leaves CPack's 0.1.1 default in place when it cannot derive a version. +if grep -q '^set(CPACK_PACKAGE_VERSION "0\.1\.1")' "$build_dir/CPackConfig.cmake"; then + die "OpenModelica derived no package version (see OM_PACKAGE_VERSION in the configure output)" +fi + +step "Build" +cmake --build "$build_dir" --parallel "$jobs" + +step "Install into $stage_dir" +cmake --install "$build_dir" + +# The component list CPack would pack. OpenModelica derives it from what this build +# configured, see cmake/packaging/components.cmake. +components="$(sed -n 's/^set(CPACK_COMPONENTS_ALL "\(.*\)")$/\1/p' "$build_dir/CPackConfig.cmake")" + +if [ "$omlibrary" = 1 ]; then + # Runs the staged omc, which is why it comes after the install. + step "Download the Modelica library cache" + cmake --build "$build_dir" --target omlibrary +else + # Without the download its package would hold nothing but an empty directory. + components="$(printf '%s' "$components" | tr ';' '\n' | { grep -vx omlibrary || true; } | paste -sd ';' -)" + cpack_args=(-D "CPACK_COMPONENTS_ALL=$components" "${cpack_args[@]}") +fi + +## Package ######################################################################################## + +step "Package ($components)" +# Stale packages from an earlier run would otherwise be copied out with the new ones. +rm -rf "$build_dir/_packages" +(cd "$build_dir" && cpack -G "$generator" "${cpack_args[@]}") + +shopt -s nullglob +packages=("$build_dir"/_packages/*."$ext") +[ ${#packages[@]} -gt 0 ] || die "cpack produced no .$ext files" +cp "${packages[@]}" "$output_dir/" + +step "Built ${#packages[@]} packages into $output_dir" +for p in "${packages[@]}"; do + echo " $(basename "$p")" +done diff --git a/cpack/test-packages.sh b/cpack/test-packages.sh new file mode 100755 index 0000000..d5ae49f --- /dev/null +++ b/cpack/test-packages.sh @@ -0,0 +1,106 @@ +#!/usr/bin/env bash +# +# Install OpenModelica packages into a clean system and simulate a model. +# +# cpack/test-packages.sh [package-name ...] +# +# Run this as root inside a fresh container of the distribution the packages were +# built for, e.g. +# +# docker run --rm -v "$PWD:/work:ro" ubuntu:24.04 \ +# /work/cpack/test-packages.sh /work/packages +# +# The .deb or .rpm files in are served from a local repository, and +# only the named packages (default: openmodelica-omc) are installed from it. Their +# dependencies on each other are then resolved by apt or dnf the way they are for a +# user, which is the point: installing the files by name, or with dpkg -i, pulls in +# whatever you name and so hides a dependency that is missing from the metadata. +# +# Passes when omc runs and compiles and simulates a model to a result file. + +set -euo pipefail + +die() { + echo "test-packages.sh: $*" >&2 + exit 1 +} + +step() { + echo + echo "==> $*" +} + +[ $# -ge 1 ] || die "usage: $0 [package-name ...]" +package_dir="$1"; shift +[ -d "$package_dir" ] || die "$package_dir is not a directory" +packages=("$@") +[ ${#packages[@]} -gt 0 ] || packages=(openmodelica-omc) + +[ "$(id -u)" = 0 ] || die "must run as root, in a system it is fine to install packages into" + +shopt -s nullglob +debs=("$package_dir"/*.deb) +rpms=("$package_dir"/*.rpm) + +repo=/var/local/openmodelica-test-repo +rm -rf "$repo" +mkdir -p "$repo" + +## Local repository and install ################################################################### + +if [ ${#debs[@]} -gt 0 ]; then + export DEBIAN_FRONTEND=noninteractive + step "Local apt repository with ${#debs[@]} packages" + apt-get update -qq + apt-get install -qy --no-install-recommends dpkg-dev >/dev/null + cp "${debs[@]}" "$repo/" + (cd "$repo" && dpkg-scanpackages . > Packages) + echo "deb [trusted=yes] file:$repo ./" > /etc/apt/sources.list.d/openmodelica-test.list + # apt looks for compressed variants of the index first and warns about each one + # that is missing; only the uncompressed Packages is needed. + apt-get update -qq 2> >(grep -v "^W: Symlinking file" >&2) + + step "apt-get install ${packages[*]}" + apt-get install -qy "${packages[@]}" + # shellcheck disable=SC2016 # dpkg-query's own ${...} format, not the shell's + installed() { dpkg-query -W -f='${Package} ${Version}\n' 'openmodelica*' 2>/dev/null || true; } + +elif [ ${#rpms[@]} -gt 0 ]; then + step "Local dnf repository with ${#rpms[@]} packages" + dnf install -qy createrepo_c >/dev/null + cp "${rpms[@]}" "$repo/" + createrepo_c -q "$repo" + printf '[openmodelica-test]\nname=OpenModelica packages under test\nbaseurl=file://%s\ngpgcheck=0\nenabled=1\n' \ + "$repo" > /etc/yum.repos.d/openmodelica-test.repo + + step "dnf install ${packages[*]}" + dnf install -y "${packages[@]}" + installed() { rpm -qa --qf '%{NAME} %{VERSION}-%{RELEASE}\n' 'openmodelica*' || true; } + +else + die "no .deb or .rpm files in $package_dir" +fi + +step "Installed" +installed | sort | sed 's/^/ /' + +## Use it ######################################################################################### + +step "omc --version" +command -v omc >/dev/null || die "omc is not on PATH after installing ${packages[*]}" +omc --version + +step "Compile and simulate a model" +work="$(mktemp -d)" +cat > "$work/test.mos" <<'EOF' +loadString("model M Real x(start=1, fixed=true); equation der(x) = -x; end M;"); getErrorString(); +simulate(M, stopTime=1.0); getErrorString(); +EOF +# omc keeps its settings and library cache in $HOME. +(cd "$work" && HOME="$work" omc test.mos) + +# simulate() returns a record rather than failing, so judge it by what it left behind. +[ -s "$work/M_res.mat" ] || + die "simulate() produced no result file; the compile or the simulation failed (output above)" + +step "OK: the packages install, and omc simulates a model" diff --git a/debian/OMEdit.sh b/debian/OMEdit.sh deleted file mode 100644 index 8fc5f6c..0000000 --- a/debian/OMEdit.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash -MSG="OMEdit not available on Debian due to lack of Qt 4.7. Only the Ubuntu packages support OMEdit." -zenity --error --text="$MSG" >/dev/null 2>/dev/null || echo $MSG diff --git a/debian/changelog b/debian/changelog deleted file mode 100644 index 4e7f166..0000000 --- a/debian/changelog +++ /dev/null @@ -1,4 +0,0 @@ -openmodelica (@REV@-1) unstable; urgency=low - - * Automatic git build - -- OpenModelica Build System @TIME@ diff --git a/debian/control b/debian/control deleted file mode 100644 index 5d834ed..0000000 --- a/debian/control +++ /dev/null @@ -1,281 +0,0 @@ -Source: openmodelica -Section: math -Priority: optional -Maintainer: OpenModelica Build System -Build-Depends: debhelper-compat (= 13), -# sbuild i386 does not handle native, cross-compile armhf requires it... - clang:native | clang, - gfortran:native | gfortran, - default-jdk:native | default-jdk, - libhwloc-dev:native | libhwloc-dev, - automake, - libtool, - uuid-dev, - libncurses5-dev, - libsqlite3-dev, - cmake (>= 2.8.6), -# libssl-dev (>= 0.9.8g), # Do we really depend on libssl directly? Debian stretch conflicts with it... - libreadline-dev, - qtbase5-dev, - libqt5svg5-dev, - qttools5-dev-tools, - qttools5-dev, - libqt5opengl5-dev, - qtwebengine5-dev, - libqt5xmlpatterns5-dev, - liblpsolve55-dev (>= 5.5.0.10), - libhdf5-serial-dev | libhdf5-dev, - liblapack-dev, - libcurl4-gnutls-dev | libcurl-dev, - autoconf (>=2.71), - libexpat1-dev, - libomp-dev, -# Should be needed but seems to mess up sbuild -# libexpat1-dev:native, - libboost-all-dev, - libopenscenegraph-dev, - pkg-config, - libffi-dev, - lsb-release, - libxrandr2, - libxinerama-dev, - libxcursor-dev, - libxi-dev, -# after we build omc we should be able to also build models and FMUs, no? - zip, - unzip -Standards-Version: 3.9.5 - -Package: openmodelica -Section: math -Architecture: any -Depends: omc (<< 20000), - omplot (<< 20000), - omshell (<< 20000), - omshell-terminal (<< 20000), - omnotebook (<< 20000), - drmodelica (<< 20000), - drcontrol (<< 20000), - omedit (<< 20000), - omsimulator, -# omoptim, - ${misc:Depends} -Description: A complete Modelica environment - The goal of the project is to create a complete Modelica modeling, compilation - and simulation environment based on free software distributed in binary and - source code form. - . - This package is a Debian metapackage. After installation this package can be - removed. This metapackage pulls in the following OpenModelica packages: - . - 1. Package omc the OpenModelica Compiler/Interpreter (omc) - 2. Package omshell the OpenModelica Shell (OMShell) - 3. Package omshell-terminal the OpenModelica Shell-terminal (OMShell-terminal) - 4. Package omnotebook the OpenModelica Notebook, with DrModelica and DrControl - 5. Package omedit, a Modelica connection editor for OpenModelica - 6. Package omoptim, a tool for optimization of Modelica models (temporarily removed while the build system is being updated) - 7. Package omplot, the plot tools for OpenModelica - 8. Package omsimulator, an FMI/SSP simulation tool - -Package: omc -Section: math -Architecture: any -Depends: clang, - cmake, - build-essential, - libexpat1-dev, - liblapack-dev, - zip, - unzip, - omc-common, - libomc, - libomcsimulation, - ${shlibs:Depends}, - ${misc:Depends} -Recommends: libomccpp, - omplot, - gnuplot-nox, - xsltproc, - libsaxonb-java -Suggests: python-beautifulsoup -Breaks: omlib-modelica-3.2.3, - omlib-modelica-4.0.0, - omlib-modelicaservices-3.2.3, - omlib-modelicaservices-4.0.0 -Description: The OpenModelica Compiler - This is the core of the OpenModelica project. It can be used stand-alone as - a compiler. It is recommended to use it together with an OpenModelica client, - such as OMShell (textual interface), OMNotebook (for teaching purposes) - or OMEdit (graphical modeling). - -Package: libomc -Section: math -Multi-Arch: same -Architecture: any -Depends: omc-common (<< 20000), - libomcsimulation (<< 20000), - ${shlibs:Depends}, - ${misc:Depends} -Description: The OpenModelica Compiler lib dependencies - This is the core libraries of the OpenModelica project. - -Package: libomc-dev -Section: math -Multi-Arch: same -Architecture: any -Depends: libomc (<< 20000), - ${shlibs:Depends}, - ${misc:Depends} -Description: The OpenModelica Compiler lib dependencies - This is the core libraries of the OpenModelica project. - Currently contains antlr3 include-files. - -Package: libomcsimulation -Section: math -Multi-Arch: same -Architecture: any -Depends: omc-common (<< 20000), - ${shlibs:Depends}, - ${misc:Depends} -Description: The OpenModelica Compiler simulation library dependencies - This is the core libraries of the OpenModelica project and can be - used for cross-compiling simulation executables and FMU's. - -Package: omc-common -Section: math -Multi-Arch: foreign -Architecture: all -Depends: ${misc:Depends} -Description: The OpenModelica Compiler lib dependencies - This is the core libraries of the OpenModelica project. - -Package: omplot -Section: math -Architecture: any -Depends: libomplot (<< 20000), - ${shlibs:Depends}, - ${misc:Depends} -Description: Plot tool for OpenModelica - This tool is essential for using the plot() command in omc. - -Package: libomplot -Section: math -Multi-Arch: same -Architecture: any -Depends: ${shlibs:Depends}, - ${misc:Depends} -Description: Plot tool for OpenModelica, lib dependencies - This tool is essential for using the plot() command in omc. - -Package: libomplot-dev -Section: math -Multi-Arch: same -Architecture: any -Depends: libomplot (<< 20000), - ${shlibs:Depends}, - ${misc:Depends} -Description: Plot tool for OpenModelica, development package - This tool is essential for using the plot() command in omc. - -Package: omedit -Section: math -Architecture: any -Depends: omc (<< 20000), - libomsimulator, - libomsensplugin, - ${shlibs:Depends}, - ${misc:Depends} -Suggests: omlibrary -Description: A Modelica connection editor for OpenModelica - OMEdit is still in active development. Please try it out and give feedback. - -Package: libomsensplugin -Multi-Arch: same -Architecture: any -Depends: ${shlibs:Depends}, - ${misc:Depends} -Description: The OpenModelica OMSense_Qt plugin library for OMEdit - This is needed to be able to run OMSense from OMEdit - -Package: omnotebook -Section: math -Architecture: any -Depends: omc (<< 20000), - ${shlibs:Depends}, - ${misc:Depends} -Recommends: drmodelica, - drcontrol, - texlive-latex-base, - dvipng -Description: A Mathematica-style Notebook for OpenModelica - -Package: drmodelica -Section: math -Multi-Arch: foreign -Architecture: all -Depends: omnotebook (<< 20000), - ${misc:Depends} -Description: An OMNotebook course in the Modelica language - The course is based on Peter Fritzson's book - “Principles of Object-Oriented Modeling and Simulation with Modelica 2.1”. - -Package: drcontrol -Section: math -Multi-Arch: foreign -Architecture: all -Depends: omnotebook (<< 20000), - ${misc:Depends} -Description: An OMNotebook course in basic control theory - -Package: omshell-terminal -Section: math -Architecture: any -Depends: omc (<< 20000), - ${shlibs:Depends}, - ${misc:Depends} -Description: A text-based interface to OpenModelica (based on readline) - -Package: omshell -Section: math -Architecture: any -Depends: omc (<< 20000), - ${shlibs:Depends}, - ${misc:Depends} -Description: A text-based interface to OpenModelica (based on Qt) - -Package: libomccpp -Section: math -Architecture: i386 amd64 -Multi-Arch: same -Depends: libboost-dev, - libboost-filesystem-dev, - libboost-system-dev, - libboost-serialization-dev, - libboost-program-options-dev, - ${shlibs:Depends}, - ${misc:Depends} -Description: Libraries for the C++ code generation target of OpenModelica - -Package: libomsimulator -Multi-Arch: same -Architecture: any -Depends: ${shlibs:Depends}, - ${misc:Depends} -Description: The OpenModelica OMSimulator library dependencies - This is the embeddable version of OMSimulator, allow a tool to simulate - FMUs. - -Package: omsimulator -Multi-Arch: same -Architecture: any -Depends: libomsimulator, - ${shlibs:Depends}, - ${misc:Depends} -Description: The OpenModelica OMSimulator - OMSimulator is a simulator that allows a tool to for example simulate - FMUs. - -Package: omlibrary -Architecture: all -Description: OpenModelica library cache of the standard library for use - during conferences/etc where OpenModelica does not have internet access. diff --git a/debian/copyright b/debian/copyright deleted file mode 100644 index 0f6a395..0000000 --- a/debian/copyright +++ /dev/null @@ -1,298 +0,0 @@ -Upstream Author: Open Source Modelica Consortium - http://www.openmodelica.org - -Sources were obtained from https://openmodelica.org/svn/OpenModelica/trunk - ---- Start of Definition of OSMC Public License --- - -/* - * This file is part of OpenModelica. - * - * Copyright (c) 1998-CurrentYear, Open Source Modelica Consortium (OSMC), - * c/o Linköpings universitet, Department of Computer and Information Science, - * SE-58183 Linköping, Sweden. - * - * All rights reserved. - * - * THIS PROGRAM IS PROVIDED UNDER THE TERMS OF GPL VERSION 3 LICENSE OR - * THIS OSMC PUBLIC LICENSE (OSMC-PL) VERSION 1.2. - * ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS PROGRAM CONSTITUTES - * RECIPIENT'S ACCEPTANCE OF THE OSMC PUBLIC LICENSE OR THE GPL VERSION 3, - * ACCORDING TO RECIPIENTS CHOICE. - * - * The OpenModelica software and the Open Source Modelica - * Consortium (OSMC) Public License (OSMC-PL) are obtained - * from OSMC, either from the above address, - * from the URLs: http://www.ida.liu.se/projects/OpenModelica or - * http://www.openmodelica.org, and in the OpenModelica distribution. - * GNU version 3 is obtained from: http://www.gnu.org/copyleft/gpl.html. - * - * This program is distributed WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE, EXCEPT AS EXPRESSLY SET FORTH - * IN THE BY RECIPIENT SELECTED SUBSIDIARY LICENSE CONDITIONS OF OSMC-PL. - * - * See the full OSMC Public License conditions for more details. - * - */ - ---- End of OSMC Public License Header --- - -The OSMC-PL is a public license for OpenModelica with three modes/alternatives -(GPL, OSMC-Internal-EPL, OSMC-External-EPL) for use and redistribution, -in source and/or binary/object-code form: - -* GPL. Any party (member or non-member of OSMC) may use and redistribute - OpenModelica under GPL version 3. - -* Level 1 members of OSMC may also use and redistribute OpenModelica under - OSMC-Internal-EPL conditions. - -* Level 2 members of OSMC may also use and redistribute OpenModelica under - OSMC-Internal-EPL or OSMC-External-EPL conditions. - -Definitions of OSMC Public license modes: - -* GPL = GPL version 3. - -* OSMC-Internal-EPL = These OSMC Public license conditions together with - Internally restricted EPL, i.e., EPL version 1.0 with the Additional - Condition that use and redistribution by an OSMC member is only allowed - within the OSMC member's own organization (i.e., its own legal entity), - or for an OSMC member paying a membership fee corresponding to the size - of the organization including all its affiliates, use and redistribution - is allowed within/between its affiliates. - -* OSMC-External-EPL = These OSMC Public license conditions together with - Externally restricted EPL, i.e., EPL version 1.0 with the Additional - Condition that use and redistribution by an OSMC member, or by a Licensed - Third Party Distributor having a redistribution agreement with that member, - to parties external to the OSMC member’s own organization (i.e., its own - legal entity) is only allowed in binary/object-code form, except the case of - redistribution to other OSMC members to which source is also allowed to be - distributed. - -[This has the consequence that an external party who wishes to use -OpenModelica in source form together with its own proprietary software in all -cases must be a member of OSMC]. - -In all cases of usage and redistribution by recipients, the following -conditions also apply: - -a) Redistributions of source code must retain the above copyright notice, - all definitions, and conditions. It is sufficient if the OSMC-PL Header is - present in each source file, if the full OSMC-PL is available in a prominent - and easily located place in the redistribution. - -b) Redistributions in binary/object-code form must reproduce the above - copyright notice, all definitions, and conditions. It is sufficient if the - OSMC-PL Header and the location in the redistribution of the full OSMC-PL - are present in the documentation and/or other materials provided with the - redistribution, if the full OSMC-PL is available in a prominent and easily - located place in the redistribution. - -c) A recipient must clearly indicate its chosen usage mode of OSMC-PL, - in accompanying documentation and in a text file OSMC-USAGE-MODE.txt, - provided with the distribution. - -d) Contributor(s) making a Contribution to OpenModelica thereby also makes a - Transfer of Contribution Copyright. In return, upon the effective date of - the transfer, OSMC grants the Contributor(s) a Contribution License of the - Contribution. OSMC has the right to accept or refuse Contributions. - -Definitions: - -"Subsidiary license conditions" means: - -The additional license conditions depending on the by the recipient chosen -mode of OSMC-PL, defined by GPL version 3.0 for GPL, and by EPL for -OSMC-Internal-EPL and OSMC-External-EPL. - -"OSMC-PL" means: - -Open Source Modelica Consortium Public License version 1.2, i.e., the license -defined here (the text between -"--- Start of Definition of OSMC Public License ---" and -"--- End of Definition of OSMC Public License ---", or later versions thereof. - -"OSMC-PL Header" means: - -Open Source Modelica Consortium Public License Header version 1.2, i.e., the -text between "--- Start of Definition of OSMC Public License ---" and -"--- End of OSMC Public License Header ---, or later versions thereof. - -"Contribution" means: - -a) in the case of the initial Contributor, the initial code and documentation - distributed under OSMC-PL, and - -b) in the case of each subsequent Contributor: - i) changes to OpenModelica, and - ii) additions to OpenModelica; - -where such changes and/or additions to OpenModelica originate from and are -distributed by that particular Contributor. A Contribution 'originates' from -a Contributor if it was added to OpenModelica by such Contributor itself or -anyone acting on such Contributor's behalf. - -For Contributors licensing OpenModelica under OSMC-Internal-EPL or -OSMC-External-EPL conditions, the following conditions also hold: - -Contributions do not include additions to the distributed Program which: (i) -are separate modules of software distributed in conjunction with OpenModelica -under their own license agreement, (ii) are separate modules which are not -derivative works of OpenModelica, and (iii) are separate modules of software -distributed in conjunction with OpenModelica under their own license agreement -where these separate modules are merged with (weaved together with) modules of -OpenModelica to form new modules that are distributed as object code or source -code under their own license agreement, as allowed under the Additional -Condition of internal distribution according to OSMC-Internal-EPL and/or -Additional Condition for external distribution according to OSMC-External-EPL. - -"Transfer of Contribution Copyright" means that the Contributors of a -Contribution transfer the ownership and the copyright of the Contribution to -Open Source Modelica Consortium, the OpenModelica Copyright owner, for -inclusion in OpenModelica. The transfer takes place upon the effective date -when the Contribution is made available on the OSMC web site under OSMC-PL, by -such Contributors themselves or anyone acting on such Contributors' behalf. -The transfer is free of charge. If the Contributors or OSMC so wish, -an optional Copyright transfer agreement can be signed between OSMC and the -Contributors, as specified in an Appendix of the OSMC Bylaws. - -"Contribution License" means a license from OSMC to the Contributors of the -Contribution, effective on the date of the Transfer of Contribution Copyright, -where OSMC grants the Contributors a non-exclusive, world-wide, transferable, -free of charge, perpetual license, including sublicensing rights, to use, -have used, modify, have modified, reproduce and or have reproduced the -contributed material, for business and other purposes, including but not -limited to evaluation, development, testing, integration and merging with -other software and distribution. The warranty and liability disclaimers of -OSMC-PL apply to this license. - -"Contributor" means any person or entity that distributes (part of) -OpenModelica. - -"The Program" means the Contributions distributed in accordance with OSMC-PL. - -"OpenModelica" means the Contributions distributed in accordance with OSMC-PL. - -"Recipient" means anyone who receives OpenModelica under OSMC-PL, -including all Contributors. - -"Licensed Third Party Distributor" means a reseller/distributor having signed -a redistribution/resale agreement in accordance with OSMC-PL and OSMC Bylaws, -with an OSMC Level 2 organizational member which is not an Affiliate of the -reseller/distributor, for distributing a product containing part(s) of -OpenModelica. The Licensed Third Party Distributor shall only be allowed -further redistribution to other resellers if the Level 2 member is granting -such a right to it in the redistribution/resale agreement between the -Level 2 member and the Licensed Third Party Distributor. - -"Affiliate" shall mean any legal entity, directly or indirectly, through one -or more intermediaries, controlling or controlled by or under common control -with any other legal entity, as the case may be. For purposes of this -definition, the term "control" (including the terms "controlling," -"controlled by" and "under common control with") means the possession, -direct or indirect, of the power to direct or cause the direction of the -management and policies of a legal entity, whether through the ownership of -voting securities, by contract or otherwise. - -NO WARRANTY - -EXCEPT AS EXPRESSLY SET FORTH IN THE BY RECIPIENT SELECTED SUBSIDIARY -LICENSE CONDITIONS OF OSMC-PL, OPENMODELICA IS PROVIDED ON AN "AS IS" -BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR -IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF -TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR -PURPOSE. Each Recipient is solely responsible for determining the -appropriateness of using and distributing OPENMODELICA and assumes all risks -associated with its exercise of rights under OSMC-PL , including but not -limited to the risks and costs of program errors, compliance with applicable -laws, damage to or loss of data, programs or equipment, and unavailability -or interruption of operations. - -DISCLAIMER OF LIABILITY - -EXCEPT AS EXPRESSLY SET FORTH IN THE BY RECIPIENT SELECTED SUBSIDIARY -LICENSE CONDITIONS OF OSMC-PL, NEITHER RECIPIENT NOR ANY CONTRIBUTORS -SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION -LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF OPENMODELICA OR THE -EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - -A Contributor licensing OpenModelica under OSMC-Internal-EPL or -OSMC-External-EPL may choose to distribute (parts of) OpenModelica in object -code form under its own license agreement, provided that: - -a) it complies with the terms and conditions of OSMC-PL; or for the case of -redistribution of OpenModelica together with proprietary code it is a dual -license where the OpenModelica parts are distributed under OSMC-PL compatible -conditions and the proprietary code is distributed under proprietary license -conditions; and - -b) its license agreement: - i) effectively disclaims on behalf of all Contributors all warranties and -conditions, express and implied, including warranties or conditions of title -and non-infringement, and implied warranties or conditions of merchantability -and fitness for a particular purpose; - ii) effectively excludes on behalf of all Contributors all liability for -damages, including direct, indirect, special, incidental and consequential -damages, such as lost profits; - iii) states that any provisions which differ from OSMC-PL are offered by that -Contributor alone and not by any other party; and - iv) states from where the source code for OpenModelica is available, and -informs licensees how to obtain it in a reasonable manner on or through a -medium customarily used for software exchange. - -When OPENMODELICA is made available in source code form: - - a) it must be made available under OSMC-PL; and - - b) a copy of OSMC-PL must be included with each copy of OPENMODELICA. - - c) a copy of the subsidiary license associated with the selected mode of -OSMC-PL must be included with each copy of OPENMODELICA. - -Contributors may not remove or alter any copyright notices contained within -OPENMODELICA. - -If there is a conflict between OSMC-PL and the subsidiary license conditions, -OSMC-PL has priority. - -This Agreement is governed by the laws of Sweden. The place of jurisdiction -for all disagreements related to this Agreement, is Linköping, Sweden. - -The EPL 1.0 license definition has been obtained from: -http://www.eclipse.org/legal/epl-v10.html. It is also reproduced in Appendix B -of the OSMC Bylaws, and in the OpenModelica distribution. - -The GPL Version 3 license definition has been obtained from -http://www.gnu.org/copyleft/gpl.html. It is also reproduced in Appendix C -of the OSMC Bylaws, and in the OpenModelica distribution. - ---- End of Definition of OSMC Public License --- - -Additional software statically linked by OpenModelica: - -[BSD] Full text might be in the file '/usr/share/common-licenses/BSD', -online http://opensource.org/licenses/BSD-3-Clause, or in the -OpenModelica source distribution if the sources were used. - -[LGPL 2.1] Full text might be in the file '/usr/share/common-licenses/LGPL-2.1', -or online http://opensource.org/licenses/LGPL-2.1. - -[BSD] ANTLR3 Copyright (c) 2005-2008 Terence Parr -[BSD] Maven Plugin Copyright (c) 2009 Jim Idle -[BSD] FMILIB Copyright (c) 2012 Modelon AB -[BSD] LAPACK Copyright (c) 1992-2011 The University of Tennessee and The University - 2000-2011 The University of California Berkeley - 2006-2011 The University of Colorado Denver -[LGPL 2.1] lpsolve55 -[Public Domain] sqlite3 - -Shipped libraries: -[GPL 3] Full text might be in the file '/usr/share/common-licenses/GPL-3', -or online http://opensource.org/licenses/GPL-3.0. diff --git a/debian/desktops/omedit.desktop b/debian/desktops/omedit.desktop deleted file mode 100644 index eeb4ef8..0000000 --- a/debian/desktops/omedit.desktop +++ /dev/null @@ -1,14 +0,0 @@ -[Desktop Entry] -Version=1.0 -Encoding=UTF-8 -Name=OMEdit -GenericName=Physical modeling and simulation tool -Comment=A Modelica connection editor -TryExec=OMEdit -Exec=OMEdit %f -Icon=/usr/share/pixmaps/omedit.png -Terminal=false -Type=Application -StartupNotify=true -Categories=Development;Education;Science;Math; -MimeType=text/x-onb;application/x-omnotebook; diff --git a/debian/desktops/omnotebook.desktop b/debian/desktops/omnotebook.desktop deleted file mode 100644 index 71fccbf..0000000 --- a/debian/desktops/omnotebook.desktop +++ /dev/null @@ -1,14 +0,0 @@ -[Desktop Entry] -Version=1.0 -Encoding=UTF-8 -Name=OMNotebook -GenericName=Physical modeling and simulation tool -Comment=An open-source software tool for an electronic notebook supporting Modelica. -TryExec=OMNotebook -Exec=OMNotebook %f -Icon=/usr/share/pixmaps/OMNotebook_icon.svg -Terminal=false -Type=Application -StartupNotify=true -Categories=Development;Education;Science;Math; -MimeType=text/x-onb;application/x-omnotebook; diff --git a/debian/desktops/omoptim.desktop b/debian/desktops/omoptim.desktop deleted file mode 100644 index 1130808..0000000 --- a/debian/desktops/omoptim.desktop +++ /dev/null @@ -1,13 +0,0 @@ -[Desktop Entry] -Version=1.0 -Encoding=UTF-8 -Name=OMOptim -GenericName=Tool for optimization of physical models and simulations -Comment=A Modelica optimization tool -TryExec=OMOptim -Exec=OMOptim %f -Icon=/usr/share/pixmaps/omoptim.ico -Terminal=false -Type=Application -StartupNotify=true -Categories=Development;Education;Science;Math; diff --git a/debian/desktops/omshell-terminal.desktop b/debian/desktops/omshell-terminal.desktop deleted file mode 100644 index 67115d7..0000000 --- a/debian/desktops/omshell-terminal.desktop +++ /dev/null @@ -1,13 +0,0 @@ -[Desktop Entry] -Version=1.0 -Encoding=UTF-8 -Name=OMShell-terminal -GenericName=Physical modeling and simulation tool -Comment=A complete Modelica modeling, compilation and simulation environment based on free software. -TryExec=OMShell-terminal -Exec=OMShell-terminal -Icon=/usr/share/pixmaps/omshell-terminal-large.svg -Terminal=true -Type=Application -StartupNotify=true -Categories=Development;IDE; diff --git a/debian/desktops/omshell.desktop b/debian/desktops/omshell.desktop deleted file mode 100644 index fe79885..0000000 --- a/debian/desktops/omshell.desktop +++ /dev/null @@ -1,13 +0,0 @@ -[Desktop Entry] -Version=1.0 -Encoding=UTF-8 -Name=OMShell -GenericName=Physical modeling and simulation tool -Comment=A complete Modelica modeling, compilation and simulation environment based on free software. -TryExec=OMShell -Exec=OMShell -Icon=/usr/share/pixmaps/omshell-large.svg -Terminal=false -Type=Application -StartupNotify=true -Categories=Development;IDE; diff --git a/debian/dirs b/debian/dirs deleted file mode 100644 index 4b4bb28..0000000 --- a/debian/dirs +++ /dev/null @@ -1,4 +0,0 @@ -usr/lib -usr/include -usr/share/omc/java -usr/share/doc/omc/testmodels diff --git a/debian/drcontrol.install b/debian/drcontrol.install deleted file mode 100644 index 47f3a9a..0000000 --- a/debian/drcontrol.install +++ /dev/null @@ -1 +0,0 @@ -debian/tmp/usr/share/omnotebook/drcontrol/* usr/share/omnotebook/drcontrol diff --git a/debian/drmodelica.install b/debian/drmodelica.install deleted file mode 100644 index 1dcc74a..0000000 --- a/debian/drmodelica.install +++ /dev/null @@ -1 +0,0 @@ -debian/tmp/usr/share/omnotebook/drmodelica/* usr/share/omnotebook/drmodelica diff --git a/debian/icons/OMNotebook_icon.xpm b/debian/icons/OMNotebook_icon.xpm deleted file mode 100644 index ea52913..0000000 --- a/debian/icons/OMNotebook_icon.xpm +++ /dev/null @@ -1,40 +0,0 @@ -/* XPM */ -static char * OMNotebook_icon_xpm[] = { -"32 32 5 1", -" c None", -". c #008080", -"+ c #0000FF", -"@ c #FFFFFF", -"# c #000000", -"..++++++++++++++++++++++++++++..", -".+@@@@@@@@@@@@@@@@@@@@@@@@@@@@+.", -"+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@+", -"+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@+", -"+@@@@@#####@@@@@####@@@@@####@@+", -"+@@@@#######@@@@####@@@@@####@@+", -"+@@@###@@@###@@@####@@@@@####@@+", -"+@@@###@@@###@@@#####@@@#####@@+", -"+@@###@@@@@###@@#####@@@#####@@+", -"+@@###@@@@@###@@###@#@@@#@###@@+", -"+@@###@@@@@###@@###@#@@@#@###@@+", -"+@@###@@@@@###@@###@##@##@###@@+", -"+@@###@@@@@###@@###@##@##@###@@+", -"+@@###@@@@@###@@###@##@##@###@@+", -"+@@###@@@@@###@@###@@#@#@@###@@+", -"+@@@###@@@###@@@###@@###@@###@@+", -"+@@@###@@@###@@@###@@###@@###@@+", -"+@@@@#######@@@@###@@###@@###@@+", -"+@@@@@#####@@@@@###@@###@@###@@+", -"+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@+", -"+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@+", -"+@#@@#@@@@#@@@@#@@@@@@@@@@@#@@@+", -"+@##@#@@@@#@@@@#@@@@@@@@@@@#@@@+", -"+@##@#@#@####@@##@@@#@@@#@@#@#@+", -"+@#@###@#@####@#@#@#@#@#@#@##@@+", -"+@#@###@#@##@@@#@#@#@#@#@#@#@#@+", -"+@#@@#@#@@####@##@@@#@@@#@@#@#@+", -"+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@+", -"+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@+", -"+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@+", -".+@@@@@@@@@@@@@@@@@@@@@@@@@@@@+.", -"..++++++++++++++++++++++++++++.."}; diff --git a/debian/icons/OMShell-terminal_icon.xpm b/debian/icons/OMShell-terminal_icon.xpm deleted file mode 100644 index 5d42326..0000000 --- a/debian/icons/OMShell-terminal_icon.xpm +++ /dev/null @@ -1,51 +0,0 @@ -/* XPM */ -static char * OMS_xpm[] = { -"32 32 16 1", -" c #000000", -". c #800000", -"+ c #008000", -"@ c #808000", -"# c #000080", -"$ c #800080", -"% c #008080", -"& c #C0C0C0", -"* c #808080", -"= c #FF0000", -"- c #00FF00", -"; c #FFFF00", -"> c #0000FF", -", c #FF00FF", -"' c #00FFFF", -") c #FFFFFF", -"))))))))))))))))))))))))))))))))", -"))))))))))))))))))))))))))))))))", -")))))))& *)))))) *))))& ))", -"))))))* &)))) *))) )", -"))))& ))* )) *", -"))) & & &&* &)& ", -"& ))))) *))))) )))))& *", -" )))))) )))))) *)))))* &", -" ))))))* ))))))) &)))))) )", -" ))))))) ))))))) &))))))& ))", -" )))))))) )))))))& &))))))) &))", -"))))))))&*)))))))) )))))))) ))))", -")))))))) )))))))) ))))))))&)))))", -")))))))**))))))))&))))))))&)))))", -"))))))) ))))))))*)))))))))))))))", -"))))))*))))))))*)))))).===))))))", -"))))) ))))))))))))))))....))))))", -"))))*)))))))))))))))))* ..))))))", -"))))*)))))))))))))))))) &))))))", -"& )))))))&*)))))))))&&))))))))&&", -"*&))))))) *))))))))) *))))))) *", -"))))))))) *))))))))) *))))))& *)", -"))))))))) *))))))))) *))))))& *)", -"))))))))) *))))))))) *))))))& *)", -"))))))))) *))))))))) *))))))& *)", -"))))))))) *))))))))) *))))))& *)", -"))))))))) *))))))))) *))))))& *)", -"&*))))))) &&&&))))) *))))))) &", -"))))))))))))))))))))))))))))))))", -"))))))))))))))))))))))))))))))))", -"))))))))))))))))))))))))))))))))", -"))))))))))))))))))))))))))))))))"}; diff --git a/debian/icons/OMShell_icon.xpm b/debian/icons/OMShell_icon.xpm deleted file mode 100644 index 5d42326..0000000 --- a/debian/icons/OMShell_icon.xpm +++ /dev/null @@ -1,51 +0,0 @@ -/* XPM */ -static char * OMS_xpm[] = { -"32 32 16 1", -" c #000000", -". c #800000", -"+ c #008000", -"@ c #808000", -"# c #000080", -"$ c #800080", -"% c #008080", -"& c #C0C0C0", -"* c #808080", -"= c #FF0000", -"- c #00FF00", -"; c #FFFF00", -"> c #0000FF", -", c #FF00FF", -"' c #00FFFF", -") c #FFFFFF", -"))))))))))))))))))))))))))))))))", -"))))))))))))))))))))))))))))))))", -")))))))& *)))))) *))))& ))", -"))))))* &)))) *))) )", -"))))& ))* )) *", -"))) & & &&* &)& ", -"& ))))) *))))) )))))& *", -" )))))) )))))) *)))))* &", -" ))))))* ))))))) &)))))) )", -" ))))))) ))))))) &))))))& ))", -" )))))))) )))))))& &))))))) &))", -"))))))))&*)))))))) )))))))) ))))", -")))))))) )))))))) ))))))))&)))))", -")))))))**))))))))&))))))))&)))))", -"))))))) ))))))))*)))))))))))))))", -"))))))*))))))))*)))))).===))))))", -"))))) ))))))))))))))))....))))))", -"))))*)))))))))))))))))* ..))))))", -"))))*)))))))))))))))))) &))))))", -"& )))))))&*)))))))))&&))))))))&&", -"*&))))))) *))))))))) *))))))) *", -"))))))))) *))))))))) *))))))& *)", -"))))))))) *))))))))) *))))))& *)", -"))))))))) *))))))))) *))))))& *)", -"))))))))) *))))))))) *))))))& *)", -"))))))))) *))))))))) *))))))& *)", -"))))))))) *))))))))) *))))))& *)", -"&*))))))) &&&&))))) *))))))) &", -"))))))))))))))))))))))))))))))))", -"))))))))))))))))))))))))))))))))", -"))))))))))))))))))))))))))))))))", -"))))))))))))))))))))))))))))))))"}; diff --git a/debian/libomc-dev.install b/debian/libomc-dev.install deleted file mode 100644 index 15e6e2e..0000000 --- a/debian/libomc-dev.install +++ /dev/null @@ -1,4 +0,0 @@ -debian/tmp/usr/include/*/omc/antlr3 -# These are not really needed, but it is a dev-package, so let's add them anyway -# debian/tmp/usr/lib/*/omc/libomcruntime.a -debian/tmp/usr/lib/*/omc/libomparse.a diff --git a/debian/libomc.install b/debian/libomc.install deleted file mode 100644 index fd5cb21..0000000 --- a/debian/libomc.install +++ /dev/null @@ -1,11 +0,0 @@ -debian/tmp/usr/lib/*/omc/libOpenModelicaCompiler.so -debian/tmp/usr/lib/*/omc/libOpenModelicaRuntimeC* -debian/tmp/usr/lib/*/omc/lib*antlr3.so -debian/tmp/usr/lib/*/omc/libomcruntime* -debian/tmp/usr/lib/*/omc/libzmq* - -# The Modelica External shared libs. They are in omc/ffi/ folder -debian/tmp/usr/lib/*/omc/ffi/* - -# These are not really needed -#debian/tmp/usr/lib/*/omc/libomparse.a diff --git a/debian/libomccpp.install b/debian/libomccpp.install deleted file mode 100644 index 7655a34..0000000 --- a/debian/libomccpp.install +++ /dev/null @@ -1,2 +0,0 @@ -debian/tmp/usr/include/omc/*cpp/* -debian/tmp/usr/lib/*/omc/*cpp/* diff --git a/debian/libomcsimulation.install b/debian/libomcsimulation.install deleted file mode 100644 index 40780ff..0000000 --- a/debian/libomcsimulation.install +++ /dev/null @@ -1,47 +0,0 @@ -# Common -debian/tmp/usr/lib/*/omc/libomcgc* - -# FMIL -debian/tmp/usr/lib/*/omc/libfmilib* - -# MSL-external -debian/tmp/usr/lib/*/omc/libModelica* -debian/tmp/usr/lib/*/omc/libzlib* - -# ModelicaExternalC -debian/tmp/usr/include/omc/ModelicaExternalC/* - -# Simulations -debian/tmp/usr/lib/*/omc/libOpenModelicaFMIRuntimeC* -debian/tmp/usr/lib/*/omc/libSimulationRuntimeC.* -debian/tmp/usr/lib/*/omc/libSimulationRuntimeFMI* -debian/tmp/usr/lib/*/omc/libSimulationRuntimeRust.* - -## SuiteSparse -debian/tmp/usr/lib/*/omc/lib*amd* -debian/tmp/usr/lib/*/omc/libbtf* -debian/tmp/usr/lib/*/omc/libklu* -debian/tmp/usr/lib/*/omc/libsuitesparseconfig* -debian/tmp/usr/lib/*/omc/libumfpack* - -debian/tmp/usr/lib/*/omc/liblis* -debian/tmp/usr/lib/*/omc/libcminpack* -debian/tmp/usr/lib/*/omc/libomopc* -debian/tmp/usr/lib/*/omc/libsundials_* -debian/tmp/usr/lib/*/omc/libryu* - -## MOO -debian/tmp/usr/lib/*/omc/libseq* -debian/tmp/usr/lib/*/omc/libipopt* -debian/tmp/usr/lib/*/omc/lib*mumps* -debian/tmp/usr/lib/*/omc/libmoo* -debian/tmp/usr/lib/*/omc/libfmt* - - -# OMSI -debian/tmp/usr/include/omc/omsi/* -debian/tmp/usr/lib/*/omc/omsi/* - -# ParModAuto -debian/tmp/usr/lib/*/omc/libParModelicaAuto.* -debian/tmp/usr/lib/*/omc/libtbb* diff --git a/debian/libomplot-dev.install b/debian/libomplot-dev.install deleted file mode 100644 index 3fecbc0..0000000 --- a/debian/libomplot-dev.install +++ /dev/null @@ -1 +0,0 @@ -debian/tmp/usr/include/omplot/qwt diff --git a/debian/libomplot.install b/debian/libomplot.install deleted file mode 100644 index 9459811..0000000 --- a/debian/libomplot.install +++ /dev/null @@ -1,2 +0,0 @@ -debian/tmp/usr/lib/*/omc/libomqwt* -debian/tmp/usr/lib/*/omc/libOMPlot* diff --git a/debian/libomsensplugin.install b/debian/libomsensplugin.install deleted file mode 100644 index 06a3845..0000000 --- a/debian/libomsensplugin.install +++ /dev/null @@ -1,2 +0,0 @@ -# These are not really needed -debian/tmp/usr/lib/*/omc/libomsensplugin.so diff --git a/debian/libomsimulator.install b/debian/libomsimulator.install deleted file mode 100644 index b366e9f..0000000 --- a/debian/libomsimulator.install +++ /dev/null @@ -1,5 +0,0 @@ -debian/tmp/usr/include/omc/OMSimulator/* - -debian/tmp/usr/lib/*/omc/libOMSimulator.so -debian/tmp/usr/lib/*/omc/libOMSimulator.a -debian/tmp/usr/lib/*/omc/OMSimulator/*.py diff --git a/debian/omc-common.install b/debian/omc-common.install deleted file mode 100644 index ada4b17..0000000 --- a/debian/omc-common.install +++ /dev/null @@ -1,5 +0,0 @@ -debian/tmp/usr/share/omc/runtime -debian/tmp/usr/lib/omc/*.mo -debian/tmp/usr/include/omc/c -debian/tmp/usr/include/omc/scripting-API -debian/tmp/usr/include/omc/sundials diff --git a/debian/omc.README.Debian b/debian/omc.README.Debian deleted file mode 100644 index 636ff14..0000000 --- a/debian/omc.README.Debian +++ /dev/null @@ -1,7 +0,0 @@ -openmodelica for Debian ------------------------ - -Debian package for OpenModelica Compiler/Interpreter omc and OpenModelica -client application OMNotebook, OMShell and OMShell-terminal - - -- Robert Wotzlaw Mon, 16 Nov 2009 12:05:22 +0100 diff --git a/debian/omc.docs b/debian/omc.docs deleted file mode 100644 index ea065b9..0000000 --- a/debian/omc.docs +++ /dev/null @@ -1,2 +0,0 @@ -OMCompiler/README.md -OMCompiler/README.Linux.md diff --git a/debian/omc.install b/debian/omc.install deleted file mode 100644 index 793d857..0000000 --- a/debian/omc.install +++ /dev/null @@ -1,4 +0,0 @@ -debian/testmodels/flat_dcmotor.mos usr/share/doc/omc/testmodels -debian/tmp/usr/bin/omc -debian/tmp/usr/share/omc/scripts/* -debian/tmp/usr/share/doc/omc/testmodels/* diff --git a/debian/omc.prerm b/debian/omc.prerm deleted file mode 100755 index e50f887..0000000 --- a/debian/omc.prerm +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh -update-alternatives --remove omc /usr/bin/omc-rml -update-alternatives --remove omc /usr/bin/omc-bootstrapped diff --git a/debian/omedit.install b/debian/omedit.install deleted file mode 100644 index dd2b358..0000000 --- a/debian/omedit.install +++ /dev/null @@ -1,4 +0,0 @@ -debian/desktops/omedit.desktop usr/share/applications -OMEdit/OMEditLIB/Resources/icons/omedit.png usr/share/pixmaps -debian/tmp/usr/bin/OMEdit -debian/tmp/usr/share/omedit/nls/* diff --git a/debian/omedit.menu b/debian/omedit.menu deleted file mode 100644 index 315959c..0000000 --- a/debian/omedit.menu +++ /dev/null @@ -1,9 +0,0 @@ -?package(omedit): \ - needs="X11" \ - section="Applications/Science/Mathematics" \ - title="OMEdit" \ - command="/usr/bin/OMEdit" \ - hints="Programming,Simulation,Science" \ - icon="/usr/share/pixmaps/OMEdit_icon.png" \ - longtitle="OpenModelica Connection Editor" \ - description="A Modelica connection editor" diff --git a/debian/omlibrary.install b/debian/omlibrary.install deleted file mode 100644 index 300123d..0000000 --- a/debian/omlibrary.install +++ /dev/null @@ -1 +0,0 @@ -debian/tmp/usr/share/omlibrary/* diff --git a/debian/omnotebook.install b/debian/omnotebook.install deleted file mode 100644 index 93fa8c3..0000000 --- a/debian/omnotebook.install +++ /dev/null @@ -1,5 +0,0 @@ -debian/desktops/omnotebook.desktop usr/share/applications -OMNotebook/OMNotebook/OMNotebookGUI/Resources/OMNotebook_icon.svg usr/share/pixmaps -debian/tmp/usr/bin/OMNotebook -debian/tmp/usr/share/omnotebook/*.xml -debian/tmp/usr/share/omnotebook/*.onb diff --git a/debian/omnotebook.menu b/debian/omnotebook.menu deleted file mode 100644 index 6114d6a..0000000 --- a/debian/omnotebook.menu +++ /dev/null @@ -1,9 +0,0 @@ -?package(omnotebook): \ - needs="X11" \ - section="Applications/Science/Mathematics" \ - title="OMNotebook" \ - command="/usr/bin/OMNotebook" \ - hints="Programming,Simulation" \ - icon="/usr/share/pixmaps/OMNotebook_icon.xpm" \ - longtitle="Open Modelica Notebook" \ - description="An electronic notebook supporting Modelica" diff --git a/debian/omnotebook.sharedmimeinfo b/debian/omnotebook.sharedmimeinfo deleted file mode 100644 index 7d203ea..0000000 --- a/debian/omnotebook.sharedmimeinfo +++ /dev/null @@ -1,14 +0,0 @@ - - - - omnotebook compressed file - - - - omnotebook file - - - - - - diff --git a/debian/omplot.install b/debian/omplot.install deleted file mode 100644 index 7debf1f..0000000 --- a/debian/omplot.install +++ /dev/null @@ -1 +0,0 @@ -debian/tmp/usr/bin/OMPlot diff --git a/debian/omshell-terminal.install b/debian/omshell-terminal.install deleted file mode 100644 index 3870432..0000000 --- a/debian/omshell-terminal.install +++ /dev/null @@ -1,3 +0,0 @@ -debian/desktops/omshell-terminal.desktop usr/share/applications -OMShell/OMShell/OMShellGUI/Resources/omshell-terminal-large.svg usr/share/pixmaps -debian/tmp/usr/bin/OMShell-terminal diff --git a/debian/omshell-terminal.menu b/debian/omshell-terminal.menu deleted file mode 100644 index da54e24..0000000 --- a/debian/omshell-terminal.menu +++ /dev/null @@ -1,9 +0,0 @@ -?package(omshell-terminal): \ - needs="text" \ - section="Applications/Science/Mathematics" \ - title="OMShell-terminal" \ - command="/usr/bin/OMShell-terminal" \ - hints="Programming,Simulation" \ - icon="/usr/share/pixmaps/OMShell-terminal_icon.xpm" \ - longtitle="Open Modelica Shell-terminal" \ - description="A console based shell supporting Modelica" diff --git a/debian/omshell.install b/debian/omshell.install deleted file mode 100644 index d4829c6..0000000 --- a/debian/omshell.install +++ /dev/null @@ -1,5 +0,0 @@ -debian/desktops/omshell.desktop usr/share/applications -debian/tmp/usr/bin/OMShell -debian/tmp/usr/share/omshell/*.xml -debian/tmp/usr/share/omshell/nls/*.qm -OMShell/OMShell/OMShellGUI/Resources/omshell-large.svg usr/share/pixmaps diff --git a/debian/omshell.menu b/debian/omshell.menu deleted file mode 100644 index 598c65a..0000000 --- a/debian/omshell.menu +++ /dev/null @@ -1,9 +0,0 @@ -?package(omshell): \ - needs="X11" \ - section="Applications/Science/Mathematics" \ - title="OMShell" \ - command="/usr/bin/OMShell" \ - hints="Programming,Simulation" \ - icon="/usr/share/pixmaps/OMShell_icon.xpm" \ - longtitle="Open Modelica Shell" \ - description="A Qt based shell supporting Modelica" diff --git a/debian/omsimulator.install b/debian/omsimulator.install deleted file mode 100644 index fdfdfba..0000000 --- a/debian/omsimulator.install +++ /dev/null @@ -1,2 +0,0 @@ -debian/tmp/usr/bin/OMSimulator* usr/bin/ -debian/tmp/usr/share/OMSimulator usr/share/ diff --git a/debian/rules b/debian/rules deleted file mode 100755 index 808352b..0000000 --- a/debian/rules +++ /dev/null @@ -1,177 +0,0 @@ -#!/usr/bin/make -f -# -*- makefile -*- -# OpenModelica debian/rules that uses debhelper. -# Based on a sample file with GNU copyright 1997 to 1999 by Joey Hess. - -# Uncomment this to turn on verbose mode. -#export DH_VERBOSE=1 - -# These are used for cross-compiling and for saving the configure script -# from having to guess our platform (since we know it already) -DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) -DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) - -ARCH ?= $(shell uname -m | sed s/i[0-9]86/x86/) - -# since we updated the copyright in .g files we need to set UTF8 as otherwise ANTLR parser barks on {\"o} -export LC_ALL = C.UTF-8 - -# Some variables to install binaries under debian/tmp -DEST = $(CURDIR)/debian/tmp -SRCD = $(CURDIR) - -CLANGVER ?= $(shell clang --version | grep -o "clang version [0-9.]*" | cut "-d " -f3) - -# Try to compile with gcc rather than old gcc versions -ifeq (3.0,$(CLANGVER)) - -ifeq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE)) - CC = gcc - CXX = g++ -else - CC = $(DEB_HOST_GNU_TYPE)-gcc - CXX = $(DEB_HOST_GNU_TYPE)-g++ -endif - -else - -ifeq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE)) - CC = clang - CXX = clang++ - CONF_OPTS_CROSS = --without-omc - SANITY_CHECK = -C OMCompiler sanity-check -else - CC = clang -target $(DEB_HOST_GNU_TYPE) -# clang++ seems unable to find some bits stuff in C++ includes - CXX = $(DEB_HOST_GNU_TYPE)-g++ -# Even GCC needs special flags because libreadline seems messed up -# Readline needed this, but messes up other libraries: -Wl,--unresolved-symbols=ignore-all - LDFLAGS = -Wl,-rpath-link -Wl,/lib/$(DEB_HOST_GNU_TYPE) -Wl,-rpath-link -Wl,/usr/lib/$(DEB_HOST_GNU_TYPE) - NATIVE_CC = clang - NATIVE_CXX = clang++ - CONF_OPTS_CROSS = --with-omc="`pwd`/cross-build/bin/omc" - SANITY_CHECK = -endif - -endif - -ifeq (arm-linux-gnueabihf,$(DEB_HOST_GNU_TYPE)) - CONF_OPTS=--without-cppruntime - EXTRA_INSTALL= -else - CONF_OPTS=--with-cppruntime - EXTRA_INSTALL= -endif - -ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) - CFLAGS += -O0 -else - CFLAGS += -Os -endif - -#ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) -# NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) -EXTRA_MAKEFLAGS = $(MAKEFLAGS) -j$(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) $(shell make --version --output-sync=recurse > /dev/null 2>&1 && echo --output-sync=recurse) -#endif - -# march=pentium4 used to be enabled because omc required sse2 regardless -# ifeq (x86,$(ARCH)) -# CFLAGS += -march=pentium4 -# endif -ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) - INSTALL_PROGRAM += -s -endif - -configure: configure.ac - autoreconf --install - -build: build-stamp -build-arch: build -build-indep: build - -build-stamp: configure - dh_testdir - # We might be cross-compiling. If so, we need a working omc. Easiest way? Build it ourselves. -ifneq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE)) - ./configure CFLAGS="$(CFLAGS)" CC=$(NATIVE_CC) CXX=$(NATIVE_CXX) OMPCC="gcc -fopenmp" \ - --host=$(DEB_BUILD_GNU_TYPE) \ - --build=$(DEB_BUILD_GNU_TYPE) \ - --prefix=/usr \ - --without-METIS \ - --without-FMIL \ - --without-lapack \ - --without-paradiseo \ - --disable-omshell-terminal \ - --without-lpsolve \ - --without-ipopt \ - --with-cppruntime \ - --without-omlibrary \ - --disable-modelica3d \ - $(CONF_OPTS) - $(MAKE) $(EXTRA_MAKEFLAGS) -C OMCompiler omc-no-sim - mv build cross-build - $(MAKE) clean -endif - # Cross-compile done, now configure for real - # wily armhf requires -lm for blas... - ./configure CFLAGS="$(CFLAGS)" CC="$(CC)" CXX="$(CXX)" LDFLAGS="$(LDFLAGS)" OMPCC="gcc -fopenmp" \ - --host=$(DEB_HOST_GNU_TYPE) \ - --build=$(DEB_BUILD_GNU_TYPE) \ - --prefix=/usr \ - --with-lapack="-llapack -lblas -lm" \ - --without-paradiseo \ - --without-omlibrary \ - --disable-modelica3d \ - $(CONF_OPTS) $(CONF_OPTS_CROSS) - # Add here commands to configure the package. -# --with-static-sqlite=`test -f /usr/lib/*/libsqlite3.a && echo /usr/lib/*/libsqlite3.a || echo /usr/lib/libsqlite3.a` \ -# --with-static-lpsolve=/usr -# --with-static-readline=/usr - # Add here commands to compile the package. - $(MAKE) $(EXTRA_MAKEFLAGS) all - $(MAKE) omlibrary - test -z "$(SANITY_CHECK)" || $(MAKE) $(SANITY_CHECK) - # Skip the testsuite log. People can look it up on hudson - touch build-stamp - -clean: - dh_testdir - dh_testroot - rm -f build-stamp - # Add here commands to clean up after the build process. - dh_clean - -install: build - dh_testdir - dh_testroot - dh_prep - dh_installdirs -popenmodelica -Pdebian/tmp - # Add here commands to install the package into debian/tmp. - $(MAKE) $(EXTRA_MAKEFLAGS) install $(EXTRA_INSTALL) DESTDIR=$(DEST) - # We add our own Debian-specific copyright file - rm -f $(DEST)/usr/share/doc/omc/COPYING - dh_install - -# Build architecture-dependent files here. -binary-arch: build install - dh_testdir - dh_testroot - dh_installchangelogs - dh_installdocs - dh_installexamples - dh_missing --list-missing - dh_installmenu - dh_installmime - dh_link - dh_strip - # dh_compress -X.pdf -X.onb -X.c -X.h -X.mo -X.mos -Xomc_helptext.txt -X.py - dh_fixperms - dh_installdeb - dh_makeshlibs -V - dh_shlibdeps -l/usr/lib/$(DEB_HOST_GNU_TYPE)/omc -Lomc -- --ignore-missing-info - dh_gencontrol - dh_md5sums - dh_builddeb - -binary: binary-indep binary-arch -.PHONY: build clean binary-indep binary-arch binary install diff --git a/debian/source/format b/debian/source/format deleted file mode 100644 index 163aaf8..0000000 --- a/debian/source/format +++ /dev/null @@ -1 +0,0 @@ -3.0 (quilt) diff --git a/debian/source/options b/debian/source/options deleted file mode 100644 index b7bc1f2..0000000 --- a/debian/source/options +++ /dev/null @@ -1 +0,0 @@ -compression = "xz" diff --git a/debian/testmodels/flat_dcmotor.mos b/debian/testmodels/flat_dcmotor.mos deleted file mode 100644 index 00501cd..0000000 --- a/debian/testmodels/flat_dcmotor.mos +++ /dev/null @@ -1,3 +0,0 @@ -loadModel(Modelica); -loadFile("dcmotor.mo"); -instantiateModel(dcmotor); diff --git a/rpm/Makefile b/rpm/Makefile deleted file mode 100644 index a56383e..0000000 --- a/rpm/Makefile +++ /dev/null @@ -1,6 +0,0 @@ -DATE=$(shell date +"%a %b %d %Y") - -all: ~/rpmbuild/SPECS/openmodelica-1.11.spec -~/rpmbuild/SPECS/openmodelica-1.11.spec: SPECS/openmodelica.spec.tpl - sed -e s/BRANCH/1.11/ -e s/VERSION/1.11.0/ -e 's/DATE/$(DATE)/' -e 's/RELEASENUM/1/' $< > $@.tmp - mv $@.tmp $@ diff --git a/rpm/PATCHES/qjson-qt5.patch b/rpm/PATCHES/qjson-qt5.patch deleted file mode 100644 index 9387fa5..0000000 --- a/rpm/PATCHES/qjson-qt5.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -ru openmodelica_1.9.7~2-g3a02b55/OMEdit/qjson/CMakeLists.txt openmodelica_1.9.7~2-g3a02b55-patched/OMEdit/qjson/CMakeLists.txt ---- openmodelica_1.9.7~2-g3a02b55/OMEdit/qjson/CMakeLists.txt 2017-04-05 11:43:10.000000000 +0200 -+++ openmodelica_1.9.7~2-g3a02b55-patched/OMEdit/qjson/CMakeLists.txt 2017-04-05 12:49:25.474488878 +0200 -@@ -41,7 +41,7 @@ - SET(QT_USE_IMPORTED_TARGETS TRUE) - - option(QT4_BUILD "Force building with Qt4 even if Qt5 is found") --set(QT4_BUILD ON) -+set(QT4_BUILD OFF) - - IF (NOT QT4_BUILD) - FIND_PACKAGE( Qt5Core QUIET ) diff --git a/rpm/PATCHES/qwt-link-1.9.patch b/rpm/PATCHES/qwt-link-1.9.patch deleted file mode 100644 index b2a2451..0000000 --- a/rpm/PATCHES/qwt-link-1.9.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -ru openmodelica_1.9.7~2-g3a02b55/OMEdit/qjson/CMakeLists.txt openmodelica_1.9.7~2-g3a02b55-patched/OMEdit/qjson/CMakeLists.txt ---- openmodelica_1.11.0~4-g67594c0/OMPlot/qwt/Makefile.unix.in 2018-09-07 11:43:10.000000000 +0200 -+++ openmodelica_1.11.0~4-g67594c0-patched/OMPlot/qwt/Makefile.unix.in 2018-09-07 12:49:25.474488878 +0200 -@@ -14,7 +14,7 @@ all: build - - Makefile: qwt.pro - @rm -f $@ -- $(QMAKE) QMAKE_CXX=@CXX@ qwt.pro -+ $(QMAKE) QMAKE_CXX=@CXX@ QMAKE_CXXFLAGS="@CXXFLAGS@" QMAKE_LINK="@CXX@" qwt.pro - clean: - test ! -f Makefile || $(MAKE) -f Makefile clean - rm -rf build lib Makefile diff --git a/rpm/PATCHES/qwt-link.patch b/rpm/PATCHES/qwt-link.patch deleted file mode 100644 index eb9cf5d..0000000 --- a/rpm/PATCHES/qwt-link.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -ru openmodelica_1.9.7~2-g3a02b55/OMEdit/qjson/CMakeLists.txt openmodelica_1.9.7~2-g3a02b55-patched/OMEdit/qjson/CMakeLists.txt ---- openmodelica_1.11.0~4-g67594c0/OMPlot/qwt/Makefile.unix.in 2018-09-07 11:43:10.000000000 +0200 -+++ openmodelica_1.11.0~4-g67594c0-patched/OMPlot/qwt/Makefile.unix.in 2018-09-07 12:49:25.474488878 +0200 -@@ -14,7 +14,7 @@ all: build - - Makefile: qwt.pro - @rm -f $@ -- $(QMAKE) QMAKE_CXX=@CXX@ QMAKE_CXXFLAGS="@CXXFLAGS@" qwt.pro -+ $(QMAKE) QMAKE_CXX=@CXX@ QMAKE_CXXFLAGS="@CXXFLAGS@" QMAKE_LINK="@CXX@" qwt.pro - clean: - test ! -f Makefile || $(MAKE) -f Makefile clean - rm -rf build lib Makefile diff --git a/rpm/SPECS/openmodelica.spec.tpl b/rpm/SPECS/openmodelica.spec.tpl deleted file mode 100644 index ebb1161..0000000 --- a/rpm/SPECS/openmodelica.spec.tpl +++ /dev/null @@ -1,261 +0,0 @@ -# See also Jenkinsfile in apt-build repository for stuff that is installed BEFORE everything here -# Don't try fancy stuff like debuginfo, which is useless on binary-only -# packages. Don't strip binary too -# Be sure buildpolicy set to do nothing -%define __spec_install_post %{nil} -%define debug_package %{nil} -%define __os_install_post %{_dbpath}/brp-compress - -Summary: OpenModelica -Name: NAME -Version: RPMVERSION -Release: RELEASENUM%{?dist} -License: OSMC-PL -Group: Development/Tools -# spectool -g -R SPECS/xxx.spec -# sudo yum-builddep SPECS/xxx.spec -SOURCE0 : https://build.openmodelica.org/apt/pool/contrib/openmodelica_DEBVERSION.orig.tar.xz -SOURCE1 : https://openmodelica.org/doc/openmodelica-doc-DOCUMENTATIONVERSION.tar.xz -PATCHES -URL: https://openmodelica.org/ - -%if 0%{?rhel} == 6 -Autoreq: 0 -Requires: readline -Requires: qt5-qtbase -Requires: qt5-qtsvg -Requires: qt5-qtwebengine -Requires: qt5-qtxmlpatterns -Requires: libffi -%endif -Autoprov: 0 -Prefix: /opt/%{name} -Prefix: %{_bindir} - -%global __requires_exclude ^(PRIVATELIBS)$ - -# Recommended (for the repo): git rpm-build rpmdevtools epel-release -%if 0%{?rhel} > 0 -# CentOS / RHEL requires the EPEL repository (for omniORB, etc) -BuildRequires: epel-release -Requires: epel-release -%endif - -Requires: lapack-devel -Requires: make -Requires: gcc -Requires: gcc-gfortran -Requires: gcc-c++ - -BuildRequires: automake -BuildRequires: expat-devel -BuildRequires: bison -BuildRequires: flex -BuildRequires: lapack-devel -BuildRequires: libtool -BuildRequires: uuid -BuildRequires: uuid-devel -BuildRequires: hdf5-devel -BuildRequires: boost-devel -BuildRequires: boost-static -BuildRequires: hwloc-devel -BuildRequires: readline-devel -BuildRequires: libffi-devel -BuildRequires: curl-devel -BuildRequires: gettext -BuildRequires: make -BuildRequires: java -BuildRequires: tar -BuildRequires: xz -BuildRequires: gcc -BuildRequires: gcc-c++ -BuildRequires: gcc-gfortran -# EL8 is the only target left without qt6, in EPEL or anywhere else -%if 0%{?rhel} > 0 && 0%{?rhel} <= 8 -%define omqt5 1 -%endif - -%if 0%{?omqt5} -BuildRequires: qt5-qtwebengine-devel -BuildRequires: qt5-linguist -BuildRequires: qt5-qttools -BuildRequires: qt5-qtbase-devel -BuildRequires: qt5-qtsvg-devel -BuildRequires: qt5-qtxmlpatterns-devel -BuildRequires: qt5-qt3d-devel -%else -BuildRequires: qt6-qtwebengine-devel -BuildRequires: qt6-linguist -BuildRequires: qt6-qttools -BuildRequires: qt6-qtbase-devel -BuildRequires: qt6-qtsvg-devel -BuildRequires: qt6-qt3d-devel -BuildRequires: qt6-qt5compat-devel -BuildRequires: qt6-qthttpserver-devel -BuildRequires: qt6-qtwebsockets-devel -%endif - - -# Use cmake versions > 3. On EL7 this is provided by cmake3 package. -# On EL > 7 it is just cmake. -%if 0%{?rhel} == 7 -BuildRequires: cmake3 -%define cmakecommand CMAKE=cmake3 -%else -BuildRequires: cmake -%define cmakecommand CMAKE=cmake -%endif - -# The base centos:8 image (we use for our build-deps:el8 image) comes with -# broken cmake package due to old libarchive (v3.3.2). v3.3.3 Seems to work. -# Once the base image is updated this can be removed. -%if 0%{?rhel} == 8 -BuildRequires: libarchive >= 3.3.3 -%endif - -# Use gcc-11 on EL8 as well. devtoolset does not seem to be available on -# EL8. One is supposed to use gcc-toolset instead. -%{?el8:Requires: gcc-toolset-11-gcc gcc-toolset-11-gcc-c++ gcc-toolset-11-gcc-gfortran} -%if 0%{?rhel} == 8 -BuildRequires: gcc-toolset-11-gcc gcc-toolset-11-gcc-c++ gcc-toolset-11-gcc-gfortran -%define devtoolsconfigureflags CC=/opt/rh/gcc-toolset-11/root/usr/bin/gcc CXX=/opt/rh/gcc-toolset-11/root/usr/bin/g++ FC=/opt/rh/gcc-toolset-11/root/usr/bin/gfortran AS=/opt/rh/gcc-toolset-11/root/usr/bin/as -%endif - -# EL7 has -static-libstdc++ inside devtools (but the system g++ does not know the flag) -- adrpo: check this, also for el6 -%{?el7:Requires: devtoolset-11-gcc} -%{?el7:Requires: devtoolset-11-gcc-c++} -%{?el7:Requires: devtoolset-11-gcc-gfortran} - -%if 0%{?rhel} <= 7 && 0%{?rhel} >= 1 -BuildRequires: devtoolset-11-gcc devtoolset-11-gcc-c++ devtoolset-11-gcc-gfortran -%define devtoolsconfigureflags CC=/opt/rh/devtoolset-11/root/usr/bin/gcc CXX=/opt/rh/devtoolset-11/root/usr/bin/g++ FC=/opt/rh/devtoolset-11/root/usr/bin/gfortran -%endif - -%if 0%{?fedora} >= 25 -BuildRequires: OpenSceneGraph-devel -%endif - -%if 0%{?omqt5} -%define withqt6 '' -%define omqtversion qt5 -%else -%define withqt6 --with-qt6 -%define omqtversion qt6 -%endif - - -# We should use clang, but OMEdit does not compile with it due to odd default qmake flags -Requires: gcc -Requires: gcc-c++ -Requires: lapack-devel - -Requires(post): %{_sbindir}/update-alternatives -Requires(postun): %{_sbindir}/update-alternatives - -# CentOS does not have suggests -%if 0%{?fedora} >= 24 || 0%{?rhel} >= 8 -Suggests: boost-devel -Suggests: boost-static -Suggests: lapack-static -Suggests: openblas-static -%else -Requires: boost-devel -Requires: boost-static -%endif - -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root - -%description -%{summary} - -%prep - -%setup -q -n openmodelica_DEBVERSION -tar xJf %{_sourcedir}/openmodelica-doc-DOCUMENTATIONVERSION.tar.xz - -PATCHCMDS - -%if 0%{?rhel} <= 7 && 0%{?rhel} >= 1 -source /opt/rh/devtoolset-11/enable -%endif - -%if 0%{?rhel} == 8 -source /opt/rh/gcc-toolset-11/enable -%endif - -export LANG=C.UTF-8 -autoreconf --install -./configure CFLAGS="-Os" CXXFLAGS="-Os" QTDIR=/usr/%{_lib}/%{omqtversion} --without-omniORB %{withqt6} CONFIGUREFLAGS %{?devtoolsconfigureflags} --without-omc --prefix=/opt/%{name} --without-omlibrary %{cmakecommand} - -%build - -%if 0%{?rhel} <= 7 && 0%{?rhel} >= 1 -export LANG=C.UTF-8 -source /opt/rh/devtoolset-11/enable -%endif - -%if 0%{?rhel} == 8 -export LANG=C.UTF-8 -source /opt/rh/gcc-toolset-11/enable -%endif - -export LANG=C.UTF-8 -make -j8 -test ! -f libraries/install-index.json || make -j8 omlibrary - -%install -rm -rf %{buildroot} -make install DESTDIR="%{buildroot}" -mkdir -p %{buildroot}/opt/%{name}/lib/ %{buildroot}/opt/%{name}/share/doc/omc/ %{buildroot}%{_bindir} -ln -s /usr/lib/omlibrary %{buildroot}/opt/%{name}/lib/ -ln -s /opt/%{name}/bin/omc %{buildroot}%{_bindir}/omc-BRANCH -ln -s /opt/%{name}/bin/OMEdit %{buildroot}%{_bindir}/OMEdit-BRANCH -ln -s /opt/%{name}/bin/OMShell %{buildroot}%{_bindir}/OMShell-BRANCH -ln -s /opt/%{name}/bin/OMShell-terminal %{buildroot}%{_bindir}/OMShell-terminal-BRANCH -ln -s /opt/%{name}/bin/OMNotebook %{buildroot}%{_bindir}/OMNotebook-BRANCH -ln -s /opt/%{name}/bin/OMPlot %{buildroot}%{_bindir}/OMPlot-BRANCH -touch %{buildroot}%{_bindir}/omc -touch %{buildroot}%{_bindir}/OMEdit -touch %{buildroot}%{_bindir}/OMShell -touch %{buildroot}%{_bindir}/OMShell-terminal -touch %{buildroot}%{_bindir}/OMNotebook -touch %{buildroot}%{_bindir}/OMPlot -cp -a openmodelica-doc*/* %{buildroot}/opt/%{name}/share/doc/omc/ - -%postun -if [ "$1" -ge "1" ]; then - if [ "`readlink %{_sysconfdir}/alternatives/openmodelica`" == "%{_bindir}/omc-BRANCH" ]; then - %{_sbindir}/alternatives --set openmodelica %{_bindir}/omc-BRANCH - fi -fi - -%post -%{_sbindir}/update-alternatives --install %{_bindir}/omc openmodelica %{_bindir}/omc-BRANCH PRIORITY \ - --slave %{_bindir}/OMEdit openmodelica-OMEdit %{_bindir}/OMEdit-BRANCH \ - --slave %{_bindir}/OMShell openmodelica-OMShell %{_bindir}/OMShell-BRANCH \ - --slave %{_bindir}/OMShell-terminal openmodelica-OMShell-terminal %{_bindir}/OMShell-terminal-BRANCH \ - --slave %{_bindir}/OMNotebook openmodelica-OMNotebook %{_bindir}/OMNotebook-BRANCH \ - --slave %{_bindir}/OMPlot openmodelica-OMPlot %{_bindir}/OMPlot-BRANCH - -%preun -if [ $1 = 0 ]; then - %{_sbindir}/update-alternatives --remove openmodelica %{_bindir}/omc-BRANCH -fi - -%clean -rm -rf %{buildroot} - -%files -%defattr(-,root,root,-) -/opt/%{name}/* -%{_bindir}/*-BRANCH -%ghost %{_bindir}/omc -%ghost %{_bindir}/OMEdit -%ghost %{_bindir}/OMShell -%ghost %{_bindir}/OMShell-terminal -%ghost %{_bindir}/OMNotebook -%ghost %{_bindir}/OMPlot - -%changelog -* DATE OpenModelica ${version}-1 -- First Build