diff options
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 74 |
1 files changed, 47 insertions, 27 deletions
@@ -1,36 +1,56 @@ # 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.0.3 +pkgname='borgmatic' +pkgver=1.1.7 pkgrel=1 -pkgdesc="A simple Python wrapper script for the borg (and attic) backup software." +pkgdesc='A wrapper script for Borg backup software that creates and prunes backups' arch=('any') -url="http://torsion.org/borgmatic/" +url='https://torsion.org/borgmatic/' license=('GPL3') -depends=('borg') -makedepends=('python2-setuptools') -source=("https://torsion.org/hg/$pkgname/archive/$pkgver.tar.gz" - "borgmatic.service" - "borgmatic.timer" - "send-status-mail@.service" - "systemd-email") +depends=('borg' 'python-pykwalify' 'python-ruamel-yaml') +makedepends=('python-setuptools' 'python-tox') provides=('borgmatic') -sha256sums=('81d29ba3159193b02f4c9be0d476e2342a1aa56b72cce6331474c0634c1883a3' - '2292d7d3cfeb6e85fdc966da6882a3c3ae4b800e1561df7dd894b23f6acb87af' - 'eb6991bd4a668b56552ef7c0c16e300f1eea085ae3eabdc83c85135d724c6e58' - '2a5070fdbc1f7fee9de71290c77dc6a875e91fd6f4894e17305e49e24b221930' - '8cb36012017f900673370129f18a0555483b727c3c939b2270a5813559455845') +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 +} + +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 "$srcdir" - install -D -m644 borgmatic.service "$pkgdir/usr/lib/systemd/system/borgmatic.service" - install -D -m644 borgmatic.timer "$pkgdir/usr/lib/systemd/system/borgmatic.timer" - install -D -m644 send-status-mail@.service "$pkgdir/usr/lib/systemd/system/send-status-mail@.service" - install -D -m755 systemd-email "$pkgdir/usr/bin/systemd-email" - cd "$srcdir/$pkgname-$pkgver" - install -D -m644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE" - install -D -m644 sample/config "$pkgdir/etc/$pkgname/config.example" - install -D -m644 sample/excludes "$pkgdir/etc/$pkgname/excludes.example" - install -D -m644 sample/borgmatic.cron "$pkgdir/etc/$pkgname/borgmatic.cron.example" - python setup.py -q install --root="$pkgdir" --optimize=1 + 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: |