summaryrefslogtreecommitdiff
path: root/community/keepalived/PKGBUILD
blob: 1d2778c8d6c4e5c2ffd7698c4bfc7087bcd52446 (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
# $Id: PKGBUILD 75353 2012-08-21 06:05:32Z seblu $
# Maintainer: Sébastien Luttringer <seblu@aur.archlinux.org>
# Contributor: Andrea Zucchelli <zukka77@gmail.com>

pkgname=keepalived
pkgver=1.2.6
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' 'etc/conf.d/keepalived')
depends=('openssl' 'popt' 'libnl1')
source=("http://www.keepalived.org/software/$pkgname-$pkgver.tar.gz"
        'keepalived.rc'
        'keepalived.service'
        'keepalived.conf')
md5sums=('299f8c7eae521753c3e1f2689974982a'
         '0d7ea6296bce403a5d24be305a0a9d73'
         '7a327df915700dcd45a049d099c9c42b'
         '9c8142da8730ad27a345587dea83ced7')

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

package() {
  cd $pkgname-$pkgver
  make DESTDIR="$pkgdir" install
  # clean pacakge init scripts
  rm -r "$pkgdir/etc/rc.d/init.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"

  # add initscripts
  cd ..
  install -D -m 755 $pkgname.rc "$pkgdir/etc/rc.d/$pkgname"
  install -D -m 644 $pkgname.conf "$pkgdir/etc/conf.d/$pkgname"
  install -D -m 644 $pkgname.service \
    "$pkgdir/usr/lib/systemd/system/$pkgname.service"

}

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