File ha-cluster-bootstrap.spec of Package ha-cluster-bootstrap.2765

#
# spec file for package ha-cluster-bootstrap
#
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2010-2011 Novell Inc. All Rights Reserved.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#


Name:           ha-cluster-bootstrap
Version:        0.4+git.1441350120.8e9abbe
Release:        0
Summary:        Pacemaker HA Cluster Bootstrap Tool
License:        GPL-2.0
Group:          Productivity/Clustering/HA
Url:            https://github.com/tserong/sleha-bootstrap
Source:         sleha-bootstrap-%{version}.tar.bz2

# PATCH-FIX-SLE Warn if using the old sleha command form (bnc#862798) tserong@suse.com -- I hope this is obvious ;)
Patch5:         0004-Warn-if-using-the-old-sleha-command-form-bnc-862798.patch
# PATCH-FIX-SLE Don't configure no-quorum-policy=ignore, ever (bsc#981056)
Patch6:         0005-Don-t-configure-no-quorum-policy-ignore-ever-bsc-981.patch
# PATCH-FIX-UPSTREAM Set pcmk_delay_max=30s for SBD resource (bsc#988356) (bsc#990213)
Patch7:         0001-Set-pcmk_delay_max-30s-for-SBD-resource-bsc-988356-b.patch

Requires:       csync2
Requires:       ha-cluster-webui
Requires:       iproute2
Requires:       pacemaker
Requires:       pssh
Requires:       util-linux
Recommends:     hawk2
Recommends:     ocfs2-tools
# These three are required for ocfs2 setup, but not generic setup
Recommends:     parted
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch

%description
Tool to bootstrap a Pacemaker High Availability cluster in a hurry.

%prep
%setup -n sleha-bootstrap-%{version}
%patch5 -p1
%patch6 -p1
%patch7 -p1
%build

%install
install -d -m 0755 %{buildroot}/%{_sbindir}
install -m 755 scripts/ha-cluster-init %{buildroot}/%{_sbindir}
install -m 755 scripts/ha-cluster-join %{buildroot}/%{_sbindir}
install -m 755 scripts/ha-cluster-remove %{buildroot}/%{_sbindir}
install -d -m 0755 %{buildroot}%{_prefix}/lib
install -m 644 scripts/ha-cluster-functions %{buildroot}%{_prefix}/lib
install -d %{buildroot}/%{_mandir}/man8
install -p -m 644 man/ha-cluster-init.8 %{buildroot}/%{_mandir}/man8
install -p -m 644 man/ha-cluster-join.8 %{buildroot}/%{_mandir}/man8
install -p -m 644 man/ha-cluster-remove.8 %{buildroot}/%{_mandir}/man8
ln -s ha-cluster-init %{buildroot}%{_sbindir}/sleha-init
ln -s ha-cluster-join %{buildroot}%{_sbindir}/sleha-join
ln -s ha-cluster-remove %{buildroot}%{_sbindir}/sleha-remove

%files
%defattr(-,root,root)
%{_sbindir}/ha-cluster-init
%{_sbindir}/ha-cluster-join
%{_sbindir}/ha-cluster-remove
%{_sbindir}/sleha-init
%{_sbindir}/sleha-join
%{_sbindir}/sleha-remove
%{_prefix}/lib/ha-cluster-functions
%doc %{_mandir}/man8/*.8*

%changelog