-
Notifications
You must be signed in to change notification settings - Fork 4
/
losf.spec.in
99 lines (73 loc) · 2.23 KB
/
losf.spec.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
Summary: A Linux operating system framework for managing HPC clusters
Name: losf
Version: @PACKAGE_VERSION@
Release: 1
License: GPL-2
Group: System Environment/Base
BuildArch: noarch
URL: https://github.com/hpcsi/losf
Source0: %{name}-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
%if 0%{?FSP_BUILD}
%{!?prefix: %define prefix %{FSP_LOCAL}}
%else
%{!?prefix: %define prefix /opt}
%endif
%define installPath %{prefix}/%{name}
provides: perl(LosF_node_types)
provides: perl(LosF_rpm_topdir)
provides: perl(LosF_rpm_utils)
provides: perl(LosF_utils)
provides: perl(LosF_history_utils)
%if 0%{?sles_version} || 0%{?suse_version}
requires: perl-Config-IniFiles >= 2.43
requires: perl-Log-Log4perl
%else
requires: yum-plugin-downloadonly
%endif
%define __spec_install_post %{nil}
%define debug_package %{nil}
%define __os_install_post %{_dbpath}/brp-compress
%description
LosF is designed to provide a lightweight configuration management system
designed for use with high-performance computing (HPC) clusters. Target users
for this package are HPC system administrators and system architects who desire
flexible command-line utilities for synchronizing various host types across a
cluster.
%prep
%setup -q
%build
# Binary pass-through - empty build section
%install
rm -rf $RPM_BUILD_ROOT
mkdir -p %{buildroot}/%{installPath}
mkdir -p %{buildroot}/etc/profile.d
cp -a * %{buildroot}/%{installPath}
# Remove separate test dir to minimize dependencies
rm -rf %{buildroot}/%{installPath}/test
# Add soft links to CLI binaries in default path
mkdir -p ${RPM_BUILD_ROOT}/%{_bindir}
for i in losf update initconfig koomie_cf sync_config_files node_types rpm_topdir ; do
ln -sf %{installPath}/$i ${RPM_BUILD_ROOT}/%{_bindir}
done
for i in idisk ilog ioff ion ipxe ireboot ireset isensor isoft istat ; do
ln -sf %{installPath}/utils/$i ${RPM_BUILD_ROOT}/%{_bindir}
done
%clean
rm -rf $RPM_BUILD_ROOT
%post
%postun
# Following occurs when removing last version of the package. Remove config_dir.
if [ "$1" = 0 ];then
if [ -s %{installPath}/config/config_dir ];then
rm %{installPath}/config/config_dir
fi
fi
%files
%defattr(-,root,root,-)
%if 0%{?FSP_BUILD}
%dir %{FSP_HOME}
%dir %{prefix}
%endif
%{installPath}
%{_bindir}/*