Skip to content

Console Output

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