From b8ae9dc55702e5006025423d24d544dff94c10b9 Mon Sep 17 00:00:00 2001 From: Malte Kiefer Date: Sun, 3 Jan 2021 13:08:25 +0100 Subject: [PATCH] added restic --- core/restic/.checksums | 1 + core/restic/.pkgfiles | 42 ++++++++++++++++++++++++++++++++++++++++++ core/restic/spkgbuild | 26 ++++++++++++++++++++++++++ 3 files changed, 69 insertions(+) create mode 100644 core/restic/.checksums create mode 100644 core/restic/.pkgfiles create mode 100644 core/restic/spkgbuild diff --git a/core/restic/.checksums b/core/restic/.checksums new file mode 100644 index 000000000..76d378f44 --- /dev/null +++ b/core/restic/.checksums @@ -0,0 +1 @@ +659aa4070a6725ba9b868bf92ebc9e9c v0.11.0.tar.gz diff --git a/core/restic/.pkgfiles b/core/restic/.pkgfiles new file mode 100644 index 000000000..c49c6cc7d --- /dev/null +++ b/core/restic/.pkgfiles @@ -0,0 +1,42 @@ +drwxr-xr-x root/root usr/ +drwxr-xr-x root/root usr/bin/ +-rwxr-xr-x root/root usr/bin/restic +drwxr-xr-x root/root usr/share/ +drwxr-xr-x root/root usr/share/bash-completion/ +drwxr-xr-x root/root usr/share/bash-completion/completions/ +-rw-r--r-- root/root usr/share/bash-completion/completions/restic +drwxr-xr-x root/root usr/share/licenses/ +drwxr-xr-x root/root usr/share/licenses/restic/ +-rw-r--r-- root/root usr/share/licenses/restic/LICENSE +drwxr-xr-x root/root usr/share/man/ +drwxr-xr-x root/root usr/share/man/man1/ +-rw-r--r-- root/root usr/share/man/man1/restic-backup.1.gz +-rw-r--r-- root/root usr/share/man/man1/restic-cache.1.gz +-rw-r--r-- root/root usr/share/man/man1/restic-cat.1.gz +-rw-r--r-- root/root usr/share/man/man1/restic-check.1.gz +-rw-r--r-- root/root usr/share/man/man1/restic-copy.1.gz +-rw-r--r-- root/root usr/share/man/man1/restic-diff.1.gz +-rw-r--r-- root/root usr/share/man/man1/restic-dump.1.gz +-rw-r--r-- root/root usr/share/man/man1/restic-find.1.gz +-rw-r--r-- root/root usr/share/man/man1/restic-forget.1.gz +-rw-r--r-- root/root usr/share/man/man1/restic-generate.1.gz +-rw-r--r-- root/root usr/share/man/man1/restic-init.1.gz +-rw-r--r-- root/root usr/share/man/man1/restic-key.1.gz +-rw-r--r-- root/root usr/share/man/man1/restic-list.1.gz +-rw-r--r-- root/root usr/share/man/man1/restic-ls.1.gz +-rw-r--r-- root/root usr/share/man/man1/restic-migrate.1.gz +-rw-r--r-- root/root usr/share/man/man1/restic-mount.1.gz +-rw-r--r-- root/root usr/share/man/man1/restic-prune.1.gz +-rw-r--r-- root/root usr/share/man/man1/restic-rebuild-index.1.gz +-rw-r--r-- root/root usr/share/man/man1/restic-recover.1.gz +-rw-r--r-- root/root usr/share/man/man1/restic-restore.1.gz +-rw-r--r-- root/root usr/share/man/man1/restic-self-update.1.gz +-rw-r--r-- root/root usr/share/man/man1/restic-snapshots.1.gz +-rw-r--r-- root/root usr/share/man/man1/restic-stats.1.gz +-rw-r--r-- root/root usr/share/man/man1/restic-tag.1.gz +-rw-r--r-- root/root usr/share/man/man1/restic-unlock.1.gz +-rw-r--r-- root/root usr/share/man/man1/restic-version.1.gz +-rw-r--r-- root/root usr/share/man/man1/restic.1.gz +drwxr-xr-x root/root usr/share/zsh/ +drwxr-xr-x root/root usr/share/zsh/site-functions/ +-rw-r--r-- root/root usr/share/zsh/site-functions/_restic diff --git a/core/restic/spkgbuild b/core/restic/spkgbuild new file mode 100644 index 000000000..c5fa2f655 --- /dev/null +++ b/core/restic/spkgbuild @@ -0,0 +1,26 @@ +# description : Fast, secure, efficient backup program +# depends : go glibc git + +name=restic +version=0.11.0 +release=1 +options="" +noextract="" +backup="" +source="https://github.com/restic/$name/archive/v${version}.tar.gz" + +build() { + cd $name-$version + export CGO_CPPFLAGS="${CPPFLAGS}" + export CGO_CFLAGS="${CFLAGS}" + export CGO_CXXFLAGS="${CXXFLAGS}" + export CGO_LDFLAGS="${LDFLAGS}" + export GOFLAGS="-buildmode=pie -trimpath -modcacherw" + go build -ldflags "-X 'main.version=${version}'" ./cmd/... + + install -Dm755 restic "${PKG}/usr/bin/restic" + install -Dm644 LICENSE "${PKG}/usr/share/licenses/${name}/LICENSE" + install -Dm644 -t "$PKG/usr/share/man/man1/" doc/man/*.1 + install -Dm644 doc/zsh-completion.zsh "$PKG/usr/share/zsh/site-functions/_restic" + install -Dm644 doc/bash-completion.sh "$PKG/usr/share/bash-completion/completions/restic" +}