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

#
# spec file for package ha-cluster-bootstrap
#
# Copyright (c) 2014 SUSE LINUX Products 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.1410854324.8459115
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-obsolete-sleha-command.patch bnc#862798 tserong@suse.com -- I hope this is obvious ;)
Patch1:         warn-if-using-obsolete-sleha-command.patch

Requires:       csync2
Requires:       hawk
Requires:       iproute2
Requires:       pacemaker
Requires:       pssh
Requires:       util-linux
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}
%patch1 -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}
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
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

%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
openSUSE Build Service is sponsored by