diff options
author | Sören Tempel <soeren+git@soeren-tempel.net> | 2018-10-15 21:04:33 +0200 |
---|---|---|
committer | Sören Tempel <soeren+git@soeren-tempel.net> | 2018-10-15 21:04:33 +0200 |
commit | 0d8a6942ac6996a4c31ea4180e21f5d5706e929a (patch) | |
tree | 72ec31061632792874f29f04943d10a0a10eef71 /community/rest-server/APKBUILD | |
parent | 28150adaf85ebb64ea4668c5fa3e5658e46058e7 (diff) | |
download | aports-0d8a6942ac6996a4c31ea4180e21f5d5706e929a.tar.bz2 aports-0d8a6942ac6996a4c31ea4180e21f5d5706e929a.tar.xz |
community/rest-server: move from testing
Diffstat (limited to 'community/rest-server/APKBUILD')
-rw-r--r-- | community/rest-server/APKBUILD | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/community/rest-server/APKBUILD b/community/rest-server/APKBUILD new file mode 100644 index 0000000000..fce452c001 --- /dev/null +++ b/community/rest-server/APKBUILD @@ -0,0 +1,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" |