summaryrefslogtreecommitdiff
path: root/pcr/ha-glue/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'pcr/ha-glue/PKGBUILD')
-rw-r--r--pcr/ha-glue/PKGBUILD34
1 files changed, 30 insertions, 4 deletions
diff --git a/pcr/ha-glue/PKGBUILD b/pcr/ha-glue/PKGBUILD
index 9d581f70b..4806932db 100644
--- a/pcr/ha-glue/PKGBUILD
+++ b/pcr/ha-glue/PKGBUILD
@@ -3,7 +3,7 @@
pkgname=ha-glue
_pkgname=${pkgname:3}
pkgver=1.0.11
-pkgrel=3
+pkgrel=4
pkgdesc='A set of libraries, tools and utilities suitable for the Heartbeat/Pacemaker cluster stack'
arch=(
i686
@@ -41,6 +41,7 @@ makedepends=(
#valgrind
#w3m
)
+options=!libtool
install=$pkgname.install
source=(
http://hg.linux-ha.org/$_pkgname/archive/$_pkgname-$pkgver.tar.bz2
@@ -52,21 +53,42 @@ sha512sums=(
)
prepare() {
+ export _CLUSTER_USER=hacluster
+ export _CLUSTER_GROUP=haclient
+ _DGID=666
+ _DUID=666
+
+ #verify the cluster user and group
+ if ! getent group $_CLUSTER_GROUP >/dev/null;then
+ msg 'BEFORE COMPILE THIS SOFTWARE YOU MUST CREATE A CLUSTER GROUP, EXECUTE AS ROOT:'
+ echo -e "# groupadd -r -g $_DGID $_CLUSTER_GROUP\n"
+ _EXITCODE=1
+ fi
+ if ! getent passwd $_CLUSTER_USER >/dev/null;then
+ msg 'BEFORE COMPILE THIS SOFTWARE YOU MUST CREATE A CLUSTER USER, EXECUTE AS ROOT:'
+ echo -e "# useradd -r -g $_CLUSTER_GROUP -u $_DUID -d /var/lib/heartbeat/cores/$_CLUSTER_USER -s /sbin/nologin -c \"cluster user\" $_CLUSTER_USER\n"
+ _EXITCODE=1
+ fi
+ if [[ $_EXITCODE -eq 1 ]] ;then
+ return 1
+ fi
+
cd $srcdir/Reusable-Cluster-Components-$_pkgname--$_pkgname-$pkgver
sed -i 's|AM_CONFIG_HEADER|AC_CONFIG_HEADERS|' configure.ac
}
build() {
cd $srcdir/Reusable-Cluster-Components-$_pkgname--$_pkgname-$pkgver
- ./autogen.sh
- ./configure --prefix=/usr\
+ setarch $CARCH ./autogen.sh
+ setarch $CARCH ./configure --prefix=/usr\
--enable-fatal-warnings=no\
+ --enable-static=no\
--libdir=/usr/lib\
--localstatedir=/var\
--sysconfdir=/etc\
--with-daemon-group=haclient\
--with-daemon-user=hacluster
- make
+ setarch $CARCH make
}
package() {
@@ -75,6 +97,10 @@ package() {
install -d $pkgdir/usr/lib/systemd/system
install -Dm644 $srcdir/ha-log.service $pkgdir/usr/lib/systemd/system
+
+ msg 'AFTER COMPILE THIS SOFTWARE YOU MUST DELETE A CLUSTER USER AND A CLUSTER GROUP, EXECUTE AS ROOT:'
+ echo -e "# userdel $_CLUSTER_USER"
+ echo -e "# groupdel $_CLUSTER_GROUP"
}
# vim:set ts=2 sw=2 et: