Gentoo Archives: gentoo-commits

From: Alexys Jacob <ultrabug@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] dev/ultrabug:master commit in: sys-cluster/pacemaker/files/, sys-cluster/pacemaker/
Date: Tue, 22 Feb 2011 12:53:50
Message-Id: 6d6e70fb12f5d34adaa52e7a801fe817a04c8e29.ultrabug@gentoo
1 commit: 6d6e70fb12f5d34adaa52e7a801fe817a04c8e29
2 Author: Ultrabug <ultrabug <AT> gentoo <DOT> org>
3 AuthorDate: Tue Feb 22 12:53:30 2011 +0000
4 Commit: Alexys Jacob <ultrabug <AT> gentoo <DOT> org>
5 CommitDate: Tue Feb 22 12:53:30 2011 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=dev/ultrabug.git;a=commit;h=6d6e70fb
7
8 pacemaker with cman
9
10 ---
11 sys-cluster/pacemaker/Manifest | 5 +
12 .../files/pacemaker-1.1.4-autotools-r2.patch | 287 ++++++++++++++++++++
13 sys-cluster/pacemaker/files/pacemaker.initd | 39 +++
14 sys-cluster/pacemaker/files/pacemaker.service | 5 +
15 sys-cluster/pacemaker/pacemaker-1.1.4-r5.ebuild | 84 ++++++
16 5 files changed, 420 insertions(+), 0 deletions(-)
17
18 diff --git a/sys-cluster/pacemaker/Manifest b/sys-cluster/pacemaker/Manifest
19 new file mode 100644
20 index 0000000..425b03a
21 --- /dev/null
22 +++ b/sys-cluster/pacemaker/Manifest
23 @@ -0,0 +1,5 @@
24 +AUX pacemaker-1.1.4-autotools-r2.patch 9932 RMD160 6240324b9188ab5beb5ec2ec775c66a94cc3c7be SHA1 5cb30350c92cd5019f892c2c37d7cb53190c3b79 SHA256 62d937c6a7894a686a79530f6daa2a5f814fecd6ea29dc700308e89d668e488d
25 +AUX pacemaker.initd 922 RMD160 1ee204b244f3e40a6fb272f43d0cf11d7e4404d0 SHA1 7ffa0222674d5003d550b51bad7f0735366ffe01 SHA256 0253da4a3a91d8c3aa7badd30062cbba32a0626b77f1a27db1d731d1bbe133af
26 +AUX pacemaker.service 105 RMD160 e743788acefa97f879ea67b5b3bbbff715c71bce SHA1 42739d9a111a25a643d8f5f8b9fdd2cf1267853a SHA256 43034635a3a92ef55bf638ea3e29c2285240228283a70fbd88fe5e28c0d57c8c
27 +DIST Pacemaker-1.1.4.tar.bz2 23444765 RMD160 ca2635622e2a63258d7dc9933541eb2e3b728679 SHA1 382a4cbd80ef8f1c303f1c5c02d60390e808397f SHA256 922e2929cf9f2efa2e2d9b3185a7ac826a96e86cd8d9f4c4eae177f88f1f03b1
28 +EBUILD pacemaker-1.1.4-r5.ebuild 2180 RMD160 1fb5e97611b43e6ba84026f1cb031a6f0b379323 SHA1 c7722c8f1a520cffc504864b4bcff408962c7ac2 SHA256 082f88c67e4679de37ae62c465d30fc2875807f3a91c987fe7e2fb9a0c95d857
29
30 diff --git a/sys-cluster/pacemaker/files/pacemaker-1.1.4-autotools-r2.patch b/sys-cluster/pacemaker/files/pacemaker-1.1.4-autotools-r2.patch
31 new file mode 100644
32 index 0000000..a3aad64
33 --- /dev/null
34 +++ b/sys-cluster/pacemaker/files/pacemaker-1.1.4-autotools-r2.patch
35 @@ -0,0 +1,287 @@
36 +--- a/configure.ac
37 ++++ b/configure.ac
38 +@@ -1354,6 +1354,7 @@
39 + if
40 + $PKGCONFIG --exists $SERVICELOG
41 + then
42 ++ PKG_CHECK_MODULES([SERVICELOG], [servicelog-1])
43 + SERVICELOG_EXISTS="yes"
44 + fi
45 + AC_MSG_RESULT($SERVICELOG_EXISTS)
46 +@@ -1366,6 +1367,7 @@
47 + if
48 + $PKGCONFIG --exists $OPENIPMI $SERVICELOG
49 + then
50 ++ PKG_CHECK_MODULES([OPENIPMI_SERVICELOG],[OpenIPMI OpenIPMIposix])
51 + OPENIPMI_SERVICELOG_EXISTS="yes"
52 + fi
53 + AC_MSG_RESULT($OPENIPMI_SERVICELOG_EXISTS)
54 +--- a/fencing/Makefile.am
55 ++++ b/fencing/Makefile.am
56 +@@ -36,21 +36,20 @@
57 +
58 + stonith_test_SOURCES = test.c
59 +
60 +-stonith_test_LDADD = $(CRYPTOLIB) $(CLUSTERLIBS) \
61 +- $(top_builddir)/lib/common/libcrmcommon.la \
62 ++stonith_test_LDADD = $(top_builddir)/lib/common/libcrmcommon.la \
63 + $(top_builddir)/lib/common/libcrmcluster.la \
64 +- $(top_builddir)/lib/fencing/libstonithd.la
65 ++ $(top_builddir)/lib/fencing/libstonithd.la \
66 ++ $(CRYPTOLIB) $(CLUSTERLIBS)
67 +
68 + stonith_admin_SOURCES = admin.c
69 +
70 +-stonith_admin_LDADD = $(CRYPTOLIB) $(CLUSTERLIBS) \
71 +- $(top_builddir)/lib/common/libcrmcommon.la \
72 ++stonith_admin_LDADD = $(top_builddir)/lib/common/libcrmcommon.la \
73 + $(top_builddir)/lib/common/libcrmcluster.la \
74 +- $(top_builddir)/lib/fencing/libstonithd.la
75 +-
76 ++ $(top_builddir)/lib/fencing/libstonithd.la \
77 ++ $(CRYPTOLIB) $(CLUSTERLIBS)
78 + stonithd_SOURCES = main.c commands.c remote.c
79 +
80 +-stonithd_LDADD = $(CRYPTOLIB) $(CLUSTERLIBS) \
81 +- $(top_builddir)/lib/common/libcrmcommon.la \
82 ++stonithd_LDADD = $(top_builddir)/lib/common/libcrmcommon.la \
83 + $(top_builddir)/lib/common/libcrmcluster.la \
84 +- $(top_builddir)/lib/fencing/libstonithd.la
85 ++ $(top_builddir)/lib/fencing/libstonithd.la \
86 ++ $(CRYPTOLIB) $(CLUSTERLIBS)
87 +--- a/mcp/Makefile.am
88 ++++ b/mcp/Makefile.am
89 +@@ -34,7 +34,7 @@
90 + noinst_HEADERS =
91 +
92 + pacemakerd_SOURCES = pacemaker.c corosync.c
93 +-pacemakerd_LDADD = $(CLUSTERLIBS) $(top_builddir)/lib/common/libcrmcommon.la -lcfg -lconfdb
94 ++pacemakerd_LDADD = $(top_builddir)/lib/common/libcrmcommon.la $(CLUSTERLIBS) -lcfg -lconfdb
95 +
96 + %.8: %
97 + echo Creating $@
98 +--- a/crmd/Makefile.am
99 ++++ b/crmd/Makefile.am
100 +@@ -41,14 +41,13 @@
101 + cib.c pengine.c tengine.c lrm.c \
102 + utils.c misc.c te_events.c te_actions.c te_utils.c te_callbacks.c
103 +
104 +-crmd_LDADD = $(CLUSTERLIBS) -llrm \
105 +- $(top_builddir)/lib/fencing/libstonithd.la \
106 ++crmd_LDADD = $(top_builddir)/lib/fencing/libstonithd.la \
107 + $(top_builddir)/lib/transition/libtransitioner.la \
108 + $(top_builddir)/lib/pengine/libpe_rules.la \
109 + $(top_builddir)/lib/cib/libcib.la \
110 + $(top_builddir)/lib/common/libcrmcluster.la \
111 +- $(top_builddir)/lib/common/libcrmcommon.la
112 +-
113 ++ $(top_builddir)/lib/common/libcrmcommon.la \
114 ++ $(CLUSTERLIBS) -llrm
115 + if BUILD_XML_HELP
116 + man8_MANS = crmd.8
117 +
118 +--- a/pengine/Makefile.am
119 ++++ b/pengine/Makefile.am
120 +@@ -73,14 +73,14 @@
121 + libpengine_la_LIBADD = $(top_builddir)/lib/pengine/libpe_status.la
122 +
123 + pengine_SOURCES = main.c
124 +-pengine_LDADD = $(COMMONLIBS) $(top_builddir)/lib/cib/libcib.la
125 ++pengine_LDADD = $(top_builddir)/lib/cib/libcib.la $(COMMONLIBS)
126 + # libcib for get_object_root()
127 + # $(top_builddir)/lib/hbclient/libhbclient.la
128 +
129 + ptest_SOURCES = ptest.c
130 +-ptest_LDADD = $(COMMONLIBS) \
131 +- $(top_builddir)/lib/cib/libcib.la \
132 +- $(top_builddir)/lib/transition/libtransitioner.la
133 ++ptest_LDADD = $(top_builddir)/lib/cib/libcib.la \
134 ++ $(top_builddir)/lib/transition/libtransitioner.la \
135 ++ $(COMMONLIBS)
136 +
137 + install-exec-local:
138 + $(mkinstalldirs) $(DESTDIR)/$(PE_STATE_DIR)
139 +--- a/lib/common/Makefile.am
140 ++++ b/lib/common/Makefile.am
141 +@@ -38,7 +38,7 @@
142 + endif
143 +
144 + libcrmcluster_la_LDFLAGS = -version-info 1:0:0
145 +-libcrmcluster_la_LIBADD = $(CLUSTERLIBS) libcrmcommon.la
146 ++libcrmcluster_la_LIBADD = libcrmcommon.la $(CLUSTERLIBS)
147 + libcrmcluster_la_DEPENDENCIES = libcrmcommon.la
148 +
149 + # Can't use -Wcast-qual here because glib insists on pretending things are const
150 +@@ -51,7 +51,8 @@
151 +
152 + libcrmcommon_la_SOURCES = ipc.c utils.c xml.c iso8601.c iso8601_fields.c remote.c mainloop.c
153 +
154 +-libcrmcommon_la_LDFLAGS = -version-info 2:0:0 $(GNUTLSLIBS)
155 ++libcrmcommon_la_LDFLAGS = -version-info 2:0:0
156 ++libcrmcommon_la_LIBADD = $(GNUTLSLIBS)
157 +
158 + clean-generic:
159 + rm -f *.log *.debug *.xml *~
160 +--- a/lib/plugins/lrm/Makefile.am
161 ++++ b/lib/plugins/lrm/Makefile.am
162 +@@ -29,8 +29,8 @@
163 + plugin_LTLIBRARIES = stonith.la
164 +
165 + stonith_la_SOURCES = raexecstonith.c
166 +-stonith_la_LDFLAGS = -lpils -export-dynamic -module -avoid-version \
167 +- $(top_builddir)/lib/fencing/libstonithd.la -llrm
168 ++stonith_la_LDFLAGS = -export-dynamic -module -avoid-version
169 ++stonith_la_LIBADD = $(top_builddir)/lib/fencing/libstonithd.la -lpils -llrm
170 +
171 + install-exec-local:
172 + $(mkinstalldirs) $(DESTDIR)$(lrmdir)
173 +--- a/lib/fencing/Makefile.am
174 ++++ b/lib/fencing/Makefile.am
175 +@@ -25,8 +25,8 @@
176 + lib_LTLIBRARIES = libstonithd.la
177 +
178 + libstonithd_la_SOURCES = st_client.c
179 +-libstonithd_la_LDFLAGS = -version-info 1:0:0 \
180 +- -lplumb -lstonith $(CLUSTERLIBS) \
181 +- $(top_builddir)/lib/common/libcrmcommon.la
182 ++libstonithd_la_LDFLAGS = -version-info 1:0:0
183 ++libstonithd_la_LIBADD = $(top_builddir)/lib/common/libcrmcommon.la \
184 ++ -lplumb -lstonith $(CLUSTERLIBS)
185 +
186 + AM_CFLAGS = $(INCLUDES)
187 +--- a/cib/Makefile.am
188 ++++ b/cib/Makefile.am
189 +@@ -47,8 +47,8 @@
190 + cib_SOURCES = io.c messages.c notify.c \
191 + callbacks.c main.c remote.c common.c
192 +
193 +-cib_LDADD = $(COMMONLIBS) $(CRYPTOLIB) $(CLUSTERLIBS) \
194 +- $(top_builddir)/lib/common/libcrmcluster.la
195 ++cib_LDADD = $(top_builddir)/lib/common/libcrmcluster.la \
196 ++ $(COMMONLIBS) $(CRYPTOLIB) $(CLUSTERLIBS)
197 +
198 + cibmon_SOURCES = cibmon.c
199 + cibmon_LDADD = $(COMMONLIBS)
200 +--- a/tools/Makefile.am
201 ++++ b/tools/Makefile.am
202 +@@ -62,8 +62,8 @@
203 + noinst_HEADERS =
204 +
205 + crmadmin_SOURCES = crmadmin.c
206 +-crmadmin_LDADD = $(COMMONLIBS) $(CLUSTERLIBS) \
207 +- $(top_builddir)/lib/pengine/libpe_status.la
208 ++crmadmin_LDADD = $(top_builddir)/lib/pengine/libpe_status.la \
209 ++ $(COMMONLIBS) $(CLUSTERLIBS)
210 +
211 + crm_uuid_SOURCES = crm_uuid.c
212 + crm_uuid_LDADD = $(top_builddir)/lib/common/libcrmcluster.la
213 +@@ -75,45 +75,45 @@
214 + crm_shadow_LDADD = $(COMMONLIBS)
215 +
216 + crm_node_SOURCES = ccm_epoche.c
217 +-crm_node_LDADD = $(COMMONLIBS) $(CLUSTERLIBS) \
218 +- $(top_builddir)/lib/common/libcrmcluster.la
219 ++crm_node_LDADD = $(top_builddir)/lib/common/libcrmcluster.la \
220 ++ $(COMMONLIBS) $(CLUSTERLIBS)
221 +
222 + crm_simulate_SOURCES = crm_inject.c
223 + crm_simulate_CFLAGS = -I$(top_srcdir)/pengine
224 +
225 +-crm_simulate_LDADD = $(COMMONLIBS) \
226 +- $(top_builddir)/lib/pengine/libpe_status.la \
227 ++crm_simulate_LDADD = $(top_builddir)/lib/pengine/libpe_status.la \
228 + $(top_builddir)/pengine/libpengine.la \
229 + $(top_builddir)/lib/cib/libcib.la \
230 +- $(top_builddir)/lib/transition/libtransitioner.la
231 ++ $(top_builddir)/lib/transition/libtransitioner.la \
232 ++ $(COMMONLIBS)
233 +
234 + crm_diff_SOURCES = xml_diff.c
235 + crm_diff_LDADD = $(COMMONLIBS)
236 +
237 + crm_mon_SOURCES = crm_mon.c
238 +-crm_mon_LDADD = $(COMMONLIBS) $(SNMPLIBS) $(ESMTPLIBS) -llrm \
239 +- $(top_builddir)/lib/pengine/libpe_status.la
240 ++crm_mon_LDADD = $(top_builddir)/lib/pengine/libpe_status.la \
241 ++ $(COMMONLIBS) $(SNMPLIBS) $(ESMTPLIBS) -llrm
242 +
243 + # Arguments could be made that this should live in crm/pengine
244 + crm_verify_SOURCES = crm_verify.c
245 +-crm_verify_LDADD = $(COMMONLIBS) \
246 +- $(top_builddir)/lib/pengine/libpe_status.la \
247 +- $(top_builddir)/pengine/libpengine.la
248 ++crm_verify_LDADD = $(top_builddir)/lib/pengine/libpe_status.la \
249 ++ $(top_builddir)/pengine/libpengine.la \
250 ++ $(COMMONLIBS)
251 +
252 + crm_attribute_SOURCES = crm_attribute.c
253 + crm_attribute_LDADD = $(COMMONLIBS)
254 +
255 + crm_resource_SOURCES = crm_resource.c
256 +-crm_resource_LDADD = $(COMMONLIBS) \
257 +- $(top_builddir)/lib/pengine/libpe_rules.la \
258 ++crm_resource_LDADD = $(top_builddir)/lib/pengine/libpe_rules.la \
259 + $(top_builddir)/lib/pengine/libpe_status.la \
260 +- $(top_builddir)/pengine/libpengine.la
261 ++ $(top_builddir)/pengine/libpengine.la \
262 ++ $(COMMONLIBS)
263 +
264 + iso8601_SOURCES = test.iso8601.c
265 + iso8601_LDADD = $(COMMONLIBS)
266 +
267 + attrd_SOURCES = attrd.c
268 +-attrd_LDADD = $(COMMONLIBS) $(top_builddir)/lib/common/libcrmcluster.la
269 ++attrd_LDADD = $(top_builddir)/lib/common/libcrmcluster.la $(COMMONLIBS)
270 +
271 + #pingd_SOURCES = pingd.c
272 + #pingd_LDADD = $(COMMONLIBS)
273 +@@ -123,14 +123,14 @@
274 +
275 + if BUILD_SERVICELOG
276 + notifyServicelogEvent_SOURCES = notifyServicelogEvent.c
277 +-notifyServicelogEvent_CFLAGS = `pkg-config --cflags servicelog-1`
278 +-notifyServicelogEvent_LDFLAGS = `pkg-config --libs servicelog-1` $(top_builddir)/lib/common/libcrmcommon.la
279 ++notifyServicelogEvent_CFLAGS = $(SERVICELOG_CFLAGS)
280 ++notifyServicelogEvent_LDADD = $(top_builddir)/lib/common/libcrmcommon.la $(SERVICELOG_LIBS)
281 + endif
282 +
283 + if BUILD_OPENIPMI_SERVICELOG
284 + ipmiservicelogd_SOURCES = ipmiservicelogd.c
285 +-ipmiservicelogd_CFLAGS = `pkg-config --cflags OpenIPMI OpenIPMIposix servicelog-1`
286 +-ipmiservicelogd_LDFLAGS = `pkg-config --libs OpenIPMI OpenIPMIposix servicelog-1` $(top_builddir)/lib/common/libcrmcommon.la
287 ++ipmiservicelogd_CFLAGS = $(OPENIPMI_SERVICELOG_CFLAGS) $(SERVICELOG_CFLAGS)
288 ++ipmiservicelogd_LDFLAGS = $(top_builddir)/lib/common/libcrmcommon.la $(OPENIPMI_SERVICELOG_LIBS) $(SERVICELOG_LIBS)
289 + endif
290 +
291 + %.8: % crm_attribute
292 +--- a/extra/Makefile.am
293 ++++ b/extra/Makefile.am
294 +@@ -20,5 +20,5 @@
295 +
296 + SUBDIRS = resources
297 +
298 +-mibdir = $(datadir)/snmp/mibs
299 ++mibdir = $(datadir)/$(PACKAGE)/snmp/mibs
300 + mib_DATA = PCMK-MIB.txt
301 +--- a/lib/pengine/Makefile.am
302 ++++ b/lib/pengine/Makefile.am
303 +@@ -34,7 +34,7 @@
304 +
305 + libpe_status_la_LDFLAGS = -version-info 3:0:0
306 + libpe_status_la_SOURCES = $(rule_files) $(status_files)
307 +-libpe_status_la_LIBADD = -llrm @CURSESLIBS@
308 ++libpe_status_la_LIBADD = $(top_builddir)/lib/cib/libcib.la -llrm @CURSESLIBS@
309 +
310 + clean-generic:
311 + rm -f *.log *.debug *~
312 +--- a/lib/Makefile.am
313 ++++ b/lib/Makefile.am
314 +@@ -18,7 +18,7 @@
315 + MAINTAINERCLEANFILES = Makefile.in
316 +
317 + ## Subdirectories...
318 +-SUBDIRS = common pengine transition cib fencing plugins
319 ++SUBDIRS = common cib pengine transition fencing plugins
320 + DIST_SUBDIRS = $(SUBDIRS) ais
321 +
322 + if BUILD_CS_SUPPORT
323
324 diff --git a/sys-cluster/pacemaker/files/pacemaker.initd b/sys-cluster/pacemaker/files/pacemaker.initd
325 new file mode 100644
326 index 0000000..4231425
327 --- /dev/null
328 +++ b/sys-cluster/pacemaker/files/pacemaker.initd
329 @@ -0,0 +1,39 @@
330 +#!/sbin/runscript
331 +# Copyright 1999-2011 Gentoo Foundation
332 +# Distributed under the terms of the GNU General Public License v2
333 +# $Header: /var/cvsroot/gentoo-x86/sys-cluster/pacemaker/files/pacemaker.initd,v 1.1 2011/02/21 14:39:28 ultrabug Exp $
334 +
335 +PIDFILE=/var/run/pacemaker.pid
336 +
337 +depend() {
338 + need net corosync
339 + use syslog
340 +}
341 +
342 +start() {
343 + nc=0
344 + ebegin "Starting Pacemaker Cluster Manager"
345 + einfon "Waiting for Corosync startup ."
346 + while true; do
347 + /usr/sbin/corosync-cfgtool -s &>/dev/null && break
348 + nc=$(expr $nc + 1)
349 + if [ $nc -gt 30 ]; then
350 + echo
351 + eend 1 "Failed to detect Corosync startup, is it really running ?"
352 + exit 1
353 + fi
354 + sleep 1
355 + echo -n "."
356 + done
357 + echo
358 + start-stop-daemon --start -q --exec /usr/sbin/pacemakerd \
359 + --pidfile "${PIDFILE}" --make-pidfile --background \
360 + -- -f
361 + eend $?
362 +}
363 +
364 +stop() {
365 + ebegin "Stopping Pacemaker Cluster Manager"
366 + start-stop-daemon --stop -q --pidfile "${PIDFILE}"
367 + eend $?
368 +}
369
370 diff --git a/sys-cluster/pacemaker/files/pacemaker.service b/sys-cluster/pacemaker/files/pacemaker.service
371 new file mode 100644
372 index 0000000..6383499
373 --- /dev/null
374 +++ b/sys-cluster/pacemaker/files/pacemaker.service
375 @@ -0,0 +1,5 @@
376 +service {
377 + # Load the Pacemaker Cluster Resource Manager
378 + name: pacemaker
379 + ver: 1
380 +}
381 \ No newline at end of file
382
383 diff --git a/sys-cluster/pacemaker/pacemaker-1.1.4-r5.ebuild b/sys-cluster/pacemaker/pacemaker-1.1.4-r5.ebuild
384 new file mode 100644
385 index 0000000..a4fd9a5
386 --- /dev/null
387 +++ b/sys-cluster/pacemaker/pacemaker-1.1.4-r5.ebuild
388 @@ -0,0 +1,84 @@
389 +# Copyright 1999-2011 Gentoo Foundation
390 +# Distributed under the terms of the GNU General Public License v2
391 +# $Header: /var/cvsroot/gentoo-x86/sys-cluster/pacemaker/pacemaker-1.1.4-r4.ebuild,v 1.1 2011/02/21 14:39:27 ultrabug Exp $
392 +
393 +EAPI="2"
394 +
395 +MY_PN="Pacemaker"
396 +MY_P="${MY_PN}-${PV}"
397 +PYTHON_DEPEND="2"
398 +inherit autotools base eutils flag-o-matic multilib python
399 +
400 +DESCRIPTION="Pacemaker CRM"
401 +HOMEPAGE="http://www.linux-ha.org/wiki/Pacemaker"
402 +SRC_URI="http://hg.clusterlabs.org/${PN}/1.1/archive/${MY_P}.tar.bz2"
403 +
404 +LICENSE="GPL-2"
405 +SLOT="0"
406 +KEYWORDS="~amd64 ~hppa ~x86"
407 +IUSE="heartbeat smtp snmp static-libs cman3"
408 +
409 +RDEPEND="
410 + dev-libs/libxslt
411 + sys-cluster/corosync
412 + sys-cluster/cluster-glue
413 + sys-cluster/resource-agents
414 + heartbeat? ( >=sys-cluster/heartbeat-3.0.0 )
415 + smtp? ( net-libs/libesmtp )
416 + snmp? ( net-analyzer/net-snmp )
417 +"
418 +DEPEND="${RDEPEND}"
419 +
420 +PATCHES=(
421 + "${FILESDIR}/${P}-autotools-r2.patch"
422 +)
423 +
424 +S=${WORKDIR}/${MY_PN}-1-1-${MY_P}
425 +
426 +pkg_setup() {
427 + python_set_active_version 2
428 + python_pkg_setup
429 +}
430 +
431 +src_prepare() {
432 + base_src_prepare
433 + sed -i -e "/ggdb3/d" configure.ac || die
434 + eautoreconf
435 +}
436 +
437 +src_configure() {
438 + local myopts=""
439 + use heartbeat || myopts="--with-ais"
440 + # appends lib to localstatedir automatically
441 + econf \
442 + --localstatedir=/var \
443 + --disable-dependency-tracking \
444 + --disable-fatal-warnings \
445 + $(use_with cman3 cs-quorum) \
446 + $(use_with cman3 cman) \
447 + $(use_with smtp esmtp) \
448 + $(use_with heartbeat) \
449 + $(use_with snmp) \
450 + $(use_enable static-libs static) \
451 + ${myopts}
452 +}
453 +
454 +src_install() {
455 + base_src_install
456 + newinitd "${FILESDIR}/pacemaker.initd" pacemaker || die
457 + insinto /etc/corosync/service.d
458 + newins "${FILESDIR}/pacemaker.service" pacemaker || die
459 +}
460 +
461 +pkg_postinst() {
462 + elog "This version of Pacemaker uses the new MCP feature"
463 + elog "and the v1 plugin for CoroSync. Read [1] for more info."
464 + elog
465 + elog "To start the Pacemaker Cluster Manager, run:"
466 + elog "/etc/init.d/pacemaker start"
467 + elog
468 + elog "[1] http://theclusterguy.clusterlabs.org/post/907043024/introducing-the-pacemaker-master-control-process-for"
469 + elog
470 + elog "Note: sys-cluster/openais is no longer a hard dependency of ${P},"
471 + elog "so you may need to install it yourself to suit your needs."
472 +}