-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathcoral.spec.in
146 lines (122 loc) · 4.06 KB
/
coral.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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
#
# CORAL specfile
#
# Supported distributions:
# * CentOS7/RHEL7
# * CentOS8/RHEL8
#
%global debug_package %{nil}
%bcond_with barrele
%bcond_with clownf
Name: @PACKAGE@
Version: @VERSION@
Prefix: %{_prefix}
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
Release: @CORAL_RELEASE@%{?dist}
Summary: coral - Tools for Coral
License: MIT
Group: Applications/System
Source0: @PACKAGE@-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Provides: coral = %{version}-%{release}
%description
Coral is a solution for high availability features, easy installation,
configuration, management, monitoring and diagnosis of Lustre file system.
%if %{with barrele}
%package barreleye
Summary: Performance Monitoring System for Lustre file systems
Provides: coral-barreleye = %{version}-%{release}
%description barreleye
coral-barreleye is a performance monitoring system for Lustre file systems
which collects and shows the statistics of the file system components
including the file system services, clients, storages, networks and machines.
%endif # with barrele
%if %{with clownf}
%package clownfish
Summary: Management Utilities for Lustre file systems
Provides: coral-clownfish = %{version}-%{release}
%description clownfish
coral-clownfish provides user-friendly solutions for high availability
features, installation, formatting, mounting and management of Lustre
file system.
%preun clownfish
%systemd_preun clownf_agent.service
%postun clownfish
%systemd_postun_with_restart clownf_agent.service
%endif # with clownf
%prep
%setup -q -n @PACKAGE@-%{version}
%build
./configure @ac_configure_args@ %{?configure_flags:configure_flags} \
--sysconfdir=%{_sysconfdir} \
--mandir=%{_mandir} \
--libdir=%{_libdir} \
--includedir=%{_includedir} \
--prefix=%{_prefix}
make -j8
make exes
%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT%{_bindir}
mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/coral
mkdir -p $RPM_BUILD_ROOT/usr/lib/systemd/system/
mkdir -p $RPM_BUILD_ROOT%{_datadir}/bash-completion/completions
%if %{with barrele}
cp dist/barrele $RPM_BUILD_ROOT%{_bindir}
cp example_configs/barreleye.conf.example \
$RPM_BUILD_ROOT%{_sysconfdir}/coral
install -g 0 -o 0 -m 0644 bash_completion/barrele \
$RPM_BUILD_ROOT%{_datadir}/bash-completion/completions
mkdir -p $RPM_BUILD_ROOT%{_sharedstatedir}/coral/barrele/xmls
cp barreleye/*.xml \
$RPM_BUILD_ROOT%{_sharedstatedir}/coral/barrele/xmls
cp barreleye/influxdb.conf.diff \
$RPM_BUILD_ROOT%{_sharedstatedir}/coral/barrele
cp -a barreleye/grafana_dashboards \
$RPM_BUILD_ROOT%{_sharedstatedir}/coral/barrele
%endif # with barrele
%if %{with clownf}
cp \
dist/clownf \
gocoral/clownf_agent/clownf_agent \
cclownf/clownf_storage \
$RPM_BUILD_ROOT%{_bindir}
cp example_configs/clownfish.conf.example \
$RPM_BUILD_ROOT%{_sysconfdir}/coral/
mkdir -p $RPM_BUILD_ROOT/usr/lib/systemd/system/
install -m 0644 -D systemd/consul.service \
$RPM_BUILD_ROOT%{_unitdir}
install -m 0644 -D systemd/clownf_agent.service \
$RPM_BUILD_ROOT%{_unitdir}
install -g 0 -o 0 -m 0644 man/clownf.1 $RPM_BUILD_ROOT%{_mandir}/man1/
install -g 0 -o 0 -m 0644 bash_completion/clownf \
$RPM_BUILD_ROOT%{_datadir}/bash-completion/completions
%endif # with clownf
%clean
rm -rf $RPM_BUILD_ROOT
%if %{with barrele}
%files barreleye
%{_bindir}/barrele
%{_sharedstatedir}/coral/barrele/xmls
%{_sharedstatedir}/coral/barrele/influxdb.conf.diff
%{_sharedstatedir}/coral/barrele/grafana_dashboards
%{_sysconfdir}/coral/barreleye.conf.example
%{_datadir}/bash-completion/completions/barrele
%endif # with barrele
%if %{with clownf}
%files clownfish
%{_bindir}/clownf
%{_bindir}/clownf_agent
%{_bindir}/clownf_storage
%{_sysconfdir}/coral/clownfish.conf.example
%{_unitdir}/consul.service
%{_unitdir}/clownf_agent.service
%{_mandir}/man1/clownf.1*
%{_datadir}/bash-completion/completions/clownf
%endif # with clownf
%changelog
* Fri Feb 19 2021 Coralfs 2.0
* Fri Mar 29 2019 Coralfs 1.0
- Original version