Console Output
15:42:26 # See also Jenkinsfile in apt-build repository for stuff that is installed BEFORE everything here
15:42:26 # Don't try fancy stuff like debuginfo, which is useless on binary-only
15:42:26 # packages. Don't strip binary too
15:42:26 # Be sure buildpolicy set to do nothing
15:42:26 %define __spec_install_post %{nil}
15:42:26 %define debug_package %{nil}
15:42:26 %define __os_install_post %{_dbpath}/brp-compress
15:42:26
15:42:26 Summary: OpenModelica
15:42:26 Name: openmodelica-nightly
15:42:26 Version: 1.26.0~dev~377~g389af8c
15:42:26 Release: 1%{?dist}
15:42:26 License: OSMC-PL
15:42:26 Group: Development/Tools
15:42:26 # spectool -g -R SPECS/xxx.spec
15:42:26 # sudo yum-builddep SPECS/xxx.spec
15:42:26 SOURCE0 : https://build.openmodelica.org/apt/pool/contrib/openmodelica_1.26.0~dev-377-g389af8c.orig.tar.xz
15:42:26 SOURCE1 : https://openmodelica.org/doc/openmodelica-doc-latest.tar.xz
15:42:26
15:42:26 URL: https://openmodelica.org/
15:42:26
15:42:26 %if 0%{?rhel} == 6
15:42:26 Autoreq: 0
15:42:26 Requires: readline
15:42:26 Requires: qt5-qtbase
15:42:26 Requires: qt5-qtsvg
15:42:26 Requires: qt5-qtwebkit
15:42:26 Requires: qt5-qtxmlpatterns
15:42:26 Requires: libffi
15:42:26 %endif
15:42:26 Autoprov: 0
15:42:26 Prefix: /opt/%{name}
15:42:26 Prefix: %{_bindir}
15:42:26
15:42:26 %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.*|libsundials.*)$
15:42:26
15:42:26 # Recommended (for the repo): git rpm-build rpmdevtools epel-release
15:42:26 %if 0%{?rhel} > 0
15:42:26 # CentOS / RHEL requires the EPEL repository (for omniORB, etc)
15:42:26 BuildRequires: epel-release
15:42:26 Requires: epel-release
15:42:26 %endif
15:42:26
15:42:26 Requires: lapack-devel
15:42:26 Requires: make
15:42:26 Requires: gcc
15:42:26 Requires: gcc-gfortran
15:42:26 Requires: gcc-c++
15:42:26
15:42:26 BuildRequires: automake
15:42:26 %if 0%{?rhel} >= 8
15:42:26 %define withomniorb --without-omniORB
15:42:26 %else
15:42:26 %define withomniorb --with-omniORB
15:42:26 BuildRequires: omniORB-devel
15:42:26 BuildRequires: lpsolve-devel
15:42:26 %endif
15:42:26 BuildRequires: expat-devel
15:42:26 BuildRequires: bison
15:42:26 BuildRequires: flex
15:42:26 BuildRequires: lapack-devel
15:42:26 BuildRequires: libtool
15:42:26 BuildRequires: uuid
15:42:26 BuildRequires: uuid-devel
15:42:26 BuildRequires: hdf5-devel
15:42:26 BuildRequires: boost-devel
15:42:26 BuildRequires: boost-static
15:42:26 BuildRequires: hwloc-devel
15:42:26 BuildRequires: readline-devel
15:42:26 BuildRequires: libffi-devel
15:42:26 BuildRequires: curl-devel
15:42:26 BuildRequires: gettext
15:42:26 BuildRequires: make
15:42:26 BuildRequires: java
15:42:26 BuildRequires: tar
15:42:26 BuildRequires: xz
15:42:26 BuildRequires: gcc
15:42:26 BuildRequires: gcc-c++
15:42:26 BuildRequires: gcc-gfortran
15:42:26 %if 0%{?rhel} <= 9
15:42:26 BuildRequires: qt5-qtwebkit-devel
15:42:26 BuildRequires: qt5-linguist
15:42:26 BuildRequires: qt5-qttools
15:42:26 BuildRequires: qt5-qtbase-devel
15:42:26 BuildRequires: qt5-qtsvg-devel
15:42:26 BuildRequires: qt5-qtxmlpatterns-devel
15:42:26 %else // el 10 does not have qt5-qtwebkit anymore, use qt6
15:42:26 BuildRequires: qt6-qtwebengine-devel
15:42:26 BuildRequires: qt6-linguist
15:42:26 BuildRequires: qt6-qttools
15:42:26 BuildRequires: qt6-qtbase-devel
15:42:26 BuildRequires: qt6-qtsvg-devel
15:42:26 BuildRequires: qt6-qt3d-devel
15:42:26 %endif
15:42:26 %if 0%{?rhel} >= 7
15:42:26 BuildRequires: qt5-qt3d-devel
15:42:26 %endif
15:42:26
15:42:26
15:42:26 # Use cmake versions > 3. On EL7 this is provided by cmake3 package.
15:42:26 # On EL > 7 it is just cmake.
15:42:26 %if 0%{?rhel} == 7
15:42:26 BuildRequires: cmake3
15:42:26 %define cmakecommand CMAKE=cmake3
15:42:26 %else
15:42:26 BuildRequires: cmake
15:42:26 %define cmakecommand CMAKE=cmake
15:42:26 %endif
15:42:26
15:42:26 # The base centos:8 image (we use for our build-deps:el8 image) comes with
15:42:26 # broken cmake package due to old libarchive (v3.3.2). v3.3.3 Seems to work.
15:42:26 # Once the base image is updated this can be removed.
15:42:26 %if 0%{?rhel} == 8
15:42:26 BuildRequires: libarchive >= 3.3.3
15:42:26 %endif
15:42:26
15:42:26 # Use gcc-11 on EL8 as well. devtoolset does not seem to be available on
15:42:26 # EL8. One is supposed to use gcc-toolset instead.
15:42:26 %{?el8:Requires: gcc-toolset-11-gcc gcc-toolset-11-gcc-c++ gcc-toolset-11-gcc-gfortran}
15:42:26 %if 0%{?rhel} == 8
15:42:26 BuildRequires: gcc-toolset-11-gcc gcc-toolset-11-gcc-c++ gcc-toolset-11-gcc-gfortran
15:42:26 %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
15:42:26 %endif
15:42:26
15:42:26 # EL7 has -static-libstdc++ inside devtools (but the system g++ does not know the flag) -- adrpo: check this, also for el6
15:42:26 %{?el7:Requires: devtoolset-11-gcc}
15:42:26 %{?el7:Requires: devtoolset-11-gcc-c++}
15:42:26 %{?el7:Requires: devtoolset-11-gcc-gfortran}
15:42:26
15:42:26 %if 0%{?rhel} <= 7 && 0%{?rhel} >= 1
15:42:26 BuildRequires: devtoolset-11-gcc devtoolset-11-gcc-c++ devtoolset-11-gcc-gfortran
15:42:26 %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
15:42:26 %endif
15:42:26
15:42:26 %if 0%{?fedora} >= 25
15:42:26 BuildRequires: OpenSceneGraph-devel
15:42:26 %endif
15:42:26
15:42:26 %if 0%{?rhel} >= 10
15:42:26 %define withqt6 --with-qt6
15:42:26 %define omqtversion=QT6
15:42:26 %else
15:42:26 %define omqtversion=QT5
15:42:26 %endif
15:42:26
15:42:26
15:42:26 # We should use clang, but OMEdit does not compile with it due to odd default qmake flags
15:42:26 Requires: gcc
15:42:26 Requires: gcc-c++
15:42:26 Requires: lapack-devel
15:42:26
15:42:26 Requires(post): %{_sbindir}/update-alternatives
15:42:26 Requires(postun): %{_sbindir}/update-alternatives
15:42:26
15:42:26 # CentOS does not have suggests
15:42:26 %if 0%{?fedora} >= 24 || 0%{?rhel} >= 8
15:42:26 Suggests: boost-devel
15:42:26 Suggests: boost-static
15:42:26 Suggests: lapack-static
15:42:26 Suggests: openblas-static
15:42:26 %else
15:42:26 Requires: boost-devel
15:42:26 Requires: boost-static
15:42:26 %endif
15:42:26
15:42:26 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
15:42:26
15:42:26 %description
15:42:26 %{summary}
15:42:26
15:42:26 %prep
15:42:26
15:42:26 %setup -q -n openmodelica_1.26.0~dev-377-g389af8c
15:42:26 tar xJf %{_sourcedir}/openmodelica-doc-latest.tar.xz
15:42:26
15:42:26
15:42:26
15:42:26 %if 0%{?rhel} <= 7 && 0%{?rhel} >= 1
15:42:26 source /opt/rh/devtoolset-11/enable
15:42:26 %endif
15:42:26
15:42:26 %if 0%{?rhel} == 8
15:42:26 source /opt/rh/gcc-toolset-11/enable
15:42:26 %endif
15:42:26
15:42:26 autoreconf --install
15:42:26 ./configure CFLAGS="-Os" CXXFLAGS="-Os" QTDIR=/usr/%{_lib}/{omqtversion} %{withomniorb} %{withqt6} %{?devtoolsconfigureflags} --without-omc --prefix=/opt/%{name} --without-omlibrary %{cmakecommand}
15:42:26
15:42:26 %build
15:42:26
15:42:26 %if 0%{?rhel} <= 7 && 0%{?rhel} >= 1
15:42:26 source /opt/rh/devtoolset-11/enable
15:42:26 %endif
15:42:26
15:42:26 %if 0%{?rhel} == 8
15:42:26 source /opt/rh/gcc-toolset-11/enable
15:42:26 %endif
15:42:26
15:42:26 make -j8
15:42:26 test ! -f libraries/install-index.json || make -j8 omlibrary
15:42:26
15:42:26 %install
15:42:26 rm -rf %{buildroot}
15:42:26 make install DESTDIR="%{buildroot}"
15:42:26 mkdir -p %{buildroot}/opt/%{name}/lib/ %{buildroot}/opt/%{name}/share/doc/omc/ %{buildroot}%{_bindir}
15:42:26 ln -s /usr/lib/omlibrary %{buildroot}/opt/%{name}/lib/
15:42:26 ln -s /opt/%{name}/bin/omc %{buildroot}%{_bindir}/omc-nightly
15:42:26 ln -s /opt/%{name}/bin/OMEdit %{buildroot}%{_bindir}/OMEdit-nightly
15:42:26 ln -s /opt/%{name}/bin/OMShell %{buildroot}%{_bindir}/OMShell-nightly
15:42:26 ln -s /opt/%{name}/bin/OMShell-terminal %{buildroot}%{_bindir}/OMShell-terminal-nightly
15:42:26 ln -s /opt/%{name}/bin/OMNotebook %{buildroot}%{_bindir}/OMNotebook-nightly
15:42:26 ln -s /opt/%{name}/bin/OMPlot %{buildroot}%{_bindir}/OMPlot-nightly
15:42:26 touch %{buildroot}%{_bindir}/omc
15:42:26 touch %{buildroot}%{_bindir}/OMEdit
15:42:26 touch %{buildroot}%{_bindir}/OMShell
15:42:26 touch %{buildroot}%{_bindir}/OMShell-terminal
15:42:26 touch %{buildroot}%{_bindir}/OMNotebook
15:42:26 touch %{buildroot}%{_bindir}/OMPlot
15:42:26 cp -a openmodelica-doc*/* %{buildroot}/opt/%{name}/share/doc/omc/
15:42:26
15:42:26 %postun
15:42:26 if [ "$1" -ge "1" ]; then
15:42:26 if [ "`readlink %{_sysconfdir}/alternatives/openmodelica`" == "%{_bindir}/omc-nightly" ]; then
15:42:26 %{_sbindir}/alternatives --set openmodelica %{_bindir}/omc-nightly
15:42:26 fi
15:42:26 fi
15:42:26
15:42:26 %post
15:42:26 %{_sbindir}/update-alternatives --install %{_bindir}/omc openmodelica %{_bindir}/omc-nightly 1018000 \
15:42:26 --slave %{_bindir}/OMEdit openmodelica-OMEdit %{_bindir}/OMEdit-nightly \
15:42:26 --slave %{_bindir}/OMShell openmodelica-OMShell %{_bindir}/OMShell-nightly \
15:42:26 --slave %{_bindir}/OMShell-terminal openmodelica-OMShell-terminal %{_bindir}/OMShell-terminal-nightly \
15:42:26 --slave %{_bindir}/OMNotebook openmodelica-OMNotebook %{_bindir}/OMNotebook-nightly \
15:42:26 --slave %{_bindir}/OMPlot openmodelica-OMPlot %{_bindir}/OMPlot-nightly
15:42:26
15:42:26 %preun
15:42:26 if [ $1 = 0 ]; then
15:42:26 %{_sbindir}/update-alternatives --remove openmodelica %{_bindir}/omc-nightly
15:42:26 fi
15:42:26
15:42:26 %clean
15:42:26 rm -rf %{buildroot}
15:42:26
15:42:26 %files
15:42:26 %defattr(-,root,root,-)
15:42:26 /opt/%{name}/*
15:42:26 %{_bindir}/*-nightly
15:42:26 %ghost %{_bindir}/omc
15:42:26 %ghost %{_bindir}/OMEdit
15:42:26 %ghost %{_bindir}/OMShell
15:42:26 %ghost %{_bindir}/OMShell-terminal
15:42:26 %ghost %{_bindir}/OMNotebook
15:42:26 %ghost %{_bindir}/OMPlot
15:42:26
15:42:26 %changelog
15:42:26 * Wed Oct 08 2025 OpenModelica <openmodelica@ida.liu.se> ${version}-1
15:42:26 - First Build