-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from treydock/osc
Force a dependency on versioned libslurm.so
- Loading branch information
Showing
1 changed file
with
16 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|
@@ -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 | ||
|
@@ -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 | ||
|