summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 65ee70d0ea2396ebcd7f5ecdfb8d8900c0c13751 (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
# vim:set ts=2 sw=2 et:
# Maintainer: Brian Bidulock <bidulock@openss7.org>
# Contributor : gls < ghostlovescorebg at gmail dot com >

pkgname=csync2
pkgver=2.0
pkgrel=4
arch=('i686' 'x86_64')
pkgdesc="Asynchronous cluster syncronisation tool based on librsync and inspired by Unison"
url="http://oss.linbit.com/csync2/"
license=('GPL')
makedepends=('texlive-latexextra' 'sqlite' 'git')
depends=('librsync' 'gnutls')
optdepends=('sqlite: for sqlite backend')
source=("http://oss.linbit.com/csync2/${pkgname}-${pkgver}.tar.gz"
        'csync2.socket'
        'csync2@.service'
        'csync2-rm-ssl-cert')
sha256sums=('11cb37380fb185bce0c22b804fec9b01c385d9d83cc528cfd48d748453834fa2'
            'ccb6ac225d2a4b490d47c87d835c1f2fb8caa5a21c46cf117cce0253c05c8eb1'
            'c51e1ca1b41e0204d73e036727f8122d2420e8b044ec50ae9fe8fc07a0712a43'
            'f63ccb9d5dd4da556eec7920aed21925d8809d4fb6c081b22e82cc87c617567f')

build() {
  cd ${pkgname}-${pkgver}

  ./configure \
    --prefix=/usr \
    --bindir=/usr/bin \
    --sbindir=/usr/bin \
    --sysconfdir=/etc/csync2 \
    --localstatedir=/var
  make V=0
}

package() {
  cd ${pkgname}-${pkgver}

  make -j1 DESTDIR="${pkgdir}" install
  install -Dm644 ../'csync2.socket' "$pkgdir/usr/lib/systemd/system/csync2.socket"
  install -Dm644 ../'csync2@.service' "$pkgdir/usr/lib/systemd/system/csync2@.service"
  install -Dm755 ../'csync2-rm-ssl-cert' "$pkgdir/usr/bin/csync2-rm-ssl-cert"
  rm -fr "${pkgdir}"/var
  install -Dm644 /dev/stdin "${pkgdir}"/usr/lib/tmpfiles.d/${_pkgname}.conf <<-END
    d /var/lib/${_pkgname} 0755 root root -
END
}