summaryrefslogtreecommitdiff
path: root/pcr/resource-agent
diff options
context:
space:
mode:
authorMárcio Alexandre Silva Delgado <coadde@lavabit.com>2013-05-31 16:40:45 -0300
committerMárcio Alexandre Silva Delgado <coadde@lavabit.com>2013-05-31 16:40:45 -0300
commit2d065a8d237bbc04912ac803a886f566406ce273 (patch)
treee1c8d253ae73a5f92c7abf1ee657ef57b837d435 /pcr/resource-agent
parentb72845626d062a99a4556e041b126e3eed94abb9 (diff)
cluster-glue, openhpi, openipmi, resource-agent: fixing pkg
Diffstat (limited to 'pcr/resource-agent')
-rw-r--r--pcr/resource-agent/PKGBUILD185
1 files changed, 160 insertions, 25 deletions
diff --git a/pcr/resource-agent/PKGBUILD b/pcr/resource-agent/PKGBUILD
index 15438769a..39eb6cb7a 100644
--- a/pcr/resource-agent/PKGBUILD
+++ b/pcr/resource-agent/PKGBUILD
@@ -1,51 +1,174 @@
-# Maintainer (Parabola): Márcio Silva <coadde@lavabit.com>
+# Maintainer: Márcio Silva <coadde@lavabit.com>
-pkgname=ha-resourceagent
-_pkgname=${pkgname:3}
-_xname=${_pkgname::8}
-_yname=${_pkgname:8}
-_Name=${_xname^}_${_yname^}
-_name=${_xname}-${_yname}s
+pkgname=resource-agent
+_pkgname1=${pkgname::8}
+_pkgname2=${pkgname:8}
+_pkgnamex=${_pkgname1^}_${_pkgname2^}
+_pkgnamey=${pkgname}s
+_pkgnamez=ha-${_pkgname1}${_pkgname2}
pkgver=3.9.5
-pkgrel=3
-pkgdesc='Standardized interface for a cluster resource'
+pkgrel=4
+pkgdesc='Standardized interface for a cluster resource (Linux-HA)'
arch=(
i686
x86_64
mips64el
)
-url=http://linux-ha.org/wiki/$_Name
+group=linux-ha
+url=http://$group.org/wiki/$_pkgnamex
license=GPL
-depends=ha-glue
+depends=(
+ #clulog?
+ cluster-glue
+ perl-socket6
+ perl-lwp-protocol-https
+ perl-io-socket-inet6
+ perl-mailtools
+ ipvsadm
+)
optdepends=(
net-tools
openssh
)
makedepends=(
- #libxslt
+ libxslt
libvirt
net-tools
openssh
)
-source=(
- https://github.com/ClusterLabs/$_name/archive/v$pkgver.tar.gz
- ha-ldirector.service
-)
-sha512sums=(
- 668955de7a80577a1fb599d03b0a47589a00aed3017b532931b5132b877e45778c590f26d3057ee763c35973b0f6b032e2f74ebdf0b5f45b5e402b0f13b8ff4e
- 9e257b31305657a5164eebf6893d84496ef5dc5e80058dda5cd250c847c8247e10410cca99f0a481fa461487198fa59640e09d1e81fc3199a54f3ec85c56d9a3
-)
+options=(!libtool)
+provides=($_pkgnamez)
+conflicts=$_pkgnamez
+replaces=$_pkgnamez
+source=https://github.com/ClusterLabs/$_pkgnamey/archive/v$pkgver.tar.gz
+sha512sums=668955de7a80577a1fb599d03b0a47589a00aed3017b532931b5132b877e45778c590f26d3057ee763c35973b0f6b032e2f74ebdf0b5f45b5e402b0f13b8ff4e
prepare() {
- cd $srcdir/$_name-$pkgver
+ cd $srcdir/$_pkgnamey-$pkgver
+
sed -i 's|AM_CONFIG_HEADER|AC_CONFIG_HEADERS|;
' configure.ac
+
sed -i 's|INCLUDES|AM_CPPFLAGS|;
- ' {heartbeat,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|;
+ 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|VERSION_STR = "GNU/Linux Director|VERSION_STR = "Linux Director|;
+ / 2.6, the alignment should be / s|GNU/Linux|Linux|;
+ s|Linux-2.4.26-gentoo-r14|GNU/Linux-2.4.26-gentoo-r14|;
+ ' $(grep -rl Linux)
}
build() {
- cd $srcdir/$_name-$pkgver
+ cd $srcdir/$_pkgnamey-$pkgver
setarch $CARCH ./autogen.sh
setarch $CARCH ./configure --prefix=/usr\
--enable-fatal-warnings\
@@ -58,11 +181,23 @@ build() {
}
package() {
- cd $srcdir/$_name-$pkgver
+ cd $srcdir/$_pkgnamey-$pkgver
setarch $CARCH make DESTDIR=$pkgdir install
+ touch $pkgdir/etc/ha.d/ldirectord.cf
+ rm $pkgdir/etc/rc.d/ldirectord && rmdir $pkgdir/etc/rc.d
+
install -d $pkgdir/usr/lib/systemd/system
- install -Dm644 $srcdir/ha-ldirector.service $pkgdir/usr/lib/systemd/system
+ echo '[Unit]' > $pkgdir/usr/lib/systemd/system/ldirectord.service
+ echo 'Description=Non-heartbeat systems service, that manages the LVS component for TCP/UDP load-balancing' >> $pkgdir/usr/lib/systemd/system/ldirectord.service
+ echo 'Requires=network.target remote-fs.target' >> $pkgdir/usr/lib/systemd/system/ldirectord.service
+ echo '' >> $pkgdir/usr/lib/systemd/system/ldirectord.service
+ echo '[Service]' >> $pkgdir/usr/lib/systemd/system/ldirectord.service
+ echo 'Type=forking' >> $pkgdir/usr/lib/systemd/system/ldirectord.service
+ echo 'ExecStart=/usr/bin/ldirectord' >> $pkgdir/usr/lib/systemd/system/ldirectord.service
+ echo '' >> $pkgdir/usr/lib/systemd/system/ldirectord.service
+ echo '[Install]' >> $pkgdir/usr/lib/systemd/system/ldirectord.service
+ echo 'WantedBy=multi-user.target' >> $pkgdir/usr/lib/systemd/system/ldirectord.service
}
# vim:set ts=2 sw=2 et: