mirror of
https://github.com/octoleo/restic.git
synced 2024-12-22 10:58:55 +00:00
archlinux PKGBUILD added. Thanks to the contributors.
Closes #44 Closes #106
This commit is contained in:
parent
5740f202e3
commit
d9fbf9ad02
43
doc/PKGBUILD
Normal file
43
doc/PKGBUILD
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
# 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:
|
Loading…
Reference in New Issue
Block a user