diff options
author | Sören Tempel <soeren+git@soeren-tempel.net> | 2018-07-25 00:04:00 +0200 |
---|---|---|
committer | Sören Tempel <soeren+git@soeren-tempel.net> | 2018-07-25 00:04:00 +0200 |
commit | 0a69bbf3fafe505f2d2baf538076d6862a3f35e1 (patch) | |
tree | 06791e5d72d1fd0ae377af93ba0ea44e83272bde /community/restic | |
parent | 4e8f63fcab59d1eb03297f32e88b2d18cdbd31b6 (diff) | |
download | aports-0a69bbf3fafe505f2d2baf538076d6862a3f35e1.tar.bz2 aports-0a69bbf3fafe505f2d2baf538076d6862a3f35e1.tar.xz |
community/restic: move from testing
Also fix the default_prepare invocation while at it. Applying patches
wouldn't have worked previously, which isn't a big deal since we didn't
apply any patches anyhow.
Diffstat (limited to 'community/restic')
-rw-r--r-- | community/restic/APKBUILD | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/community/restic/APKBUILD b/community/restic/APKBUILD new file mode 100644 index 0000000000..6a7e1254bc --- /dev/null +++ b/community/restic/APKBUILD @@ -0,0 +1,67 @@ +# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net> +# Maintainer: Sören Tempel <soeren+alpine@soeren-tempel.net> +pkgname=restic +pkgver=0.9.1 +pkgrel=0 +pkgdesc="Fast, secure, efficient backup program" +url="https://restic.net/" +arch="all" +license="BSD-2-Clause" +depends="" +makedepends="go" +options="!checkroot" +install="" +subpackages="$pkgname-doc + $pkgname-zsh-completion:zshcomp:noarch + $pkgname-bash-completion:bashcomp:noarch" +source="https://github.com/$pkgname/$pkgname/releases/download/v$pkgver/$pkgname-$pkgver.tar.gz" +builddir="$srcdir/src/github.com/$pkgname/$pkgname" + +export GOPATH="$srcdir" + +prepare() { + mkdir -p "${builddir%/*}" + ln -s "$srcdir"/$pkgname-$pkgver "$builddir" + default_prepare +} + +build() { + cd "$builddir" + go build ./cmd/... +} + +check() { + cd "$builddir" + RESTIC_TEST_FUSE=0 make test +} + +package() { + cd "$builddir" + install -Dm755 $pkgname "$pkgdir"/usr/bin/$pkgname + + local man + for man in doc/man/*.?; do + install -Dm644 "$man" \ + "$pkgdir"/usr/share/man/man${man##*.}/${man##*/} + done +} + +bashcomp() { + depends="" + pkgdesc="Bash completion for $pkgname" + install_if="$pkgname=$pkgver-r$pkgrel bash-completion" + + install -Dm644 "$builddir"/doc/bash-completion.sh \ + "$subpkgdir"/usr/share/bash-completion/completions/$pkgname +} + +zshcomp() { + depends="" + pkgdesc="Zsh completion for $pkgname" + install_if="$pkgname=$pkgver-r$pkgrel zsh" + + install -Dm644 "$builddir"/doc/zsh-completion.zsh \ + "$subpkgdir"/usr/share/zsh/site-functions/_$pkgname +} + +sha512sums="9d365bdcb561255e2103d7170d02e850e5cf767bc2e02e099d57ec9aad719ebd4319446f5162e64437ca9a8e1fdca273fd1c6cc4314013ca07b5ebdbeef93c2a restic-0.9.1.tar.gz" |