summaryrefslogtreecommitdiff
path: root/pcr/cluster-glue/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'pcr/cluster-glue/PKGBUILD')
-rw-r--r--pcr/cluster-glue/PKGBUILD150
1 files changed, 65 insertions, 85 deletions
diff --git a/pcr/cluster-glue/PKGBUILD b/pcr/cluster-glue/PKGBUILD
index f23f88ef3..2c45a3b0c 100644
--- a/pcr/cluster-glue/PKGBUILD
+++ b/pcr/cluster-glue/PKGBUILD
@@ -1,24 +1,23 @@
-# Maintainer (Parabola): Márcio Silva <coadde@lavabit.com>
+# Maintainer: Márcio Silva <coadde@lavabit.com>
pkgname=cluster-glue
_pkgname1=${pkgname::7}
_pkgname2=${pkgname:8}
_pkgname=${_pkgname1^}_${_pkgname2^}
-_grpname=linux-ha
pkgver=1.0.11
-pkgrel=9
-pkgdesc='Set of libraries, tools and utilities suitable for the Heartbeat/Pacemaker cluster stack'
+pkgrel=14
+pkgdesc='Set of libraries, tools and utilities suitable for the Heartbeat/Pacemaker cluster stack (Linux-HA)'
arch=(
i686
x86_64
mips64el
)
-url=http://$_grpname.org/wiki/$_pkgname
+group=linux-ha
+url=http://$group.org/wiki/$_pkgname
license=(
GPL2
LGPL2.1
)
-group=$_grpname
depends=(
curl
dbus-glib
@@ -31,14 +30,11 @@ depends=(
net-snmp
openhpi
openipmi
- python
- util-linux
- #vacm
-)
-optdepends=(
- net-tools
openssh
+ python2
+ util-linux
)
+optdepends=net-tools
makedepends=(
help2man
libxslt
@@ -53,8 +49,20 @@ provides=(ha-$_pkgname2)
conflicts=ha-$_pkgname2
replaces=ha-$_pkgname2
install=$pkgname.install
-source=http://hg.$_grpname.org/$_pkgname2/archive/$_pkgname2-$pkgver.tar.bz2
-sha512sums=35ac8ac555c39f24c11e3a768cc50eba051fe617edf4cdc0429dac73f45a472f144cfe6ec5faff575606f2b04ff76a2f732556d848b61410c2683d93ba928413
+source=(
+ http://hg.$group.org/$_pkgname2/archive/$_pkgname2-$pkgver.tar.bz2
+ ha-log.service
+ fixing-path.sed
+ replace-linux_os-to-gnulinux_os-term.sed
+ replace-opensource-to-free-term.sed
+)
+sha512sums=(
+ 35ac8ac555c39f24c11e3a768cc50eba051fe617edf4cdc0429dac73f45a472f144cfe6ec5faff575606f2b04ff76a2f732556d848b61410c2683d93ba928413
+ bb5bc5c5a9347302be583c43b100c0c3760ec4dcc3348a9f9708d5b2c58ec02dd5782c5ac9dcb86223258493ad3fba8ddd8dc5670390f0f602c34869b26bee6d
+ ce58a2af9f32265f12cc4984e9ae7f285fdb7737813ecccc0780015d048938d9dd79278635eb1cc6833f12f37a8c43211fec17411780220cf38fc44b91ecc076
+ e59386aee4db5857fa131798327aa449a5efcd7d50c3ab45dadfa0becc31698a62367ce83b85ca739bdebaad4a9daf96d02c42673a4e26294ec0fa67323fdb5b
+ c82bd919d1cd02afccd10aea3e015f289ac97e387a1485097d681f9161a00c64859a5dce0ed36b98ad6a340264c2d854dcc83e3248e12828795b73c6ff67ef5b
+)
prepare() {
export _CLUSTER_USER=hacluster
@@ -85,78 +93,61 @@ prepare() {
s|/sbin:/usr/sbin:/usr/local/sbin:/usr/local/bin|/usr/bin|;
' configure.ac
sed -i 's|INCLUDES|AM_CPPFLAGS|;
- ' $(grep -rl INCLUDES . | grep Makefile.am)
+ ' $(grep -rlI INCLUDES | grep Makefile.am)
# fixing path
- sed -i 's|bin/sh|usr/bin/bash|;
- ' $(grep -rl bin/sh .)
- sed -i 's|usr/sbin|usr/bin|;
- ' $(grep -rl usr/bin .)
- sed -i 's| /bin| /usr/bin|;
- ' $(grep -rl ' /bin' .)
- sed -i 's| /sbin| /usr/bin|;
- ' $(grep -rl ' /sbin' .)
- sed -i 's|/var/lock|/run/lock|;
- ' $(grep -rl /var/lock .)
- sed -i 's|var/run|run|;
- ' $(grep -rl var/run)
+ sed -i -f $srcdir/fixing-path.sed\
+ $(grep -rlI /bin)\
+ $(grep -rlI /sbin)\
+ $(grep -rlI /lib)\
+ $(grep -rlI /var)
- # remove Open Source term
- sed -i 's|Open Source / ||;
- s|open source / ||;
- s|Open Source|Free Software|;
- s|open source|free software|;
- ' $(grep -ril 'open source')
- sed -i 's|OpenSource / ||;
- s|opensource / ||;
- s|OpenSource|FreeSoftware|;
- s|opensource|freesoftware|;
- ' $(grep -ril opensource)
+ # fixing python2 path
+ sed -i 's|bin/env python|bin/env python2|g;
+ s|bin/python|bin/python2|g;
+ ' $(grep -rlI 'bin/env python')\
+ $(grep -rlI bin/python)
- # remove Linux term
- sed -i '/, Linux/ s|Linux|GNU/Linux|;
- /And Linux/ s|Linux|GNU/Linux|;
- /and Linux/ s|Linux|GNU/Linux|;
- /For Linux/ s|Linux|GNU/Linux|;
- /for Linux/ s|Linux|GNU/Linux|;
- /Like Linux/ s|Linux|GNU/Linux|;
- /like Linux/ s|Linux|GNU/Linux|;
- /Linux,/ s|Linux|GNU/Linux|;
- /Linux and/ s|Linux|GNU/Linux|;
- /Linux distribution/ s|Linux|GNU/Linux|;
- /Linux machine/ s|Linux|GNU/Linux|;
- /Linux operating/ s|Linux|GNU/Linux|;
- /Linux OS/ s|Linux|GNU/Linux|;
- /Linux specific/ s|Linux|GNU/Linux|;
- /Linux system/ s|Linux|GNU/Linux|;
- /Under Linux/ s|Linux|GNU/Linux|;
- /under Linux/ s|Linux|GNU/Linux|;
- /On Linux/ s|Linux|GNU/Linux|;
- /on Linux/ s|Linux|GNU/Linux|;
- /(e.g. Linux)/ s|Linux|GNU/Linux|;
- /High-Availability Linux/ s|Linux|GNU/Linux|;
- /sysDescr.0 = STRING: Linux/ s|Linux|GNU/Linux|;
- /This is what the Linux/ s|Linux|GNU/Linux|;
- s|GNU/GNU|GNU|;
- s|GNU/Linux kernel|Linux kernel|;
- s|GNU/Linux specific kernel|Linux specific kernel|;
- ' $(grep -rl Linux)
-}
+ # remove Linux (OS) term to GNU/Linux (OS) term
+ sed -i -f $srcdir/replace-linux_os-to-gnulinux_os-term.sed\
+ $(grep -rlI Linux)
-build() {
+ # replace Open Source term to Free term
+ sed -i -f $srcdir/replace-opensource-to-free-term.sed\
+ $(grep -rilI 'open.\{0,1\}source')
+#}
+
+#build() { # disabled, due that is needed internet for generating man pages with libxslt.
cd $srcdir/Reusable-${_pkgname1^}-Components-$_pkgname2--$_pkgname2-$pkgver
setarch $CARCH ./autogen.sh
- setarch $CARCH ./configure --prefix=/usr\
+ setarch $CARCH ./configure\
+ --sysconfdir=/etc\
+ --prefix=/usr\
+ --exec-prefix=/usr\
+ --bindir=/usr/bin\
+ --sbindir=/usr/bin\
+ --includedir=/usr/include\
+ --oldincludedir=/usr/include\
+ --libdir=/usr/lib\
+ --libexecdir=/usr/lib\
+ --datarootdir=/usr/share\
+ --datadir=/usr/share\
+ --docdir=/usr/share/doc/$pkgname\
+ --dvidir=/usr/share/doc/$pkgname\
+ --htmldir=/usr/share/doc/$pkgname\
+ --pdfdir=/usr/share/doc/$pkgname\
+ --psdir=/usr/share/doc/$pkgname\
+ --infodir=/usr/share/info\
+ --localedir=/usr/share/locale\
+ --mandir=/usr/share/man\
+ --localstatedir=/var\
--disable-ansi\
--disable-fatal-warnings\
--disable-static\
--enable-doc\
--enable-libnet\
+ --enable-shared\
--enable-upstart\
- --libdir=/usr/lib\
- --localstatedir=/var\
- --sbindir=/usr/bin\
- --sysconfdir=/etc\
--with-daemon-group=haclient\
--with-daemon-user=hacluster\
--with-ocf-root=/usr/lib/ocf
@@ -167,19 +158,8 @@ package() {
cd $srcdir/Reusable-${_pkgname1^}-Components-$_pkgname2--$_pkgname2-$pkgver
setarch $CARCH make DESTDIR=$pkgdir install
- rm $pkgdir/etc/rc.d/logd && rmdir $pkgdir/etc{/rc.d,}
-
install -d $pkgdir/usr/lib/systemd/system
- echo '[Unit]' > $pkgdir/usr/lib/systemd/system/ha_log.service
- echo 'Description=Startup script logd service' >> $pkgdir/usr/lib/systemd/system/ha_log.service
- echo 'Requires=network.target remote-fs.target' >> $pkgdir/usr/lib/systemd/system/ha_log.service
- echo '' >> $pkgdir/usr/lib/systemd/system/ha_log.service
- echo '[Service]' >> $pkgdir/usr/lib/systemd/system/ha_log.service
- echo 'Type=forking' >> $pkgdir/usr/lib/systemd/system/ha_log.service
- echo 'ExecStart=/usr/lib/heartbeat/ha_logd' >> $pkgdir/usr/lib/systemd/system/ha_log.service
- echo '' >> $pkgdir/usr/lib/systemd/system/ha_log.service
- echo '[Install]' >> $pkgdir/usr/lib/systemd/system/ha_log.service
- echo 'WantedBy=multi-user.target' >> $pkgdir/usr/lib/systemd/system/ha_log.service
+ install -m644 $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"