Skip to content

Console Output

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