summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorFallenWarrior2k2021-05-06 00:05:28 +0200
committerFallenWarrior2k2021-05-06 00:17:35 +0200
commit13953b9c4da7395d147a1c54896a5a45edcb21f7 (patch)
treef10d8032bec0e1d94048780da8e94f231dbfa731
downloadaur-13953b9c4da7395d147a1c54896a5a45edcb21f7.tar.gz
Initial PKGBUILD for 0.10.0
-rw-r--r--.SRCINFO15
-rw-r--r--.gitignore3
-rw-r--r--PKGBUILD34
3 files changed, 52 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..ba29296daa9
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,15 @@
+pkgbase = restic-rest-server
+ pkgdesc = High-performance HTTP server that implements restic's REST backend API
+ pkgver = 0.10.0
+ pkgrel = 1
+ url = https://github.com/restic/rest-server
+ arch = x86_64
+ license = BSD
+ optdepends = apache: htpasswd manipulation
+ source = restic-rest-server-0.10.0.tar.gz::https://github.com/restic/rest-server/archive/refs/tags/v0.10.0.tar.gz
+ sha256sums = d109cf9e9c3f36c9c8eb6d4a2bd530c5dfcd62b11687d93034e2edc0fdecf479
+ sha512sums = b209edf2cb6e8ae11ff4800ffd84195c6052180ee81e5b79cb71895b9b559e0c6455835255f0b34d5d70482c4917f8491747bf0487ec3766432ae57e07d93884
+ b2sums = 48a07f7fbd05de39246813772905ba21487ee77640b70d4e086c29cc0b3b4885d38158be487f846bbada725444fdbccd3d0a3bc2ce24f25d81c069f734d36854
+
+pkgname = restic-rest-server
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 00000000000..089a2c0346c
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,3 @@
+/*.tar.*
+/pkg
+/src
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..2522f89b648
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,34 @@
+# Maintainer: FallenWarrior2k <aur@sl.fallenwarrior.dev>
+
+pkgname=restic-rest-server
+_reponame=rest-server
+pkgver=0.10.0
+pkgrel=1
+pkgdesc="High-performance HTTP server that implements restic's REST backend API"
+url='https://github.com/restic/rest-server'
+license=(BSD)
+arch=(x86_64)
+optdepends=('apache: htpasswd manipulation')
+source=("$pkgname-$pkgver.tar.gz::$url/archive/refs/tags/v$pkgver.tar.gz")
+sha256sums=('d109cf9e9c3f36c9c8eb6d4a2bd530c5dfcd62b11687d93034e2edc0fdecf479')
+sha512sums=('b209edf2cb6e8ae11ff4800ffd84195c6052180ee81e5b79cb71895b9b559e0c6455835255f0b34d5d70482c4917f8491747bf0487ec3766432ae57e07d93884')
+b2sums=('48a07f7fbd05de39246813772905ba21487ee77640b70d4e086c29cc0b3b4885d38158be487f846bbada725444fdbccd3d0a3bc2ce24f25d81c069f734d36854')
+
+build() {
+ cd ${_reponame}-$pkgver
+ export CGO_ENABLED=0
+ go build -buildmode=pie -trimpath -ldflags="-linkmode=external -extldflags \"${LDFLAGS}\"" -mod=readonly -modcacherw -o restic-rest-server ./cmd/rest-server
+}
+
+# Tests were broken and got fixed two commits after the last release
+# check() {
+# cd ${_reponame}-$pkgver
+# go test ./...
+# }
+
+package() {
+ cd ${_reponame}-$pkgver
+ install -Dm755 -t "$pkgdir"/usr/bin $pkgname
+ install -Dm644 -t "$pkgdir"/usr/share/licenses/$pkgname LICENSE
+ install -Dm644 -t "$pkgdir"/usr/share/doc/$pkgname {CHANGELOG,README}.md
+}