updated on Sun Jan 15 16:02:00 UTC 2012
[aur-mirror.git] / dt-s3-backup / PKGBUILD
blob7a07abdc9949b841d8907350edf968d6c4d438e5
1 # Mantainer: Luca Cesari <mirshann@freakmind.org>
3 pkgname=dt-s3-backup
4 pkgver=20110510
5 pkgrel=1
6 pkgdesc="Bash script for automated backups with duplicity and Amazon's S3 online storage"
7 url=https://github.com/thornomad/dt-s3-backup
8 arch=('any')
9 license=('GPL3')
10 makedepends=("git" "bash" "duplicity" "s3cmd")
11 provides=('dt-s3-backup')
12 install=("dt-s3-backup.install")
14 _gitroot="https://github.com/thornomad/dt-s3-backup.git"
15 _gitname="dt-s3-backup"
17 build() {
18         cd ${srcdir}
19         msg "Connecting to git server..."
21         if [ -d ${srcdir}/${_gitname} ]; then
22                 cd ${_gitname} && git pull origin
23                 msg "The local files are updated."
24         else
25                 git clone ${_gitroot} --depth=1 ${_gitname}
26         fi
28         msg "GIT checkout done or server timeout"
29         
30         # license
31         install -Dm644 "${srcdir}/${_gitname}/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
32         
33         # readme & script
34         install -Dm644 "${srcdir}/${_gitname}/README" "${pkgdir}/usr/share/doc/${_gitname}/README"
35         install -Dm644 "${srcdir}/${_gitname}/dt-s3-backup.sh" "${pkgdir}/usr/share/doc/${_gitname}/dt-s3-backup.sh"