Skip to content

Commit

Permalink
Merge pull request #4 from treydock/osc
Browse files Browse the repository at this point in the history
Force a dependency on versioned libslurm.so
  • Loading branch information
kcgthb authored Mar 2, 2021
2 parents aa20439 + 3f05534 commit b101b11
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion slurm-spank-lua.spec
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
%global slurm_version %(rpm -q slurm-devel --qf "%{VERSION}" 2>/dev/null)
%define _use_internal_dependency_generator 0
%define __find_requires %{_builddir}/find-requires

Summary: Slurm Lua SPANK plugin
Name: slurm-spank-lua
Version: 0.41
Version: 0.42
Release: %{slurm_version}.1%{?dist}
License: GPL
Group: System Environment/Base
Expand All @@ -23,11 +25,22 @@ spank(8) manpage).

%prep
%setup -q
# Dummy file used to get a RPM dependency on libslurm.so
echo 'int main(){}' > %{_builddir}/libslurm_dummy.c
cat <<EOF > %{_builddir}/find-requires
#!/bin/sh
# Add dummy to list of files sent to the regular find-requires
{ echo %{_builddir}/libslurm_dummy; cat; } | \
%{_rpmconfigdir}/find-requires
EOF
chmod +x %{_builddir}/find-requires

%build
%{__cc} -g -o lua.o -fPIC -c lua.c
%{__cc} -g -o lib/list.o -fPIC -c lib/list.c
%{__cc} -g -shared -fPIC -o lua.so lua.o lib/list.o -llua
# Dummy file to get a dependency on libslurm
%{__cc} -lslurm -o %{_builddir}/libslurm_dummy %{_builddir}/libslurm_dummy.c


%install
Expand Down Expand Up @@ -58,6 +71,8 @@ rm -rf "$RPM_BUILD_ROOT"


%changelog
* Tue Mar 02 2021 Trey Dockendorf <[email protected]> - 0.42-1
- Force a dependency on versioned libslurm.so
* Tue Aug 11 2020 Trey Dockendorf <[email protected]> - 0.41-1
- Keep dist in RPM release
* Tue Aug 11 2020 Trey Dockendorf <[email protected]> - 0.40-1
Expand Down

0 comments on commit b101b11

Please sign in to comment.