forked from beekhof/sbd
-
Notifications
You must be signed in to change notification settings - Fork 0
/
sbd.spec
127 lines (106 loc) · 3.71 KB
/
sbd.spec
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
#
# spec file for package sbd
#
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2013 Lars Marowsky-Bree
#
# 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/
#
%global commit 872e82f39db02eab3527ecfa392b1a930dd1964b
%global shortcommit %(c=%{commit}; echo ${c:0:7})
%global github_owner beekhof
%global buildnum 5
Name: sbd
Summary: Storage-based death
License: GPLv2+
Group: System Environment/Daemons
Version: 1.2.1
Release: 0.%{buildnum}.%{shortcommit}.git%{?dist}
Url: https://github.com/%{github_owner}/%{name}
Source0: https://github.com/%{github_owner}/%{name}/archive/%{commit}/%{name}-%{commit}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: libuuid-devel
BuildRequires: glib2-devel
BuildRequires: libaio-devel
BuildRequires: corosync-devel
BuildRequires: pacemaker-libs-devel
BuildRequires: libtool
BuildRequires: libuuid-devel
BuildRequires: libxml2-devel
BuildRequires: pkgconfig
BuildRequires: python-devel
%if 0%{?rhel} > 0
ExclusiveArch: i686 x86_64 s390x
%endif
%if %{defined systemd_requires}
%systemd_requires
%endif
%description
This package contains the storage-based death functionality.
%prep
###########################################################
# %setup -n sbd-%{version} -q
%setup -q -n %{name}-%{commit}
###########################################################
%build
autoreconf -i
export CFLAGS="$RPM_OPT_FLAGS -Wall -Werror"
%configure
make %{?_smp_mflags}
###########################################################
%install
###########################################################
make DESTDIR=$RPM_BUILD_ROOT LIBDIR=%{_libdir} install
rm -rf ${RPM_BUILD_ROOT}%{_libdir}/stonith
install -D -m 0755 src/sbd.sh $RPM_BUILD_ROOT/usr/share/sbd/sbd.sh
%if %{defined _unitdir}
install -D -m 0644 src/sbd.service $RPM_BUILD_ROOT/%{_unitdir}/sbd.service
install -D -m 0644 src/sbd_remote.service $RPM_BUILD_ROOT/%{_unitdir}/sbd_remote.service
%endif
mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}/sysconfig
install -m 644 src/sbd.sysconfig ${RPM_BUILD_ROOT}%{_sysconfdir}/sysconfig/sbd
%clean
rm -rf %{buildroot}
%if %{defined _unitdir}
%post
%systemd_post sbd.service
%systemd_post sbd_remote.service
%preun
%systemd_preun sbd.service
%systemd_preun sbd_remote.service
%postun
%systemd_postun sbd.service
%systemd_postun sbd_remote.service
%endif
%files
###########################################################
%defattr(-,root,root)
%config(noreplace) %{_sysconfdir}/sysconfig/sbd
%{_sbindir}/sbd
%{_datadir}/sbd
%doc %{_mandir}/man8/sbd*
%if %{defined _unitdir}
%{_unitdir}/sbd.service
%{_unitdir}/sbd_remote.service
%endif
%doc COPYING
%changelog
* Mon Oct 13 2014 <[email protected]> - 1.2.1-0.4.3de531ed.git
- Fixes for suitability to the el7 environment
* Tue Sep 30 2014 <[email protected]> - 1.2.1-0.3.8f912945.git
- Only build on archs supported by the HA Add-on
* Fri Aug 29 2014 <[email protected]> - 1.2.1-0.2.8f912945.git
- Remove some additional SUSE-isms
* Fri Aug 29 2014 <[email protected]> - 1.2.1-0.1.8f912945.git
- Prepare for package review
Resolves: rhbz#1134245