all the kludges for Cantera 2.6.0b2

This commit is contained in:
Mark E. Fuller 2022-04-14 19:59:26 +03:00
parent 643f90eaa6
commit 369c746c10
No known key found for this signature in database
GPG Key ID: D1CB9BCF4D87185F
1 changed files with 19 additions and 3 deletions

View File

@ -104,16 +104,33 @@ Summary: Static libraries for Cantera
%install
%scons install prefix=%{_prefix} python_prefix=%{_prefix} libdirname=%{_lib} stage_dir=%{buildroot}
#kludges for https://github.com/Cantera/cantera/issues/1233
###kludges for https://github.com/Cantera/cantera/issues/1233
# incorrect installation to /usr/local/bin on F36+
%if 0%{?fedora} >= 36
mv %{buildroot}%{_prefix}/local/bin/* %{buildroot}%{_bindir}/
rm -rf %{buildroot}%{_prefix}/local/bin
%endif
# incorrect installation to /usr/lib/ on 64 bit systems on F36-
%if 0%{?fedora} <= 36
if [[ -d %{buildroot}%{_prefix}/lib/python%{python3_version}/site-packages ]] && [ %{_lib} == "lib64" ]; then
mkdir -p %{buildroot}%{python3_sitearch}/
mv %{buildroot}%{_prefix}/lib/python%{python3_version}/site-packages/* %{buildroot}%{python3_sitearch}/
fi
if [[ -d %{buildroot}%{_prefix}/local/lib/python%{python3_version}/site-packages ]] && [ %{_lib} == "lib64" ]; then
mkdir -p %{buildroot}%{python3_sitearch}/
mv %{buildroot}%{_prefix}/local/lib/python%{python3_version}/site-packages/* %{buildroot}%{python3_sitearch}/
fi
%endif
# incorrect installation to /usr/local/lib* on F36+
%if 0%{?fedora} >= 36
mkdir -p %{buildroot}%{python3_sitearch}/
mv %{buildroot}%{_prefix}/local/%{_lib}/python%{python3_version}/site-packages/* %{buildroot}%{python3_sitearch}/
rm -rf %{buildroot}%{_prefix}/local/
#end_kludge
%endif
###end_kludge
%check
%scons test
@ -146,7 +163,6 @@ rm -rf %{buildroot}%{_prefix}/local/
%{python3_sitearch}/Cantera-%{version}%{vmod}.dist-info/
%{python3_sitearch}/%{name}/
%files devel
%{_includedir}/%{name}