-
Notifications
You must be signed in to change notification settings - Fork 1
/
warewulf.spec.in
81 lines (60 loc) · 2.1 KB
/
warewulf.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
%{!?_rel:%{expand:%%global _rel 0.r%(test "@SVNVERSION@" != "0000" && echo "@SVNVERSION@" || svnversion | sed 's/[^0-9].*$//' | grep '^[0-9][0-9]*$' || git svn find-rev `git show -s --pretty=format:%h` || echo 0000)}}
Name: warewulf
Summary: A suite of tools for clustering
Version: @PACKAGE_VERSION@
Release: %{_rel}%{?dist}
License: US Dept. of Energy (BSD-like)
Group: System Environment/Clustering
Source: %{name}-%{version}.tar.gz
ExclusiveOS: linux
Conflicts: warewulf <= 2.9
BuildArch: noarch
BuildRoot: %{?_tmppath}/%{name}-%{version}-%{release}-root
Requires: perl-DBD-MySQL
%if %{?rhel}%{!?rhel:0} >= 7
Requires(pre): mariadb-server
%else
PreReq: mysql-server
%endif
%description
Warewulf >= 3 is a set of utilities designed to better enable
utilization and maintenance of clusters or groups of computers.
This is the main package which includes the common libraries and
command line interface.
%prep
%setup -q
%build
%configure
%{__make} %{?mflags}
%install
%{__make} install DESTDIR=$RPM_BUILD_ROOT %{?mflags_install}
%pre
groupadd -r warewulf >/dev/null 2>&1 || :
%post
if [ $1 -eq 2 ] ; then
%{_bindir}/wwsh object canonicalize >/dev/null 2>&1 || :
fi
%if %{?rhel}%{!?rhel:0} >= 7
systemctl start mariadb >/dev/null 2>&1 || :
%else
service mysqld start >/dev/null 2>&1 || :
chkconfig mysqld on >/dev/null 2>&1 || :
%endif
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-, root, root)
%doc AUTHORS COPYING ChangeLog INSTALL NEWS README TODO LICENSE
%attr(0755, root, warewulf) %dir %{_sysconfdir}/warewulf/
%attr(0755, root, warewulf) %dir %{_sysconfdir}/warewulf/defaults/
%attr(0444, root, warewulf) %{_sysconfdir}/warewulf/functions
%attr(0644, root, root) %{_sysconfdir}/bash_completion.d/warewulf_completion
%attr(0644, root, warewulf) %config(noreplace) %{_sysconfdir}/warewulf/database.conf
%attr(0640, root, warewulf) %config(noreplace) %{_sysconfdir}/warewulf/database-root.conf
%attr(0644, root, warewulf) %config(noreplace) %{_sysconfdir}/warewulf/defaults/node.conf
%{_sysconfdir}/bash_completion.d/*
%{_bindir}/*
%{_datadir}/warewulf/
%{_libexecdir}/warewulf/wwinit
%{perl_vendorlib}/*
%changelog