Add PKGBUILD to repository

This commit is contained in:
Eric Torres 2019-04-17 21:01:04 -07:00
parent 481662915b
commit 131aa4e95f
2 changed files with 50 additions and 1 deletions

1
.gitignore vendored
View File

@ -7,4 +7,3 @@ tags
.coverage .coverage
.hypothesis .hypothesis
.idea .idea
PKGBUILD

50
PKGBUILD Normal file
View File

@ -0,0 +1,50 @@
# Maintainer: Eric Torres <erictorres4@protonmail.com>
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"
}