summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 74e9039ded1cedae80f91e27668f44df6afd9c85 (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
# Maintainer: olddog <jeff@impcode.com>
# Contributer: kaptoxic
# Contributor: carloratm <carlo.ratm@gmail.com>

pkgname=barman
_realname=barman
pkgver=2.8
pkgrel=2
pkgdesc="Backup and recovery manager for PostgreSQL"
arch=('x86_64')
url="http://www.pgbarman.org"
license=('GPL3')
depends=('rsync' 'python' 'python-argh' 'python-psycopg2' 'python-dateutil' 'python-argcomplete')
makedepends=('python-distribute')
provides=('barman')
options=(!emptydirs)

source=(
  "http://sourceforge.net/projects/pgbarman/files/${pkgver}/barman-${pkgver}.tar.gz"
  barman.crond
  barman.logrotate
  passive-server.conf-template
  ssh-server.conf-template
  streaming-server.conf-template
)
md5sums=('c0eab2058f10fdd9a3f6b2c038397bc8'
         '0e48345895f88b3939543c00928a199b'
         '58c5b20b8e1272ab4ce46757f6613e0d'
         'b43254374978938f7d21035a3356b531'
         'a98247fde653192d5587fff0c2b7b5fe'
         '6dda5a4abca99443e8956ffa719d0ce0')

package()
{
  cd "${srcdir}/barman-${pkgver}"
	python setup.py install --root="${pkgdir}" --optimize=1 || exit 1

  # install LICENSE file
  install -Dm 0644 LICENSE -t      "${pkgdir}/usr/share/licenses/${pkgname}"

  # install docs
  install -Dm 0644 ChangeLog -t    "${pkgdir}/usr/share/doc/${pkgname}"
  install -Dm 0644 README.rst -t   "${pkgdir}/usr/share/doc/${pkgname}"

  # install example files
  cd doc
  install -Dm 0644 barman.conf -t  "${pkgdir}/usr/share/doc/${pkgname}/etc/"

  cd "${srcdir}"
  mkdir -p "${pkgdir}/usr/share/doc/${pkgname}/etc/cron.d/" \
           "${pkgdir}/usr/share/doc/${pkgname}/etc/barman.d/" \
           "${pkgdir}/usr/share/doc/${pkgname}/etc/logrotate.d/"
  install -m 0644 barman.crond     "${pkgdir}/usr/share/doc/${pkgname}/etc/cron.d/barman"
  install -m 0644 barman.logrotate "${pkgdir}/usr/share/doc/${pkgname}/etc/logrotate.d/barman"

  install -Dm 0644 passive-server.conf-template -t   "${pkgdir}/usr/share/doc/${pkgname}/etc/barman.d/"
  install -Dm 0644 ssh-server.conf-template -t       "${pkgdir}/usr/share/doc/${pkgname}/etc/barman.d/"
  install -Dm 0644 streaming-server.conf-template -t "${pkgdir}/usr/share/doc/${pkgname}/etc/barman.d/"

}