summaryrefslogtreecommitdiff
path: root/community/keepalived/PKGBUILD
blob: 5f7a8487f68b3b3bc217a51872fbe99f23ec81a3 (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
# $Id: PKGBUILD 104971 2014-01-28 23:21:57Z seblu $
# Maintainer: Sébastien Luttringer
# Contributor: Andrea Zucchelli <zukka77@gmail.com>

pkgname=keepalived
pkgver=1.2.11
pkgrel=1
pkgdesc='Failover and monitoring daemon for LVS clusters'
arch=('i686' 'x86_64')
url='http://www.keepalived.org/'
license=('GPL2')
backup=('etc/keepalived/keepalived.conf')
depends=('openssl' 'popt' 'libnl1')
source=("http://www.keepalived.org/software/$pkgname-$pkgver.tar.gz"
        'keepalived.service')
md5sums=('6a5cee0d9e0a6b84b251b044cd8f3523'
         '0a5171f4298528315e8a8004b55befb7')

build() {
  cd $pkgname-$pkgver
  ./configure --prefix=/usr --sysconfdir=/etc --sbindir=/usr/bin
  make
}

package() {
  cd $pkgname-$pkgver
  make DESTDIR="$pkgdir" install
  # clean pacakge init scripts
  rm -r "$pkgdir/etc/rc.d" "$pkgdir/etc/sysconfig"
  # move examples to /usr/share
  install -d -m 755 "$pkgdir/usr/share/$pkgname"
  mv "$pkgdir/etc/keepalived/samples" "$pkgdir/usr/share/$pkgname/samples"
  # systemd
  install -D -m 644 "$srcdir/$pkgname.service" \
    "$pkgdir/usr/lib/systemd/system/$pkgname.service"
}

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