blob: ba084575402af1f5c1734469ddf42743e8bcb8bd (
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
|
# Maintainer: Alexander Görtz <aur@nyloc.de>
# Co-maintainer: Dan Beste <dan.ray.beste@gmail.com>
# Contributor: stef204 <https://aur.archlinux.org/account/stef204>
pkgname='borgmatic'
pkgver=1.1.7
pkgrel=2
pkgdesc='A wrapper script for Borg backup software that creates and prunes backups'
arch=('any')
url='https://torsion.org/borgmatic/'
license=('GPL3')
depends=('borg' 'python-pykwalify' 'python-ruamel-yaml')
makedepends=('python-setuptools' 'python-tox')
provides=('borgmatic')
source=("${pkgname}-${pkgver}.tar.gz::https://torsion.org/hg/${pkgname}/archive/${pkgver}.tar.gz")
sha256sums=('939ae88c8f9d2caf77b29a1bb9a53df52fc274ed6f004793616da0c6dab73eae')
prepare() {
cd "${pkgname}-${pkgver}"
# Workaround for borgmatic requiring python-ruamel-yaml <= 15.0. This will
# break when Arch's python-ruamel-yaml version exceeds 15. Long-term a
# change should be proposed to address this upstream:
#
# https://tree.taiga.io/project/witten-borgmatic/issue/37
#
# We will welcome patches to maintain compatibility with Arch's
# python-ruamel-yaml version if upstream is slow to adopt it.
sed -i 's/ruamel.yaml<=0.15/ruamel.yaml<0.16/' setup.py
sed -i 's#/usr/local/bin/borgmatic#/usr/bin/borgmatic#' sample/systemd/borgmatic.service
}
check() {
cd "${pkgname}-${pkgver}"
# Required because borgmatic uses python 3.4, but Arch's default python
# version is 3.6. Once borgmatic moves to 3.6 upstream, this workaround
# should be removed.
#
# Again, if patches are required to maintain compatibility with Arch's
# python version, we will gladly accept them.
sed -i 's/envlist=py34/envlist=py36/' tox.ini
tox
}
package() {
cd "${pkgname}-${pkgver}"
python setup.py -q install --root="${pkgdir}" --optimize=1
install -d "${pkgdir}/usr/lib/systemd/system"
install -m 644 sample/systemd/* "${pkgdir}/usr/lib/systemd/system/"
install -D -m 644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}
# vim: ts=2 sw=2 et:
|