Console Output
12:48:19 # See also Jenkinsfile in apt-build repository for stuff that is installed BEFORE everything here
12:48:19 # Don't try fancy stuff like debuginfo, which is useless on binary-only
12:48:19 # packages. Don't strip binary too
12:48:19 # Be sure buildpolicy set to do nothing
12:48:19 %define __spec_install_post %{nil}
12:48:19 %define debug_package %{nil}
12:48:19 %define __os_install_post %{_dbpath}/brp-compress
12:48:19
12:48:19 Summary: OpenModelica
12:48:19 Name: openmodelica-nightly
12:48:19 Version: 1.28.0~dev~1137~gee2c5cd
12:48:19 Release: 1%{?dist}
12:48:19 License: OSMC-PL
12:48:19 Group: Development/Tools
12:48:19 # spectool -g -R SPECS/xxx.spec
12:48:19 # sudo yum-builddep SPECS/xxx.spec
12:48:19 SOURCE0 : https://build.openmodelica.org/apt/pool/contrib/openmodelica_1.28.0~dev-1137-gee2c5cd.orig.tar.xz
12:48:19 SOURCE1 : https://openmodelica.org/doc/openmodelica-doc-latest.tar.xz
12:48:19
12:48:19 URL: https://openmodelica.org/
12:48:19
12:48:19 Autoprov: 0
12:48:19 Prefix: /opt/%{name}
12:48:19 Prefix: %{_bindir}
12:48:19
12:48:19 %global __requires_exclude ^(lib.*Modelica.*|lib[oO][mM][^n].*[.]so.*|libklu[.]so.*|libsuitesparseconfig[.]so.*|libqjson[.]so.*|libfmi.*[.]so.*|libumfpack[.]so.*|libamd[.]so.*|libzlib[.]so.*|libbtf[.]so.*|libcminpack[.]so.*|libcoinmumps[.]so.*|libipopt[.]so.*|liblis[.]so.*|/usr/bin/python|libzmq[.]so.*|libtf[.]so.*|libcolamd[.]so.*|libmoo[.]so.*|libsundials.*)$
12:48:19
12:48:19 # Recommended (for the repo): git rpm-build rpmdevtools epel-release
12:48:19 %if 0%{?rhel} > 0
12:48:19 # CentOS / RHEL requires the EPEL repository
12:48:19 BuildRequires: epel-release
12:48:19 Requires: epel-release
12:48:19 %endif
12:48:19
12:48:19 Requires: lapack-devel
12:48:19 Requires: make
12:48:19 Requires: gcc
12:48:19 Requires: gcc-gfortran
12:48:19 Requires: gcc-c++
12:48:19
12:48:19 BuildRequires: expat-devel
12:48:19 BuildRequires: autoconf
12:48:19 BuildRequires: bison
12:48:19 BuildRequires: flex
12:48:19 BuildRequires: lapack-devel
12:48:19 BuildRequires: uuid
12:48:19 BuildRequires: uuid-devel
12:48:19 BuildRequires: libuuid-devel
12:48:19 BuildRequires: hdf5-devel
12:48:19 BuildRequires: boost-devel
12:48:19 BuildRequires: boost-static
12:48:19 BuildRequires: hwloc-devel
12:48:19 BuildRequires: readline-devel
12:48:19 BuildRequires: libffi-devel
12:48:19 BuildRequires: curl-devel
12:48:19 BuildRequires: gettext
12:48:19 BuildRequires: make
12:48:19 BuildRequires: java
12:48:19 BuildRequires: tar
12:48:19 BuildRequires: xz
12:48:19 BuildRequires: gcc
12:48:19 BuildRequires: gcc-c++
12:48:19 BuildRequires: gcc-gfortran
12:48:19 # EL 8/9's minizip-devel is minizip-ng, a different API; EPEL has zlib's
12:48:19 # classic minizip. EL 10 and Fedora only have minizip-ng's compat layer.
12:48:19 %if 0%{?rhel} == 8 || 0%{?rhel} == 9
12:48:19 BuildRequires: minizip1.2-devel
12:48:19 %else
12:48:19 BuildRequires: minizip-ng-compat-devel
12:48:19 %endif
12:48:19 # EL8 is the only target left without qt6, in EPEL or anywhere else, and the
12:48:19 # GUI clients no longer build against qt5: ship el8 without them.
12:48:19 %if 0%{?rhel} == 8
12:48:19 %define omnogui 1
12:48:19 %endif
12:48:19
12:48:19 %if ! 0%{?omnogui}
12:48:19 BuildRequires: qt6-qtwebengine-devel
12:48:19 BuildRequires: qt6-linguist
12:48:19 BuildRequires: qt6-qttools-devel
12:48:19 BuildRequires: qt6-qtbase-devel
12:48:19 BuildRequires: qt6-qtsvg-devel
12:48:19 BuildRequires: qt6-qt3d-devel
12:48:19 BuildRequires: qt6-qt5compat-devel
12:48:19 BuildRequires: qt6-qthttpserver-devel
12:48:19 BuildRequires: qt6-qtwebsockets-devel
12:48:19 BuildRequires: qt6-qtquick3d-devel
12:48:19 %endif
12:48:19
12:48:19 BuildRequires: cmake
12:48:19
12:48:19 # The base centos:8 image (we use for our build-deps:el8 image) comes with
12:48:19 # broken cmake package due to old libarchive (v3.3.2). v3.3.3 Seems to work.
12:48:19 # Once the base image is updated this can be removed.
12:48:19 %if 0%{?rhel} == 8
12:48:19 BuildRequires: libarchive >= 3.3.3
12:48:19 %endif
12:48:19
12:48:19 # EL8's system gcc is 8.5, too old to build with.
12:48:19 %{?el8:Requires: gcc-toolset-11-gcc gcc-toolset-11-gcc-c++ gcc-toolset-11-gcc-gfortran}
12:48:19 %if 0%{?rhel} == 8
12:48:19 BuildRequires: gcc-toolset-11-gcc gcc-toolset-11-gcc-c++ gcc-toolset-11-gcc-gfortran
12:48:19 %define devtoolscmakeflags -DCMAKE_C_COMPILER=/opt/rh/gcc-toolset-11/root/usr/bin/gcc -DCMAKE_CXX_COMPILER=/opt/rh/gcc-toolset-11/root/usr/bin/g++ -DCMAKE_Fortran_COMPILER=/opt/rh/gcc-toolset-11/root/usr/bin/gfortran
12:48:19 %endif
12:48:19
12:48:19 %if 0%{?omnogui}
12:48:19 %define omguicmakeflags -DOM_ENABLE_GUI_CLIENTS=OFF
12:48:19 %else
12:48:19 %define omguicmakeflags -DOM_ENABLE_GUI_CLIENTS=ON -DCMAKE_PREFIX_PATH=/usr/%{_lib}/qt6
12:48:19 %endif
12:48:19
12:48:19
12:48:19 Requires: gcc
12:48:19 Requires: gcc-c++
12:48:19 Requires: lapack-devel
12:48:19
12:48:19 Requires(post): %{_sbindir}/update-alternatives
12:48:19 Requires(postun): %{_sbindir}/update-alternatives
12:48:19
12:48:19 Suggests: boost-devel
12:48:19 Suggests: boost-static
12:48:19 Suggests: lapack-static
12:48:19 Suggests: openblas-static
12:48:19
12:48:19 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
12:48:19
12:48:19 %description
12:48:19 %{summary}
12:48:19
12:48:19 %prep
12:48:19
12:48:19 %setup -q -n openmodelica_1.28.0~dev-1137-gee2c5cd
12:48:19 tar xJf %{_sourcedir}/openmodelica-doc-latest.tar.xz
12:48:19
12:48:19
12:48:19
12:48:19 # The tarball has no git; CMake reads OMVERSION.txt.
12:48:19 echo 'v1.28.0~dev-1137-gee2c5cd' | tr '~' '-' > OMVERSION.txt
12:48:19
12:48:19 %build
12:48:19
12:48:19 %if 0%{?rhel} == 8
12:48:19 source /opt/rh/gcc-toolset-11/enable
12:48:19 %endif
12:48:19
12:48:19 export LANG=C.UTF-8
12:48:19 # : extra cmake -D arguments, from projects.json in apt-build.
12:48:19 cmake -S . -B build_rpm -Wno-dev \
12:48:19 -DCMAKE_INSTALL_PREFIX=/opt/%{name} \
12:48:19 -DCMAKE_BUILD_TYPE=Release \
12:48:19 -DCMAKE_C_FLAGS_RELEASE="-Os -DNDEBUG" \
12:48:19 -DCMAKE_CXX_FLAGS_RELEASE="-Os -DNDEBUG" \
12:48:19 -DOM_USE_CCACHE=OFF \
12:48:19 -DOM_ENABLE_TESTSUITE=OFF \
12:48:19 -DOM_ENABLE_DOCS=OFF \
12:48:19 %{omguicmakeflags} \
12:48:19 -DOM_ENABLE_OMSIMULATOR=ON \
12:48:19 -DOM_OMOPTIM_ENABLE=OFF \
12:48:19 -DOM_RUST_RESULT_READERS=ON \
12:48:19 -DOM_RUST_RESULT_WRITERS=ON \
12:48:19 -DOM_ENABLE_RUST_SIM_RUNTIME=ON \
12:48:19 %{?devtoolscmakeflags}
12:48:19 cmake --build build_rpm --parallel 8
12:48:19
12:48:19 %install
12:48:19 rm -rf %{buildroot}
12:48:19 DESTDIR="%{buildroot}" cmake --install build_rpm
12:48:19 # An install rule with an absolute DESTINATION in the build tree (MUMPS, via
12:48:19 # moo/Ipopt.cmake) has DESTDIR mirror it into the buildroot; nothing belongs
12:48:19 # under the rpm build directory there.
12:48:19 rm -rf "%{buildroot}%{_builddir}"
12:48:19 # The cmake omlibrary target would download with an omc that is not installed yet.
12:48:19 if test -f libraries/install-index.json; then
12:48:19 rm -rf omlibrary-download
12:48:19 mkdir -p omlibrary-download/.openmodelica/libraries
12:48:19 cp libraries/install-index.json omlibrary-download/.openmodelica/libraries/index.json
12:48:19 (cd omlibrary-download && %{buildroot}/opt/%{name}/bin/omc ../libraries/install-index.mos)
12:48:19 mkdir -p %{buildroot}/opt/%{name}/share/omlibrary/cache
12:48:19 cp libraries/install-index.json %{buildroot}/opt/%{name}/share/omlibrary/cache/index.json
12:48:19 cp omlibrary-download/.openmodelica/cache/* %{buildroot}/opt/%{name}/share/omlibrary/cache/
12:48:19 fi
12:48:19 mkdir -p %{buildroot}/opt/%{name}/lib/ %{buildroot}/opt/%{name}/share/doc/omc/ %{buildroot}%{_bindir}
12:48:19 ln -s /usr/lib/omlibrary %{buildroot}/opt/%{name}/lib/
12:48:19 ln -s /opt/%{name}/bin/omc %{buildroot}%{_bindir}/omc-nightly
12:48:19 touch %{buildroot}%{_bindir}/omc
12:48:19 %if ! 0%{?omnogui}
12:48:19 ln -s /opt/%{name}/bin/OMEdit %{buildroot}%{_bindir}/OMEdit-nightly
12:48:19 ln -s /opt/%{name}/bin/OMShell %{buildroot}%{_bindir}/OMShell-nightly
12:48:19 ln -s /opt/%{name}/bin/OMShell-terminal %{buildroot}%{_bindir}/OMShell-terminal-nightly
12:48:19 ln -s /opt/%{name}/bin/OMNotebook %{buildroot}%{_bindir}/OMNotebook-nightly
12:48:19 ln -s /opt/%{name}/bin/OMPlot %{buildroot}%{_bindir}/OMPlot-nightly
12:48:19 touch %{buildroot}%{_bindir}/OMEdit
12:48:19 touch %{buildroot}%{_bindir}/OMShell
12:48:19 touch %{buildroot}%{_bindir}/OMShell-terminal
12:48:19 touch %{buildroot}%{_bindir}/OMNotebook
12:48:19 touch %{buildroot}%{_bindir}/OMPlot
12:48:19 %endif
12:48:19 cp -a openmodelica-doc*/* %{buildroot}/opt/%{name}/share/doc/omc/
12:48:19
12:48:19 %postun
12:48:19 if [ "$1" -ge "1" ]; then
12:48:19 if [ "`readlink %{_sysconfdir}/alternatives/openmodelica`" == "%{_bindir}/omc-nightly" ]; then
12:48:19 %{_sbindir}/alternatives --set openmodelica %{_bindir}/omc-nightly
12:48:19 fi
12:48:19 fi
12:48:19
12:48:19 %post
12:48:19 slaves=""
12:48:19 %if ! 0%{?omnogui}
12:48:19 slaves="--slave %{_bindir}/OMEdit openmodelica-OMEdit %{_bindir}/OMEdit-nightly \
12:48:19 --slave %{_bindir}/OMShell openmodelica-OMShell %{_bindir}/OMShell-nightly \
12:48:19 --slave %{_bindir}/OMShell-terminal openmodelica-OMShell-terminal %{_bindir}/OMShell-terminal-nightly \
12:48:19 --slave %{_bindir}/OMNotebook openmodelica-OMNotebook %{_bindir}/OMNotebook-nightly \
12:48:19 --slave %{_bindir}/OMPlot openmodelica-OMPlot %{_bindir}/OMPlot-nightly"
12:48:19 %endif
12:48:19 %{_sbindir}/update-alternatives --install %{_bindir}/omc openmodelica %{_bindir}/omc-nightly 1018000 $slaves
12:48:19
12:48:19 %preun
12:48:19 if [ $1 = 0 ]; then
12:48:19 %{_sbindir}/update-alternatives --remove openmodelica %{_bindir}/omc-nightly
12:48:19 fi
12:48:19
12:48:19 %clean
12:48:19 rm -rf %{buildroot}
12:48:19
12:48:19 %files
12:48:19 %defattr(-,root,root,-)
12:48:19 /opt/%{name}/*
12:48:19 %{_bindir}/*-nightly
12:48:19 %ghost %{_bindir}/omc
12:48:19 %if ! 0%{?omnogui}
12:48:19 %ghost %{_bindir}/OMEdit
12:48:19 %ghost %{_bindir}/OMShell
12:48:19 %ghost %{_bindir}/OMShell-terminal
12:48:19 %ghost %{_bindir}/OMNotebook
12:48:19 %ghost %{_bindir}/OMPlot
12:48:19 %endif
12:48:19
12:48:19 %changelog
12:48:19 * Thu Oct 01 2026 OpenModelica <openmodelica@ida.liu.se> ${version}-1
12:48:19 - First Build