diff options
author | CoprDistGit <infra@openeuler.org> | 2024-12-16 03:22:36 +0000 |
---|---|---|
committer | CoprDistGit <infra@openeuler.org> | 2024-12-16 03:22:36 +0000 |
commit | 27db1e7daaec9d8ebf59eb43cbaf2b46464d571b (patch) | |
tree | c20317e6bb8484fec53205d1b445aacc2397ca6a | |
parent | 41b773fd6cbf4d57b7c976c93961a1e0b93605c5 (diff) |
automatic import of lammps
-rw-r--r-- | lammps.spec | 53 |
1 files changed, 11 insertions, 42 deletions
diff --git a/lammps.spec b/lammps.spec index 7265bd1..28dbf07 100644 --- a/lammps.spec +++ b/lammps.spec @@ -207,10 +207,17 @@ for mpi in '' mpich %{?with_openmpi:openmpi} ; do %ifnarch x86_64 %x86 -DPKG_INTEL=OFF \ %endif - -DCMAKE_INSTALL_BINDIR=${MPI_BIN:-%{_bindir}} -DCMAKE_INSTALL_LIBDIR=${MPI_LIB:-%{_libdir}} -DLAMMPS_MACHINE="${MPI_SUFFIX#_}" -DLAMMPS_LIB_SUFFIX="${MPI_SUFFIX#_}" -DCMAKE_INSTALL_MANDIR=${MPI_MAN:-%{_mandir}} \ - ${mpi:+-DBUILD_MPI=ON -DFFT_USE_HEFFTE=ON -DCMAKE_EXE_LINKER_FLAGS="%{__global_ldflags} -Wl,-rpath -Wl,${MPI_LIB} -Wl,--enable-new-dtags" -DCMAKE_SHARED_LINKER_FLAGS="%{__global_ldflags} -Wl,-rpath -Wl,${MPI_LIB} -Wl,--enable-new-dtags" $(test "$mpi" != openmpi || echo "-DMPIEXEC_PREFLAGS=--oversubscribe") } \ - $(test -z "${mpi}" && echo -DBUILD_MPI=OFF -DBUILD_LAMMPS_SHELL=ON -DBUILD_TOOLS=ON) - %make_build + -DCMAKE_INSTALL_BINDIR=%{_bindir} \ + -DCMAKE_INSTALL_LIBDIR=%{_libdir} \ + -DCMAKE_INSTALL_MANDIR=%{_mandir} \ + -DLAMMPS_MACHINE="${MPI_SUFFIX#_}" -DLAMMPS_LIB_SUFFIX="${MPI_SUFFIX#_}" \ + ${mpi:+-DBUILD_MPI=ON -DFFT_USE_HEFFTE=ON \ + -DCMAKE_EXE_LINKER_FLAGS="%{__global_ldflags} -Wl,-rpath,${MPI_LIB} -Wl,--enable-new-dtags" \ + -DCMAKE_SHARED_LINKER_FLAGS="%{__global_ldflags} -Wl,-rpath,${MPI_LIB} -Wl,--enable-new-dtags" \ + -DCMAKE_EXE_LINKER_FLAGS="%{__global_ldflags} -Wl,-rpath,${MPI_LIB} -Wl,--enable-new-dtags" \ + -DCMAKE_SHARED_LINKER_FLAGS="%{__global_ldflags} -Wl,-rpath,${MPI_LIB} -Wl,--enable-new-dtags" \ + $(test "$mpi" != openmpi || echo "-DMPIEXEC_PREFLAGS=--oversubscribe")} + cmake --build . -j64 test -n "${mpi}" && module unload mpi/${mpi}-%{_arch} done @@ -226,47 +233,9 @@ for mpi in '' mpich %{?with_openmpi:openmpi} ; do %make_install -C build done -mkdir -p %{buildroot}%{_bindir} -install -Dm 0755 %{buildroot}/build/lmp %{buildroot}%{_bindir}/lmp -install -Dm 0755 %{buildroot}/build/msi2lmp %{buildroot}%{_bindir}/msi2lmp -install -Dm 0755 %{buildroot}/build/binary2txt %{buildroot}%{_bindir}/binary2txt -install -Dm 0755 %{buildroot}/build/chain.x %{buildroot}%{_bindir}/chain.x -install -Dm 0755 %{buildroot}/build/micelle2d.x %{buildroot}%{_bindir}/micelle2d.x -install -Dm 0755 %{buildroot}/build/stl_bin2txt %{buildroot}%{_bindir}/stl_bin2txt -install -Dm 0755 %{buildroot}/build/phana %{buildroot}%{_bindir}/phana - -mkdir -p %{buildroot}%{_libdir} -for file in %{buildroot}/build/liblammps.so.*; do - install -Dm 0755 "$file" %{buildroot}%{_libdir}/$(basename "$file") -done - -mkdir -p %{buildroot}%{_libdir}/pkgconfig -install -Dm 0644 liblammps.pc %{buildroot}%{_libdir}/pkgconfig/liblammps.pc -install -Dm 0644 %{buildroot}/build/man/lmp.1 %{buildroot}%{_mandir}/man1/lmp.1 - -mkdir -p %{buildroot}%{_libdir}/cmake/LAMMPS -cp -a %{_libdir}/openmpi*/lib/cmake/LAMMPS %{buildroot}%{_libdir}/cmake/LAMMPS - -mkdir -p %{buildroot}%{_libdir}/mpich/lib/pkgconfig/ -install -Dm 0755 liblammps_mpich.so %{buildroot}%{_libdir}/liblammps_mpich.so -install -Dm 0644 liblammps_mpich.pc %{buildroot}%{_libdir}/mpich*/lib/pkgconfig/liblammps_mpich.pc - -mkdir -p %{_libdir}/mpich/lib/cmake/LAMMPS -cp -a %{_libdir}/openmpi*/lib/cmake/LAMMPS %{_libdir}/mpich*/lib/cmake/LAMMPS - -mkdir -p %{buildroot}%{_libdir}/mpich/bin -install -Dm 0755 %{buildroot}/build/lmp_mpich %{buildroot}%{_libdir}/mpich*/bin/lmp_mpich - -for file in %{buildroot}/build/liblammps_mpich.so.*; do - install -Dm 0755 "$file" %{_libdir}/mpich/lib/$(basename "$file") -done - -rm -rf %{buildroot}/build/phana_build - cd python %py3_install - %files %doc README %license LICENSE |