diff --git a/dl_poly.spec b/dl_poly.spec index 0c3bc99..d195d37 100644 --- a/dl_poly.spec +++ b/dl_poly.spec @@ -3,22 +3,18 @@ # fixme: look at shipping example/benchmark data (~ 40MB total) +%global _lto_fflags %nil + # Allow -march=native if you want to rebuild %bcond_with native -%if 0%{?el6} -%ifarch ppc64 -%bcond_with mpich -%else -%bcond_without mpich -%endif -%else -%bcond_without mpich +%ifarch %java_arches +%global java 1 %endif Name: dl_poly Version: 1.10 -Release: 13%{?dist} +Release: 14%{?dist} Summary: General purpose classical molecular dynamics (MD) simulation License: BSD URL: https://gitlab.com/DL_POLY_Classic @@ -28,10 +24,8 @@ Source1: dl_poly-makefile Source2: dl_poly.desktop # Change executable Patch2: dl_poly-javaexec.patch -BuildRequires: gcc-gfortran java-devel openmpi-devel desktop-file-utils -%if %{with mpich} +BuildRequires: gcc-gfortran %{?java:java-devel} openmpi-devel desktop-file-utils BuildRequires: mpich-devel -%endif BuildRequires: make Requires: %{name}-common = %{version}-%{release} @@ -81,7 +75,6 @@ Requires: openmpi%{_isa}, %{name}-common = %{version}-%{release} This is a parallel version using openmpi. -%if %{with mpich} %package mpich Summary: General purpose classical molecular dynamics (MD) simulation - mpich version Requires: mpich%{_isa}, %{name}-common = %{version}-%{release} @@ -90,8 +83,8 @@ Requires: mpich%{_isa}, %{name}-common = %{version}-%{release} %{base_description} This is a parallel version using mpich. -%endif +%if 0%{?java} %package gui Summary: GUI for %name Requires: java, jpackage-utils @@ -99,6 +92,7 @@ BuildArch: noarch %description gui This package provides the Java-based graphical user interface for %name. +%endif %prep # The tarball directory is like @@ -135,12 +129,11 @@ cd source %{_openmpi_unload} rm basic_comms.o merge_tools.o pass_tools.o make clean -%if %{with mpich} %{_mpich_load} %{dobuild} %{_mpich_unload} -%endif +%if 0%{?java} cd ../java sh build cat <<+ >%{name}_gui @@ -148,6 +141,7 @@ cat <<+ >%{name}_gui exec java -jar %{_javadir}/DL_POLY_GUI.jar + cd .. +%endif cat <<+ >README.running Use the environment modules command module load -%{_arch} @@ -158,21 +152,22 @@ first. + %install -mkdir -p $RPM_BUILD_ROOT%{_javadir} $RPM_BUILD_ROOT%_datadir/%name +mkdir -p $RPM_BUILD_ROOT%_datadir/%name mkdir -p $RPM_BUILD_ROOT%{_bindir} mkdir -p $RPM_BUILD_ROOT/%{_libdir}/openmpi/bin install source/openmpi*/%{name}_* $RPM_BUILD_ROOT%{_libdir}/openmpi/bin -%if %{with mpich} mkdir -p $RPM_BUILD_ROOT/%{_libdir}/mpich/bin install source/mpich*/%{name}_* $RPM_BUILD_ROOT%{_libdir}/mpich/bin -%endif cp data/README README.data chmod 644 utility/dl2xyz cp -a utility $RPM_BUILD_ROOT%{_datadir}/%{name} +%if 0%{?java} +mkdir -p $RPM_BUILD_ROOT%{_javadir} install -m 644 java/GUI.jar $RPM_BUILD_ROOT%{_javadir}/DL_POLY_GUI.jar install -m 755 java/%{name}_gui $RPM_BUILD_ROOT%{_bindir} -chmod 644 LICENCE.pdf manual/JavaGUI.pdf desktop-file-install --dir=${RPM_BUILD_ROOT}%{_datadir}/applications %{SOURCE2} +%endif +chmod 644 LICENCE.pdf manual/JavaGUI.pdf %check @@ -186,25 +181,29 @@ desktop-file-install --dir=${RPM_BUILD_ROOT}%{_datadir}/applications %{SOURCE2} %files doc %license LICENCE.pdf -%doc manual/USRMAN.pdf manual/JavaGUI.pdf +%doc manual/USRMAN.pdf %{?java:manual/JavaGUI.pdf} +%if 0%{?java} %files gui %license LICENCE.pdf %{_javadir}/DL_POLY_GUI.jar %{_bindir}/%{name}_gui %doc README %{_datadir}/applications/* +%endif %files openmpi %{_libdir}/openmpi/bin/* -%if %{with mpich} %files mpich %{_libdir}/mpich/bin/* -%endif %changelog +* Tue Jul 5 2022 Dave Love - 1.10-14 +- Conditionalize java to avoid i686 +- Remove el6 conditionals + * Sat Feb 05 2022 Jiri Vanek - 1.10-13 - Rebuilt for java-17-openjdk as system jdk