%if 0%{?rhel} == 7 %define cmake_vers cmake3 %define ctest_vers ctest3 %else %define cmake_vers cmake %define ctest_vers ctest %endif %global releaseno 2 Name: ecflow Version: 4.14.0 Release: %{releaseno}%{dist} Summary: ECFlow is a work flow package that enables users to run a large number of programs (with dependencies on each other and on time) in a controlled environment. It provides reasonable tolerance for hardware and software failures, combined with good restart capabilities. URL: https://confluence.ecmwf.int/display/ECFLOW Source0: https://confluence.ecmwf.int/download/attachments/8650755/ecFlow-%{version}-Source.tar.gz Source1: https://confluence.ecmwf.int/download/attachments/8650755/boost_1_53_0.tar.gz License: Apache License, Version 2.0 BuildRequires: gcc-c++ BuildRequires: %{cmake_vers} BuildRequires: qt5-qtbase-devel BuildRequires: qt5-qtsvg-devel %if 0%{?rhel} == 7 BuildRequires: python36-devel %endif %if 0%{?fedora} >= 28 BuildRequires: python3-devel %endif %define debug_package %{nil} %description ECFlow is a work flow package that enables users to run a large number of programs (with dependencies on each other and on time) in a controlled environment. It provides reasonable tolerance for hardware and software failures, combined with good restart capabilities. This version of ecflow links statically with Boost libraries built from source package boost_1_53_0.tar.gz %package python Summary: Python interface for ecflow %description python ECFlow is a work flow package that enables users to run a large number of programs (with dependencies on each other and on time) in a controlled environment. It provides reasonable tolerance for hardware and software failures, combined with good restart capabilities. This package contains the python interface. %package ui Summary: Monitoring interface for ecflow %description ui ECFlow is a work flow package that enables users to run a large number of programs (with dependencies on each other and on time) in a controlled environment. It provides reasonable tolerance for hardware and software failures, combined with good restart capabilities. This package contains the graphical user interface. %package server Summary: Ecflow server %description server ECFlow is a work flow package that enables users to run a large number of programs (with dependencies on each other and on time) in a controlled environment. It provides reasonable tolerance for hardware and software failures, combined with good restart capabilities. This package contains the server files. %prep %setup -q -n ecFlow-%{version}-Source %setup -T -D -a 1 -n ecFlow-%{version}-Source %build export BOOST_ROOT=$PWD/boost_1_53_0 export WK=$PWD # build boost (no need to install, only static libraries) cd $BOOST_ROOT #$WK/build_scripts/boost_1_53_fix.sh pyexe=python3 ./bootstrap.sh --with-python=$pyexe # portability is an utopia pyvers=`$pyexe -c "import sys; print (\"%d.%d\" % (sys.version_info[0], sys.version_info[1]))"` pyexefp=`which $pyexe` pyinclude=`${pyexe}-config --includes | sed -e "s/^.*-I//g"` sed -i -e "s?^using python.*?using python : $pyvers : $pyexefp : $pyinclude ;?g" project-config.jam # reproduce boost_build.sh #$WK/build_scripts/boost_build.sh cp $WK/build_scripts/site_config/site-config-Linux64.jam $BOOST_ROOT/tools/build/v2/site-config.jam export CXXFLAGS_BOOST="cxxflags=-fPIC -Wno-unused-local-typedefs -Wno-deprecated-declarations -fpermissive" ./bjam --build-dir=./tmpBuildDir toolset=gcc "$CXXFLAGS_BOOST" stage link=static --layout=tagged --with-system variant=release -j2 ./bjam --build-dir=./tmpBuildDir toolset=gcc "$CXXFLAGS_BOOST" stage link=static --layout=tagged --with-date_time variant=release -j2 ./bjam --build-dir=./tmpBuildDir toolset=gcc "$CXXFLAGS_BOOST" stage link=static --layout=tagged --with-filesystem variant=release -j2 ./bjam --build-dir=./tmpBuildDir toolset=gcc "$CXXFLAGS_BOOST" stage link=static --layout=tagged --with-program_options variant=release -j2 ./bjam --build-dir=./tmpBuildDir toolset=gcc "$CXXFLAGS_BOOST" stage link=static --layout=tagged --with-serialization variant=release -j2 ./bjam --build-dir=./tmpBuildDir toolset=gcc "$CXXFLAGS_BOOST" stage link=static --layout=tagged --with-test variant=release -j2 ./bjam --build-dir=./tmpBuildDir toolset=gcc "$CXXFLAGS_BOOST" stage link=static --layout=tagged --with-thread variant=release -j2 ./bjam --build-dir=./tmpBuildDir toolset=gcc "$CXXFLAGS_BOOST" stage link=static --layout=tagged --with-regex variant=release -j2 ./bjam toolset=gcc link=shared variant=release "$CXXFLAGS_BOOST" stage --layout=tagged threading=multi --with-python -d2 -j2 ./bjam toolset=gcc link=static variant=release "$CXXFLAGS_BOOST" stage --layout=tagged threading=multi --with-python -d2 -j2 cd $WK # libboost_s/test_exec_monitor not installed in rpm #sed -i -e 's/test_exec_monitor //g' CMakeLists.txt # fails in tests, unresolved main, apparently that library # provides a main, not allowed in a .so # for cmake to use boost from rpm (in centOS) # -DBOOST_INCLUDEDIR=/usr/include/boost169 -DBOOST_LIBRARYDIR=/usr/lib64/boost169 \ # -DBOOST_ROOT=/usr -DENABLE_STATIC_BOOST_LIBS=OFF \ mkdir build pushd build %{cmake_vers} .. \ -DCMAKE_CXX_FLAGS="$CXXFLAGS -Wno-deprecated-declarations -std=c++11" \ -DCMAKE_PREFIX_PATH=%{_prefix} \ -DCMAKE_INSTALL_PREFIX=%{_prefix} \ -DINSTALL_LIB_DIR=%{_lib} \ -DPYTHON_EXECUTABLE=$pyexe \ -DENABLE_GUI=OFF \ -DENABLE_UI=ON \ -DENABLE_SECURE_USER=ON %{make_build} popd %install rm -rf $RPM_BUILD_ROOT pushd build %make_install # in case python2 has been built because of unnecessary dependencies installed [ -n "%{?python2_sitelib}" ] && rm -rf $RPM_BUILD_ROOT/%{python2_sitelib} rm -f $RPM_BUILD_ROOT%{_bindir}/ecflow_fuse.py # move to a more appropriate place mkdir -p $RPM_BUILD_ROOT%{_libexecdir}/%{name} mv $RPM_BUILD_ROOT%{_bindir}/ecflow_ui_create_jira_issue.sh \ $RPM_BUILD_ROOT%{_bindir}/ecflow_ui_node_state_diag.sh \ $RPM_BUILD_ROOT%{_bindir}/ecflow_ui_transfer_file.sh \ $RPM_BUILD_ROOT%{_libexecdir}/%{name} popd %files %defattr(-,root,root) %{_bindir}/ecflow_client %{_bindir}/ecflow_standalone %files python %defattr(-,root,root) #{_bindir}/ecflow_fuse.py %{python3_sitelib}/* # wrong, should go in _sitearch, a binary .so is installed! %files ui %defattr(-,root,root) %{_bindir}/ecflow_test_ui.sh %{_bindir}/ecflow_ui %{_bindir}/ecflow_ui.x %{_libexecdir}/%{name}/* %{_datadir}/%{name}/etc %files server %defattr(-,root,root) %{_bindir}/ecflow_logsvr.pl %{_bindir}/ecflow_logserver.sh %{_bindir}/ecflow_server %{_bindir}/ecflow_start.sh %{_bindir}/ecflow_stop.sh %{_bindir}/noconnect.sh %{_datadir}/%{name}/cmake %changelog * Thu Aug 23 2018 Davide Cesari - 4.10.0-1 - First rpm package