From 42d8b8e3f2bd8ddce78f06f2f97dfae5be8b4960 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1rcio=20Alexandre=20Silva=20Delgado?= Date: Fri, 31 May 2013 17:10:30 -0300 Subject: pcr/heartbeat --- pcr/heartbeat/PKGBUILD | 172 +++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 146 insertions(+), 26 deletions(-) (limited to 'pcr/heartbeat') diff --git a/pcr/heartbeat/PKGBUILD b/pcr/heartbeat/PKGBUILD index f913344a0..cf2269d70 100644 --- a/pcr/heartbeat/PKGBUILD +++ b/pcr/heartbeat/PKGBUILD @@ -1,32 +1,28 @@ -# Maintainer (Parabola): Márcio Silva +# Maintainer: Márcio Silva -pkgname=ha-heartbeat -_pkgname=${pkgname:3} +pkgname=heartbeat pkgver=3.0.5 _pkgver=${pkgver::1}_${pkgver:2:1} -pkgrel=6 -pkgdesc='Daemon that provides cluster infrastructure services to its clients' +pkgrel=9 +pkgdesc='Daemon that provides cluster infrastructure services to its clients (Linux-HA)' arch=( i686 x86_64 mips64el ) -url=http://linux-ha.org/wiki/${_pkgname^} +group=linux-ha +url=http://$group.org/wiki/${pkgname^} license=( GPL2 lGPL2.1 ) depends=( gnutls - ha-glue + cluster-glue ) optdepends=( - lynx net-tools openssh - swig - valgrind - w3m ) makedepends=( docbook-xsl @@ -38,34 +34,147 @@ makedepends=( valgrind w3m ) -options=!libtool -source=( - http://hg.linux-ha.org/$_pkgname-STABLE_$_pkgver/archive/STABLE-$pkgver.tar.bz2 - $pkgname.service -) -sha512sums=( - e38083b87c56a72eb8925ac42adeabb92618608e92218a63960ec0d0bca264f92a8e9c3ebfb0589cc4538da1a82b268b5cc9ee5a51ed33057c969e694e16b27d - d14013b4ee133ed07e17fa6e09cae1f9f7bdbabaadfda9b9bb8ed25d4d5ff2f3d419f344195c6d5211da33293d5fe5ad64dbc8be6e1a02f7fa21563f54907a20 -) +options=(!libtool) +provides=(ha-$pkgname) +conflicts=ha-$pkgname +replaces=ha-$pkgname +source=http://hg.$group.org/$pkgname-STABLE_$_pkgver/archive/STABLE-$pkgver.tar.bz2 +sha512sums=e38083b87c56a72eb8925ac42adeabb92618608e92218a63960ec0d0bca264f92a8e9c3ebfb0589cc4538da1a82b268b5cc9ee5a51ed33057c969e694e16b27d prepare() { - cd $srcdir/${_pkgname^}-3-0-STABLE-$pkgver + cd $srcdir/${pkgname^}-3-0-STABLE-$pkgver + mv configure.{in,ac} + sed -i 's|AM_CONFIG_HEADER|AC_CONFIG_HEADERS|; s|AM_INIT_AUTOMAKE(heartbeat, $HAPKGVERSION)|AM_INIT_AUTOMAKE|; ' configure.ac sed -i "s|AC_INIT(GNUmakefile)|AC_INIT(heartbeat, $pkgver)|; " configure.ac + sed -i 's|INCLUDES|AM_CPPFLAGS|; - ' {contrib/{drbd-outdate-peer,ipfail,mlock},cts,heartbeat,lib/{apphb,hbclient,plugins/{HB{auth,comm,compress},quorum{,d},tiebreaker}},membership/{ccm,quorumd},replace,telecom/apphbd,tools}/Makefile.am + ' $(grep -rl INCLUDES | grep Makefile.am) + + # fixing path + sed -i 's|bin/sh|usr/bin/bash|; + ' $(grep -rl bin/sh) + sed -i 's| /bin| /usr/bin|; + ' $(grep -rl ' /bin') + sed -i 's| /sbin| /usr/bin|; + ' $(grep -rl ' /sbin') + sed -i 's|usr/sbin|usr/bin|; + ' $(grep -rl usr/sbin) + #sed -i 's|/lib64|/lib|; + # ' $(grep -rl /lib64) + #sed -i 's|usr/libexec|usr/lib|; + # ' $(grep -rl usr/libexec) + sed -i 's|var/lock|run/lock|; + ' $(grep -rl var/lock) + sed -i 's|var/run|run|; + ' $(grep -rl var/run) + + # remove Open Source term + sed -i 's|Open Source / ||; + s|open source / ||; + s|Open Source|Free Software|; + s|open source|free software|; + s|Free Software Development Lab|Open Source Development Lab|; + ' $(grep -ril 'open source') + #sed -i 's|OpenSource / ||; + # s|opensource / ||; + # s|OpenSource|FreeSoftware|; + # s|opensource|freesoftware|; + # s|freesoftware.org|opensource.org|; + # s|http://www.opensource.org/|http://www.gnu.org/philosophy/free-sw.html|; + # s|http://www.gnu.org/philosophy/free-sw.htmllicenses/osl-|http://opensource.org/licenses/osl-|; + # s|http://www.gnu.org/philosophy/free-sw.htmlosd|http://opensource.org/osd|; + # ' $(grep -ril opensource) + + # remove Linux term + sed -i 's|Linux,|GNU/Linux,|; + s|Linux and|GNU/Linux and|; + s|Linux distro|GNU/Linux distro|; + s|Linux distribution|GNU/Linux distribution|; + s|Linux machine|GNU/Linux machine|; + s|Linux Only|GNU/Linux Only|; + s|Linux only|GNU/Linux only|; + s|Linux operating|GNU/Linux operating|; + s|Linux OS|GNU/Linux OS|; + s|Linux platform|GNU/Linux platform|; + s|Linux software|GNU/Linux software|; + s|Linux specific|GNU/Linux specific|; + s|Linux system|GNU/Linux system|; + s|Linux will|GNU/Linux will|; + s|# Linux$|# GNU/Linux|; + s|# Linux.$|# GNU/Linux.|; + s|* Linux$|* GNU/Linux|; + s|* Linux.$|* GNU/Linux.|; + s|// Linux$|// GNU/Linux|; + s|// Linux.$|// GNU/Linux.|; + s|, Linux|, GNU/Linux|; + s|As Linux|As GNU/Linux|; + s|as Linux|as GNU/Linux|; + s|And Linux|And GNU/Linux|; + s|and Linux|and GNU/Linux|; + s|Be Linux|Be GNU/Linux|; + s|be Linux|be GNU/Linux|; + s|Because Linux|Because GNU/Linux|; + s|because Linux|because GNU/Linux|; + s|e.g. Linux|e.g. GNU/Linux|; + s|For Linux|For GNU/Linux|; + s|for Linux|for GNU/Linux|; + s|In Linux|In GNU/Linux|; + s|in Linux|in GNU/Linux|; + s|Like Linux|Like GNU/Linux|; + s|like Linux|like GNU/Linux|; + s|non-Linux|non GNU/Linux|; + s|Of Linux|Of GNU/Linux|; + s|of Linux|of GNU/Linux|; + s|On Linux|On GNU/Linux|; + s|on Linux|on GNU/Linux|; + s|OS type: Linux|OS type: GNU/Linux|; + s|Other Linux|Other GNU/Linux|; + s|other Linux|other GNU/Linux|; + s|The Linux|The GNU/Linux|; + s|the Linux|the GNU/Linux|; + s|Typically Linux|Typically GNU/Linux|; + s|typically Linux|typically GNU/Linux|; + s|To Linux|To GNU/Linux|; + s|to Linux|to GNU/Linux|; + s|Under Linux|Under GNU/Linux|; + s|under Linux|under GNU/Linux|; + /Linux: "mail" offers "-s"./ s|Linux|GNU/Linux|; + s|ArchGNU/Linux|ArchLinux|; + s|e2fsprogs, typically GNU/Linux|e2fsprogs, typically Linux|; + s|GNU/GNU|GNU|; + s|GNU/Linux device|Linux device|; + s|GNU/Linux Director Daemon|Linux Director Daemon|; + s|GNU/Linux is a registered trademark of Linus Torvalds|Linux is a registered trademark of Linus Torvalds|; + s|GNU/Linux kernel|Linux kernel|; + s|GNU/Linux specific kernel|Linux specific kernel|; + s|GNU/Linux Standard Base|Linux Standard Base|; + s|GNU/Linux sysfs|Linux sysfs|; + s|GNU/Linux Virtual Server|Linux Virtual Server|; + s|GNU/Linux Watchdog|Linux Watchdog|; + s|GNU/Linux watchdog|Linux watchdog|; + s|GNU/LinuxHA|LinuxHA|; + s|GNU/Linux-HA|Linux-HA|; + s|GNU/LinuxSCSI|LinuxSCSI|; + s|HA GNU/Linux|HA Linux|; + s|High-Availability GNU/Linux|High-Availability Linux|; + s|MkGNU/Linux|MkLinux|; + s|SEGNU/Linux|SELinux|; + s|VA GNU/Linux Cluster|VA Linux Cluster|; + s|ConfigureLinux|ConfigureGNULinux|; + ' $(grep -rl Linux) } build() { - cd $srcdir/${_pkgname^}-3-0-STABLE-$pkgver + cd $srcdir/${pkgname^}-3-0-STABLE-$pkgver setarch $CARCH ./bootstrap setarch $CARCH ./configure --prefix=/usr\ --disable-fatal-warnings\ - --enable-static=no\ + --disable-static\ --enable-valgrind\ --libdir=/usr/lib\ --localstatedir=/var\ @@ -74,11 +183,22 @@ build() { } package() { - cd $srcdir/${_pkgname^}-3-0-STABLE-$pkgver + cd $srcdir/${pkgname^}-3-0-STABLE-$pkgver setarch $CARCH make DESTDIR=$pkgdir install + rm $pkgdir/etc/rc.d/$pkgname && rmdir $pkgdir/etc/rc.d + install -d $pkgdir/usr/lib/systemd/system - install -Dm644 $srcdir/$pkgname.service $pkgdir/usr/lib/systemd/system + echo '[Unit]' > $pkgdir/usr/lib/systemd/system/$pkgname.service + echo 'Description=Startup script high-availability services' >> $pkgdir/usr/lib/systemd/system/$pkgname.service + echo 'Requires=network.target remote-fs.target timers.target' >> $pkgdir/usr/lib/systemd/system/$pkgname.service + echo '' >> $pkgdir/usr/lib/systemd/system/$pkgname.service + echo '[Service]' >> $pkgdir/usr/lib/systemd/system/$pkgname.service + echo 'Type=forking' >> $pkgdir/usr/lib/systemd/system/$pkgname.service + echo 'ExecStart=/usr/lib/heartbeat/heartbeat' >> $pkgdir/usr/lib/systemd/system/$pkgname.service + echo '' >> $pkgdir/usr/lib/systemd/system/$pkgname.service + echo '[Install]' >> $pkgdir/usr/lib/systemd/system/$pkgname.service + echo 'WantedBy=multi-user.target' >> $pkgdir/usr/lib/systemd/system/$pkgname.service } # vim:set ts=2 sw=2 et: -- cgit v1.2.3-2-g168b