natefoo / slurm-drmaa

DRMAA for Slurm: Implementation of the DRMAA C bindings for Slurm
GNU General Public License v3.0
48 stars 22 forks source link

slurm-drmaa.spec missing configure options #65

Open richc-admin-gcai opened 2 years ago

richc-admin-gcai commented 2 years ago

Supplied slurm-drmaa.spec file in release bundle is missing functionality to support configure options outlined in:

https://github.com/natefoo/slurm-drmaa/blob/main/README.md

Namely: `` Notable ./configure script options:

--with-slurm-inc SLURM_INCLUDE_PATH

    Path to Slurm header files (i.e. directory containing slurm/slurm.h ). By default the library tries to guess the SLURM_INCLUDE_PATH and SLURM_LIBRARY_PATH based on location of the srun executable.

--with-slurm-lib SLURM_LIBRARY_PATH

    Path to Slurm libraries (i.e. directory containing libslurm.a ).

--prefix INSTALLATION_DIRECTORY

    Root directory where PSNC DRMAA for Slurm shall be installed. When not given library is installed in /usr/local.

--enable-debug

    Compiles library with debugging enabled (with debugging symbols not stripped, without optimizations, and with many log messages enabled). Useful when you are to debug DRMAA enabled application or investigate problems with DRMAA library itself.


Following patch enables this functionality for rpmbuild using rpmmacros.

--- slurm-drmaa-1.1.3/slurm-drmaa.spec  2022-01-04 16:48:41.991693930 +0000
+++ slurm-drmaa.spec    2022-01-04 16:37:09.449491395 +0000
@@ -31,7 +31,10 @@
 RPM_OPT_FLAGS=`echo "$RPM_OPT_FLAGS" | sed -e 's/-O2 /-O0 /'`
 CFLAGS="$RPM_OPT_FLAGS"
 export CFLAGS
-%configure
+%configure \
+    %{?_with_slurm_lib:--with-slurm-lib=%{_with_slurm_lib}} \
+    %{?_with_slurm_inc:--with-slurm-inc=%{_with_slurm_inc}} \
+    %{?_enable_debug:--enable-debug}

 %install
 rm -rf "$RPM_BUILD_ROOT"