summaryrefslogtreecommitdiff
path: root/pcr/pacemaker/PKGBUILD
blob: 2cd0be84c9d6153242a6b7930056b05fb611a8c2 (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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
# Maintainer (Parabola): Márcio Silva <coadde@lavabit.com>

pkgname=ha-pacemaker
_pkgname=${pkgname:3}
pkgver=1.1.9
pkgrel=3
pkgdesc='Cluster resource manager'
arch=(
  i686
  x86_64
  mips64el
)
url=http://linux-ha.org/wiki/${_pkgname^}
license=GPL2
depends=(
  corosync
  ha-heartbeat
  ha-resourceagent
  libqb
)
optdepens=(
  inkscape
  lynx
  openssh
  valgrind
  w3m
)
makedepends=(
  help2man
  inkscape
  libxslt
  lynx
  openssh
  valgrind
  w3m
)
options=(!libtool)
source=https://github.com/ClusterLabs/$_pkgname/archive/${_pkgname^}-$pkgver.tar.gz
sha512sums=97d13cf722aea9cba1ce344afc3137d9edc15a978d2a7acc44179c4859ecb18f800312caf02c9574b0fab528cd6e2c3e4876a1ffde8a08c2500c0ba816cdf071

prepare() {
  cd $srcdir/$_pkgname-${_pkgname^}-$pkgver
  sed -i 's|AM_CONFIG_HEADER|AC_CONFIG_HEADERS|;
          s|AM_INIT_AUTOMAKE($PACKAGE_NAME, $PACKAGE_VERSION)|AM_INIT_AUTOMAKE|;
         ' configure.ac
  sed -i 's|INCLUDES|AM_CPPFLAGS|;
         ' {cib,crmd,cts,lib/{cib,cluster,common,fencing,lrmd,pengine,services,transition},mcp,pengine,replace,tools}/Makefile.am
}

build() {
  cd $srcdir/$_pkgname-${_pkgname^}-$pkgver
  setarch $CARCH ./autogen.sh
  setarch $CARCH ./configure --prefix=/usr\
    --enable-fatal-warnings=yes\
    --disable-static\
    --enable-systemd\
    --enable-upstart\
    --libdir=/usr/lib\
    --libexecdir=/usr/lib\
    --localstatedir=/var\
    --sysconfdir=/etc\
    --with-acl\
    --with-ais\
    --with-cibsecrets\
    --with-cman\
    --with-corosync\
    --with-cs-quorum\
    --with-esmtp\
    --with-heartbeat\
    --with-lcrso-dir=/usr/lib/lcrso\
    --with-nagios\
    --with-profiling\
    --with-snmp\
    --without-gcov
  setarch $CARCH make
}

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

  mv $pkgdir/usr/sbin/cibsecret{,-pacemaker}
}