From e6c62c4ba93c8f2683f1193c4c633d7115a4657e Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Sat, 27 Jun 2015 11:36:41 +0200 Subject: [PATCH] Update Archlinux package file --- doc/PKGBUILD | 29 +++++++++-------------------- 1 file changed, 9 insertions(+), 20 deletions(-) diff --git a/doc/PKGBUILD b/doc/PKGBUILD index 4d6920d5b..6ab5853ef 100644 --- a/doc/PKGBUILD +++ b/doc/PKGBUILD @@ -1,9 +1,10 @@ # Maintainer: Florian Daniel # Contributor: Eldar Tsraev # Contributor: Andreas Guth +# Contributor: Alexander Neumann options=(!strip) pkgname=restic-git -pkgver=r360.e1acade +pkgver=r702.c143f8c pkgrel=1 pkgdesc="restic is a program that does backups right." arch=('i686' 'x86_64') @@ -13,37 +14,25 @@ depends=('glibc') makedepends=('git' 'go>=1.3') provides=('restic') conflicts=('restic') -source=('restic-git::git+https://github.com/restic/restic') +source=("${pkgname}::git+https://github.com/restic/restic") md5sums=('SKIP') importpath='github.com/restic/restic' pkgver() { - cd "$srcdir/$pkgname" + cd "$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/go" - mkdir -p "$GOPATH/src/$(dirname ${importpath})" - ln -sf "$srcdir/$pkgname" "$GOPATH/src/${importpath}" -} - build() { - export GOPATH="$srcdir/go" - cd "$GOPATH/src/${importpath}/cmd/restic" - go get -ldflags -s -v . - go install -ldflags -s -v + cd "$pkgname" + go run build.go } package() { - export GOPATH="$srcdir/go" - - # Copying file(s) - 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 + install -Dm755 "$pkgname/restic" "$pkgdir/usr/bin/restic" + install -Dm644 "$pkgname/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE" + install -Dm644 "$pkgname/README.md" "$pkgdir/usr/share/doc/$pkgname/README" } # vim:set ts=2 sw=2 et: