%global pkgvers 0 %global scdate0 20221108 %global schash0 7ac86b4560936ef9944546bade771a5416897002 %global branch0 master %global source0 https://github.com/Xyce/Xyce.git %global sshort0 %{expand:%%{lua:print(('%{schash0}'):sub(1,8))}} Name: xyce Version: 7.6.0 Release: %{scdate0}.%{pkgvers}.git%{sshort0}%{?dist} Summary: The Xyce Parallel Electronic Simulator License: GPLv3 URL: https://github.com/Xyce/Xyce BuildRequires: gcc-c++ cmake git flex bison doxygen graphviz pkgconf-pkg-config BuildRequires: python3-devel pybind11-devel trilinos-devel fftw-devel mot-adms BuildRequires: netcdf-devel boost-devel glm-devel hdf5-devel blas-devel BuildRequires: lapack-devel eigen3-devel suitesparse-devel SuperLU-devel BuildRequires: zlib-devel yaml-cpp-devel %if ! (0%{?rhel} == 9) BuildRequires: matio-devel SuperLUMT-devel %endif %ifarch ppc64le %if 0%{?rhel} == 9 %global _lto_cflags %{nil} %endif %endif %global __cmake_in_source_build 1 %description Xyce is an open source, SPICE-compatible, high-performance analog circuit simulator, capable of solving extremely large circuit problems by supporting large-scale parallel computing platforms. %package devel Summary: Development files for %{name} Requires: %{name} = %{version}-%{release} %description devel This package contains development files for %{name}. %package python3 Summary: Python extension for %{name} Requires: %{name} = %{version}-%{release} %description python3 This package contains python extension for %{name}. %prep %setup -T -c -n %{name} git clone --depth 1 -n -b %{branch0} %{source0} . git fetch --depth 1 origin %{schash0} git reset --hard %{schash0} git log --format=fuller %build sed -i 's|DESTINATION lib)|DESTINATION %{_lib})|' src/CMakeLists.txt mkdir build pushd build %global optflags %(echo '%{optflags} -I%{_includedir}/trilinos') %cmake .. -Wno-dev \ -DCMAKE_SKIP_RPATH=ON \ -DCMAKE_VERBOSE_MAKEFILE=OFF \ -DCMAKE_BUILD_TYPE=RelWithDebInfo \ -DCMAKE_PREFIX_PATH=%{_libdir}/cmake/Trilinos \ -DXyce_PYMI=ON \ -DXyce_SHYLU=ON \ -DXyce_PLUGIN_SUPPORT=ON \ -DXyce_AMESOS2_SHYLUBASKER=ON make %{?_smp_mflags} popd %install pushd build %cmake_install popd # fix paths mkdir -p %{buildroot}/%{_datadir}/%{name} mkdir -p %{buildroot}/%{_includedir}/%{name} mkdir -p %{buildroot}/%{_libdir}/cmake/%{name} mkdir -p %{buildroot}/%{python3_sitelib}/%{name} mv -f %{buildroot}/%{_includedir}/*.h \ %{buildroot}/%{_includedir}/%{name}/ mv -f %{buildroot}/%{_includedir}/pymi \ %{buildroot}/%{python3_sitelib}/ mv -f %{buildroot}/%{_datadir}/*.xml \ %{buildroot}/%{_datadir}/%{name}/ mv -f %{buildroot}/usr/lib/*.so \ %{buildroot}/%{_libdir}/ mv -f %{buildroot}/%{_datadir}/*.cmake \ %{buildroot}/%{_libdir}/cmake/%{name}/ || true mv -f %{buildroot}/usr/lib/cmake/Xyce/*.cmake \ %{buildroot}/%{_libdir}/cmake/%{name}/ || true # clean rm -rf %{buildroot}/%{_bindir}/admsXml rm -rf %{buildroot}/%{_bindir}/*.sh rm -rf %{buildroot}/usr/doc/README.TXT rm -rf %{buildroot}/%{_datadir}/examples %files %license COPYING %doc README.md %doc utils/ADMS/examples/toys %{_bindir}/Xyce %{_datadir}/* %{_libdir}/* %files devel %{_includedir}/* %{_libdir}/cmake/* %files python3 %{_bindir}/Xyce-PyMi %{python3_sitelib}/* %changelog * Fri May 06 2022 Cristian Balint - github update releases