2019-02-07 23:19:21 -08:00
|
|
|
# Maintainer: Eric Torres <erictorres4@protonmail.com>
|
|
|
|
pkgname=rbackup
|
2019-04-12 07:54:37 -07:00
|
|
|
pkgver=0.1.1
|
2019-02-07 23:19:21 -08:00
|
|
|
pkgrel=1
|
|
|
|
pkgdesc="An rsync-based tool for backing up files"
|
|
|
|
arch=('any')
|
|
|
|
url=""
|
|
|
|
license=('MIT')
|
2019-03-13 02:28:15 -07:00
|
|
|
depends=(python rsync)
|
2019-04-12 07:54:37 -07:00
|
|
|
makedepends=(python-setuptools)
|
|
|
|
checkdepends=(python-hypothesis python-pytest)
|
2019-03-13 02:28:15 -07:00
|
|
|
backup=(etc/$pkgname/backup.conf
|
2019-04-12 07:54:37 -07:00
|
|
|
etc/$pkgname/include-paths.conf
|
2019-03-17 09:37:06 -07:00
|
|
|
etc/$pkgname/home-exclude.conf)
|
|
|
|
source=("${pkgname}-${pkgver}.tar.gz")
|
2019-04-12 07:54:37 -07:00
|
|
|
sha512sums=('d46504da5c996f041f276b6045d904b9e6b5dfd18781ae7d7d308175ded1b48851c588db42752f539ab412e77a46f5e53c4d0ca08ea3545073bd1a0fce15882b')
|
2019-02-07 23:19:21 -08:00
|
|
|
|
|
|
|
build() {
|
2019-03-17 09:37:06 -07:00
|
|
|
cd "${srcdir}/${pkgname}-${pkgver}"
|
2019-02-07 23:19:21 -08:00
|
|
|
python setup.py build
|
|
|
|
}
|
|
|
|
|
2019-03-13 02:45:55 -07:00
|
|
|
check() {
|
2019-03-17 09:37:06 -07:00
|
|
|
cd "${srcdir}/${pkgname}-${pkgver}"
|
2019-04-12 07:54:37 -07:00
|
|
|
pytest
|
2019-03-13 02:45:55 -07:00
|
|
|
}
|
|
|
|
|
2019-02-07 23:19:21 -08:00
|
|
|
package() {
|
2019-03-17 09:37:06 -07:00
|
|
|
cd "${srcdir}/${pkgname}-${pkgver}"
|
2019-03-13 02:28:15 -07:00
|
|
|
|
|
|
|
python setup.py install \
|
|
|
|
--prefix='/usr' \
|
|
|
|
--root="${pkgdir}" \
|
|
|
|
--optimize=1 \
|
|
|
|
--skip-build
|
|
|
|
|
|
|
|
# Install config files
|
2019-03-17 09:37:06 -07:00
|
|
|
for config in rbackup/config/*.conf; do
|
2019-03-13 02:28:15 -07:00
|
|
|
install -Dm644 "${config}" "${pkgdir}/etc/${pkgname}/${config##*/}"
|
|
|
|
done
|
2019-02-07 23:19:21 -08:00
|
|
|
|
2019-03-13 02:28:15 -07:00
|
|
|
# Install AppArmor profile
|
|
|
|
install -Dm644 rbackup/config/usr.bin.backup \
|
|
|
|
"${pkgdir}/etc/apparmor.d/usr.bin.backup"
|
2019-03-13 02:38:15 -07:00
|
|
|
|
|
|
|
# Install documetation
|
2019-04-12 07:54:37 -07:00
|
|
|
install -Dm644 README \
|
|
|
|
"${pkgdir}/usr/share/doc/${pkgname}/README"
|
2019-02-07 23:19:21 -08:00
|
|
|
}
|