summaryrefslogtreecommitdiff
path: root/pcr/ha-resourceagent/PKGBUILD
blob: 15438769a2a7999d88100d1eea28efb2145b4595 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# Maintainer (Parabola): 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
pkgver=3.9.5
pkgrel=3
pkgdesc='Standardized interface for a cluster resource'
arch=(
  i686
  x86_64
  mips64el
)
url=http://linux-ha.org/wiki/$_Name
license=GPL
depends=ha-glue
optdepends=(
  net-tools
  openssh
)
makedepends=(
  #libxslt
  libvirt
  net-tools
  openssh
)
source=(
  https://github.com/ClusterLabs/$_name/archive/v$pkgver.tar.gz
  ha-ldirector.service
)
sha512sums=(
  668955de7a80577a1fb599d03b0a47589a00aed3017b532931b5132b877e45778c590f26d3057ee763c35973b0f6b032e2f74ebdf0b5f45b5e402b0f13b8ff4e
  9e257b31305657a5164eebf6893d84496ef5dc5e80058dda5cd250c847c8247e10410cca99f0a481fa461487198fa59640e09d1e81fc3199a54f3ec85c56d9a3
)

prepare() {
  cd $srcdir/$_name-$pkgver
  sed -i 's|AM_CONFIG_HEADER|AC_CONFIG_HEADERS|;
         ' configure.ac
  sed -i 's|INCLUDES|AM_CPPFLAGS|;
         ' {heartbeat,tools}/Makefile.am
}

build() {
  cd $srcdir/$_name-$pkgver
  setarch $CARCH ./autogen.sh
  setarch $CARCH ./configure --prefix=/usr\
    --enable-fatal-warnings\
    --enable-libnet\
    --libdir=/usr/lib\
    --localstatedir=/var\
    --sysconfdir=/etc\
    --with-ocf-root=/usr/lib/ocf
  setarch $CARCH make
}

package() {
  cd $srcdir/$_name-$pkgver
  setarch $CARCH make DESTDIR=$pkgdir install

  install -d $pkgdir/usr/lib/systemd/system
  install -Dm644 $srcdir/ha-ldirector.service $pkgdir/usr/lib/systemd/system
}

# vim:set ts=2 sw=2 et: