restic/doc/PKGBUILD
2015-03-15 16:32:43 +01:00

43 lines
1.1 KiB
Bash

# Maintainer: Florian Daniel <fd@noxa.de>
# Contributor: Eldar Tsraev <elts@culab.org>
# Contributor: Andreas Guth <andreas.guth@rwth-aachen.de>
pkgname=restic-git
pkgver=r354.5740f20
pkgrel=1
pkgdesc="restic is a program that does backups right."
arch=('i686' 'x86_64')
url="https://github.com/restic/restic"
license=('BSD')
depends=('glibc')
makedepends=('git' 'go>=1.3')
provides=('restic')
conflicts=('restic')
source=('restic-git::git+https://github.com/restic/restic')
md5sums=('SKIP')
pkgver() {
cd "$srcdir/$pkgname"
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)";
}
prepare() {
# git repo is fetched by makepkg, prepare src so it is not re-downloaded during build()
export GOPATH="$srcdir"
export gorepo="github.com/restic/restic"
mkdir -p $GOPATH/src/github.com/restic
rm -rf $GOPATH/src/$gorepo
mv $srcdir/$pkgname $GOPATH/src/$gorepo
}
build() {
go get -v $gorepo/cmd/restic
}
package() {
# Copying file(s)
install -Dm755 $GOPATH/bin/restic $pkgdir/usr/bin/restic
# Copying LICENCE file
install -Dm644 $GOPATH/src/$gorepo/LICENSE $pkgdir/usr/share/licenses/$pkgname/LICENSE
}
# vim:set ts=2 sw=2 et: