From 131aa4e95fbe9f7d9a7455d10898b8ae35242956 Mon Sep 17 00:00:00 2001 From: Eric Torres Date: Wed, 17 Apr 2019 21:01:04 -0700 Subject: [PATCH] Add PKGBUILD to repository --- .gitignore | 1 - PKGBUILD | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 50 insertions(+), 1 deletion(-) create mode 100644 PKGBUILD diff --git a/.gitignore b/.gitignore index cc70beb..82bc131 100644 --- a/.gitignore +++ b/.gitignore @@ -7,4 +7,3 @@ tags .coverage .hypothesis .idea -PKGBUILD diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 0000000..b7eb003 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,50 @@ +# Maintainer: Eric Torres +pkgname=rbackup +pkgver=0.5.2 +pkgrel=1 +pkgdesc="An rsync-based tool for backing up files" +arch=('any') +url="" +license=('MIT') +depends=(python rsync) +makedepends=(python-setuptools) +checkdepends=(python-hypothesis python-pytest) +backup=(etc/$pkgname/backup.conf + etc/$pkgname/etc-include.conf + etc/$pkgname/system-include.conf + etc/$pkgname/home-exclude.conf) +source=("${pkgname}-${pkgver}.tar.gz") +sha512sums=('4d389c1669b54f8da3567420d786de065c81c732263068e3ac79f8dab539cf13a355fd9b54a684df30499fd760ff44be20cafc285a8d3e3fd24d367dcbd203c4') + +build() { + cd "${srcdir}/${pkgname}-${pkgver}" + python setup.py build +} + +check() { + cd "${srcdir}/${pkgname}-${pkgver}" + pytest +} + +package() { + cd "${srcdir}/${pkgname}-${pkgver}" + + python setup.py install \ + --prefix='/usr' \ + --root="${pkgdir}" \ + --optimize=1 \ + --skip-build + + # Install config files + for config in rbackup/config/*.conf; do + install -Dm644 "${config}" "${pkgdir}/etc/${pkgname}/${config##*/}" + done + + # Install AppArmor profile + install -Dm644 rbackup/config/usr.bin.backup \ + "${pkgdir}/etc/apparmor.d/usr.bin.backup" + + # Install documetation + install -Dm644 README \ + "${pkgdir}/usr/share/doc/${pkgname}/README" +}