blob: fce452c0015f13b62805f95fd6bd5808258761cb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
|
# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
# Maintainer: Sören Tempel <soeren+alpine@soeren-tempel.net>
pkgname=rest-server
pkgver=0.9.7
pkgrel=0
pkgdesc="A high performance HTTP server that implements restic's REST backend API"
url="https://github.com/restic/rest-server"
arch="all"
license="BSD-2-Clause"
depends=""
makedepends="go"
install="$pkgname.pre-install"
subpackages="$pkgname-doc $pkgname-openrc"
source="$pkgname-$pkgver.tar.gz::https://github.com/restic/$pkgname/archive/v$pkgver.tar.gz
0001-Move-TestIsUserPath-to-correct-package.patch
$pkgname.confd
$pkgname.initd"
builddir="$srcdir/src/github.com/restic/$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"
go test -v . ./cmd/rest-server
}
package() {
cd "$builddir"
install -Dm755 $pkgname "$pkgdir"/usr/bin/$pkgname
install -Dm644 README.md \
"$pkgdir"/usr/share/doc/$pkgname/README.md
install -Dm755 "$srcdir"/$pkgname.initd \
"$pkgdir"/etc/init.d/$pkgname
install -Dm644 "$srcdir"/$pkgname.confd \
"$pkgdir"/etc/conf.d/$pkgname
}
sha512sums="2288f93703d03859ec1a5d9085eda7ca5b82e801bc74cd66fcc58601e73a2bf5150f85e948749ca7d95e4598087acf5115499404ccbbfba62a4cc9043437ed29 rest-server-0.9.7.tar.gz
98a9fbb7c0b60dbb3682bab40f7b4f488da93d7c7afdab174185bc62ad250bf8e1238b6513a239dd5da276935b51bd05495f13c7e03befa3a0f651cf3d109979 0001-Move-TestIsUserPath-to-correct-package.patch
cd9e4d3df04c26aa602a57196bdfb14d7ad6e957f1d9596a09e596b9d01543eee08474817ba47192659fe6f5ab15b8fa64400fb6a8d24111f5c792b1412f5e5b rest-server.confd
185c0022d07c66fcee2d84af1bb0a11ac0753bd79deb8f5ae7dc2bd84909886aa3e58f42cd6ace4f191da6128d0385036948d4a8accd14cf9cdb9603001b9aca rest-server.initd"
|