mirror of
https://github.com/octoleo/restic.git
synced 2024-12-22 10:58:55 +00:00
Update Archlinux package file
This commit is contained in:
parent
c143f8c9e3
commit
e6c62c4ba9
29
doc/PKGBUILD
29
doc/PKGBUILD
@ -1,9 +1,10 @@
|
|||||||
# Maintainer: Florian Daniel <fd@noxa.de>
|
# Maintainer: Florian Daniel <fd@noxa.de>
|
||||||
# Contributor: Eldar Tsraev <elts@culab.org>
|
# Contributor: Eldar Tsraev <elts@culab.org>
|
||||||
# Contributor: Andreas Guth <andreas.guth@rwth-aachen.de>
|
# Contributor: Andreas Guth <andreas.guth@rwth-aachen.de>
|
||||||
|
# Contributor: Alexander Neumann <alexander@bumpern.de>
|
||||||
options=(!strip)
|
options=(!strip)
|
||||||
pkgname=restic-git
|
pkgname=restic-git
|
||||||
pkgver=r360.e1acade
|
pkgver=r702.c143f8c
|
||||||
pkgrel=1
|
pkgrel=1
|
||||||
pkgdesc="restic is a program that does backups right."
|
pkgdesc="restic is a program that does backups right."
|
||||||
arch=('i686' 'x86_64')
|
arch=('i686' 'x86_64')
|
||||||
@ -13,37 +14,25 @@ depends=('glibc')
|
|||||||
makedepends=('git' 'go>=1.3')
|
makedepends=('git' 'go>=1.3')
|
||||||
provides=('restic')
|
provides=('restic')
|
||||||
conflicts=('restic')
|
conflicts=('restic')
|
||||||
source=('restic-git::git+https://github.com/restic/restic')
|
source=("${pkgname}::git+https://github.com/restic/restic")
|
||||||
md5sums=('SKIP')
|
md5sums=('SKIP')
|
||||||
|
|
||||||
importpath='github.com/restic/restic'
|
importpath='github.com/restic/restic'
|
||||||
|
|
||||||
pkgver() {
|
pkgver() {
|
||||||
cd "$srcdir/$pkgname"
|
cd "$pkgname"
|
||||||
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)";
|
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/go"
|
|
||||||
mkdir -p "$GOPATH/src/$(dirname ${importpath})"
|
|
||||||
ln -sf "$srcdir/$pkgname" "$GOPATH/src/${importpath}"
|
|
||||||
}
|
|
||||||
|
|
||||||
build() {
|
build() {
|
||||||
export GOPATH="$srcdir/go"
|
cd "$pkgname"
|
||||||
cd "$GOPATH/src/${importpath}/cmd/restic"
|
go run build.go
|
||||||
go get -ldflags -s -v .
|
|
||||||
go install -ldflags -s -v
|
|
||||||
}
|
}
|
||||||
|
|
||||||
package() {
|
package() {
|
||||||
export GOPATH="$srcdir/go"
|
install -Dm755 "$pkgname/restic" "$pkgdir/usr/bin/restic"
|
||||||
|
install -Dm644 "$pkgname/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
|
||||||
# Copying file(s)
|
install -Dm644 "$pkgname/README.md" "$pkgdir/usr/share/doc/$pkgname/README"
|
||||||
install -Dm755 $GOPATH/bin/restic $pkgdir/usr/bin/restic
|
|
||||||
install -Dm644 $GOPATH/src/${importpath}/LICENSE $pkgdir/usr/share/licenses/$pkgname/LICENSE
|
|
||||||
install -Dm644 $GOPATH/src/${importpath}/README.md $pkgdir/usr/share/doc/$pkgname/README
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# vim:set ts=2 sw=2 et:
|
# vim:set ts=2 sw=2 et:
|
||||||
|
Loading…
Reference in New Issue
Block a user